blob: 5ba3b75f2027294453e2251e4effe03bdd93c7c6 [file] [log] [blame]
{"version":3,"file":"core.js","sources":["../src/util/decorators.ts","../src/di/metadata.ts","../src/di/interface/injector.ts","../src/util/property.ts","../src/di/interface/defs.ts","../src/util/stringify.ts","../src/di/forward_ref.ts","../src/util/global.ts","../src/compiler/compiler_facade_interface.ts","../src/compiler/compiler_facade.ts","../src/di/injection_token.ts","../src/di/injector_compatibility.ts","../src/di/jit/environment.ts","../src/interface/type.ts","../src/reflection/reflection_capabilities.ts","../src/di/jit/util.ts","../src/di/jit/injectable.ts","../src/di/util.ts","../src/di/injectable.ts","../src/util/ng_dev_mode.ts","../src/render3/errors.ts","../src/di/scope.ts","../src/di/r3_injector.ts","../src/di/injector.ts","../src/util/errors.ts","../src/di/reflective_errors.ts","../src/di/reflective_key.ts","../src/reflection/reflector.ts","../src/reflection/reflection.ts","../src/di/reflective_provider.ts","../src/di/reflective_injector.ts","../src/metadata/di.ts","../src/change_detection/constants.ts","../src/metadata/resource_loading.ts","../src/metadata/view.ts","../src/util/closure.ts","../src/render3/empty.ts","../src/render3/fields.ts","../src/render3/definition.ts","../src/render3/util/misc_utils.ts","../src/render3/interfaces/view.ts","../src/util/assert.ts","../src/render3/interfaces/container.ts","../src/render3/interfaces/context.ts","../src/render3/util/view_utils.ts","../src/render3/assert.ts","../src/render3/hooks.ts","../src/render3/styling/state.ts","../src/render3/state.ts","../src/sanitization/bypass.ts","../src/util/is_dev_mode.ts","../src/sanitization/inert_body.ts","../src/sanitization/url_sanitizer.ts","../src/sanitization/html_sanitizer.ts","../src/sanitization/security.ts","../src/sanitization/style_sanitizer.ts","../src/sanitization/sanitization.ts","../src/render3/interfaces/injector.ts","../src/render3/node_assert.ts","../src/render3/interfaces/renderer.ts","../src/render3/context_discovery.ts","../src/render3/styling/core_player_handler.ts","../src/render3/styling/shared.ts","../src/render3/styling/util.ts","../src/render3/util/attrs_utils.ts","../src/render3/util/injector_utils.ts","../src/render3/util/view_traversal_utils.ts","../src/render3/di.ts","../src/errors.ts","../src/error_handler.ts","../src/metadata/schema.ts","../src/util/named_array_type.ts","../src/util/ng_reflect.ts","../src/render3/tokens.ts","../src/render3/styling/host_instructions_queue.ts","../src/render3/styling/player_factory.ts","../src/render3/styling/class_and_style_bindings.ts","../src/render3/node_selector_matcher.ts","../src/render3/interfaces/i18n.ts","../src/render3/styling_next/state.ts","../src/render3/util/debug_utils.ts","../src/render3/styling_next/util.ts","../src/render3/styling_next/bindings.ts","../src/render3/styling_next/map_based_bindings.ts","../src/render3/styling_next/styling_debug.ts","../src/render3/instructions/lview_debug.ts","../src/render3/instructions/select.ts","../src/render3/instructions/shared.ts","../src/render3/node_util.ts","../src/render3/instructions/alloc_host_vars.ts","../src/util/symbol.ts","../src/util/iterable.ts","../src/util/comparison.ts","../src/change_detection/change_detection_util.ts","../src/render3/bindings.ts","../src/render3/instructions/property.ts","../src/render3/instructions/attribute.ts","../src/render3/instructions/interpolation.ts","../src/render3/instructions/attribute_interpolation.ts","../src/render3/instructions/change_detection.ts","../src/render3/node_manipulation.ts","../src/render3/instructions/container.ts","../src/render3/instructions/storage.ts","../src/render3/instructions/di.ts","../src/render3/styling_next/instructions.ts","../src/render3/instructions/styling.ts","../src/render3/instructions/element.ts","../src/render3/instructions/element_container.ts","../src/render3/instructions/embedded_view.ts","../src/render3/instructions/get_current_view.ts","../src/util/lang.ts","../src/render3/instructions/listener.ts","../src/render3/instructions/next_context.ts","../src/render3/instructions/projection.ts","../src/render3/instructions/property_interpolation.ts","../src/render3/instructions/text.ts","../src/render3/instructions/text_interpolation.ts","../src/render3/players.ts","../src/render3/util/discovery_utils.ts","../src/render3/util/global_utils.ts","../src/render3/component.ts","../src/interface/simple_change.ts","../src/render3/features/ng_onchanges_feature.ts","../src/render3/features/inherit_definition_feature.ts","../src/render3/di_setup.ts","../src/render3/features/providers_feature.ts","../src/linker/component_factory.ts","../src/linker/component_factory_resolver.ts","../src/linker/ng_module_factory.ts","../src/render3/view_ref.ts","../src/render3/view_engine_compatibility.ts","../src/util/noop.ts","../src/linker/element_ref.ts","../src/render/api.ts","../src/version.ts","../src/change_detection/differs/default_iterable_differ.ts","../src/change_detection/differs/default_keyvalue_differ.ts","../src/change_detection/differs/iterable_differs.ts","../src/change_detection/differs/keyvalue_differs.ts","../src/change_detection/change_detector_ref.ts","../src/change_detection/change_detection.ts","../src/linker/template_ref.ts","../src/linker/view_container_ref.ts","../src/view/errors.ts","../src/view/types.ts","../src/view/util.ts","../src/view/ng_module.ts","../src/view/view_attach.ts","../src/view/refs.ts","../src/view/provider.ts","../src/render3/component_ref.ts","../src/util/ng_i18n_closure_mode.ts","../src/i18n/locale_data.ts","../src/i18n/locale_en.ts","../src/i18n/locale_data_api.ts","../src/i18n/localization.ts","../src/util/array_utils.ts","../src/render3/i18n.ts","../src/linker/ng_module_factory_registration.ts","../src/render3/ng_module_ref.ts","../src/render3/metadata.ts","../src/render3/pure_function.ts","../src/render3/pipe.ts","../src/event_emitter.ts","../src/linker/query_list.ts","../src/render3/query.ts","../src/render3/view_engine_compatibility_prebound.ts","../src/render3/jit/environment.ts","../src/render3/jit/module.ts","../src/render3/jit/directive.ts","../src/render3/jit/pipe.ts","../src/metadata/directives.ts","../src/metadata/ng_module.ts","../src/application_init.ts","../src/application_tokens.ts","../src/console.ts","../src/i18n/tokens.ts","../src/linker/compiler.ts","../src/profile/wtf_impl.ts","../src/profile/profile.ts","../src/util/microtask.ts","../src/zone/ng_zone.ts","../src/testability/testability.ts","../src/application_ref.ts","../src/linker/ng_module_factory_loader.ts","../src/ivy_switch.ts","../src/linker/system_js_ng_module_factory_loader.ts","../src/linker/view_ref.ts","../src/debug/debug_node.ts","../src/platform_core_providers.ts","../src/application_module.ts","../src/view/element.ts","../src/view/query.ts","../src/view/ng_content.ts","../src/view/pure_expression.ts","../src/view/text.ts","../src/view/view.ts","../src/view/services.ts","../src/view/entrypoint.ts","../core.ts"],"sourcesContent":["/**\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\nimport {Type} from '../interface/type';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void):\n {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any;} {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(...args: any[]): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n (cls as any)[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, {value: []})[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args: any[]): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ?\n (cls as any)[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n}\n\nexport function makePropDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(...args: any[]): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n const constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n (constructor as any)[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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\nimport {makeParamDecorator} from '../util/decorators';\n\n\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\"\n * region=\"InjectWithoutDecorator\" linenums=\"false\"></code-example>\n */\n (token: any): any;\n new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token}));\n\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides null if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * The following code allows the possibility of a null result:\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\"\n * linenums=\"false\"></code-example>\n *\n */\n (): any;\n new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator = makeParamDecorator('Optional');\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a null result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\"\n * linenums=\"false\"></code-example>\n *\n *\n * @see `SkipSelf`\n * @see `Optional`\n *\n */\n (): any;\n new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator = makeParamDecorator('Self');\n\n\n/**\n * Type of the SkipSelf decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\"\n * linenums=\"false\"></code-example>\n *\n * Learn more in the\n * [Dependency Injection guide](guide/dependency-injection-in-action#skip).\n *\n * @see `Self`\n * @see `Optional`\n *\n */\n (): any;\n new (): SkipSelf;\n}\n\n/**\n * Type of the SkipSelf metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');\n\n/**\n * Type of the Host decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * For an extended example, see\n * [\"Dependency Injection Guide\"](guide/dependency-injection-in-action#optional).\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a null result.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\"\n * linenums=\"false\"></code-example>\n */\n (): any;\n new (): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator = makeParamDecorator('Host');\n\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Parameter decorator for a directive constructor that designates\n * a host-element attribute whose value is injected as a constant string literal.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * The following example uses the decorator to inject the string literal `text`.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata' linenums=\"false\"}\n *\n * ### Example as TypeScript Decorator\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory' linenums=\"false\"}\n *\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute whose value can be injected.\n */\n attributeName?: string;\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator =\n makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));\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/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\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\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty as any) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: {[key: string]: string}, source: {[key: string]: string}) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\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\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider} from './provider';\n\n\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ɵɵInjectableDef<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any>|'root'|'any'|null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T|undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ɵɵInjectorDef<T> {\n factory: () => T;\n\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ngInjectableDef property for example).\n providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n\n imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has an `InjectableDef` static field.\n *\n * `InjectableDefType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ngInjectableDef: never;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorDefTypes` can be used to configure a `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ngInjectorDef: never;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n}\n\n\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown,\n providedIn?: Type<any>| 'root' | 'any' | null,\n factory: () => T,\n}): never {\n return ({\n token: opts.token, providedIn: opts.providedIn as any || null, factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDef<T>) as never;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only be generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n * create the type must be provided. If that factory function needs to inject arguments, it can\n * use the `inject` function.\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has an `ngInjectableDef` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @publicApi\n */\nexport function ɵɵdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):\n never {\n return ({\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n } as ɵɵInjectorDef<any>) as never;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited\n * value.\n *\n * @param type A type which may have its own (non-inherited) `ngInjectableDef`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {\n const def = type[NG_INJECTABLE_DEF] as ɵɵInjectableDef<T>;\n // The definition read above may come from a base class. `hasOwnProperty` is not sufficient to\n // distinguish this case, as in older browsers (e.g. IE10) static property inheritance is\n // implemented by copying the properties.\n //\n // Instead, the ngInjectableDef's token is compared to the type, and if they don't match then the\n // property was not defined directly on the type itself, and was likely inherited. The definition\n // is only returned if the type matches the def.token.\n return def && def.token === type ? def : null;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` or read the `ngInjectableDef` from one of its ancestors.\n *\n * @param type A type which may have `ngInjectableDef`, via inheritance.\n *\n * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the\n * `ngInjectableDef` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {\n if (type && type[NG_INJECTABLE_DEF]) {\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in v10. Please add @Injectable() to the \"${type.name}\" class.`);\n return type[NG_INJECTABLE_DEF];\n } else {\n return null;\n }\n}\n\n/**\n * Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have `ngInjectorDef`\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;\n}\n\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\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\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\n\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\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\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n\n\n/**\n * An interface that a function passed into {@link forwardRef} has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn { (): any; }\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function() { return stringify(this()); };\n return (<Type<any>><any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n const fn: any = type;\n if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef) {\n return fn();\n } else {\n return type;\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// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n// Not yet available in TypeScript: https://github.com/Microsoft/TypeScript/pull/29332\ndeclare var globalThis: any /** TODO #9100 */;\n\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\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/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (master)\n * - packages/core/src/render3/jit/compiler_facade_interface.ts (copy)\n *\n * Please ensure that the two files are in sync using this command:\n * ```\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/render3/jit/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade { ɵcompilerFacade: CompilerFacade; }\n\nexport interface CompilerFacade {\n compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n compileBase(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3BaseMetadataFacade):\n any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n R3ResolvedDependencyType: typeof R3ResolvedDependencyType;\n ResourceLoader: {new (): ResourceLoader};\n}\n\nexport interface CoreEnvironment { [name: string]: Function; }\n\nexport type ResourceLoader = {\n get(url: string): Promise<string>| string;\n};\n\nexport type StringMap = {\n [key: string]: string;\n};\n\nexport type StringMapWithRename = {\n [key: string]: string | [string, string];\n};\n\nexport type Provider = any;\n\nexport enum R3ResolvedDependencyType {\n Token = 0,\n Attribute = 1,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: any;\n resolved: R3ResolvedDependencyType;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n pipeName: string;\n deps: R3DependencyMetadataFacade[]|null;\n pure: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n ctorDeps: R3DependencyMetadataFacade[]|null;\n providedIn: any;\n useClass?: any;\n useFactory?: any;\n useExisting?: any;\n useValue?: any;\n userDeps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: any;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n emitInline: boolean;\n schemas: {name: string}[]|null;\n id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: any;\n deps: R3DependencyMetadataFacade[]|null;\n providers: any[];\n imports: any[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n typeSourceSpan: ParseSourceSpan;\n deps: R3DependencyMetadataFacade[]|null;\n selector: string|null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: any[]};\n lifecycle: {usesOnChanges: boolean;};\n inputs: string[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[]|null;\n providers: Provider[]|null;\n viewQueries: R3QueryMetadataFacade[];\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: any[]|undefined;\n pipes: Map<string, any>;\n directives: {selector: string, expression: any}[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[]|null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3BaseMetadataFacade {\n name: string;\n propMetadata: {[key: string]: any[]};\n inputs?: {[key: string]: string | [string, string]};\n outputs?: {[key: string]: string};\n queries?: R3QueryMetadataFacade[];\n viewQueries?: R3QueryMetadataFacade[];\n}\n\nexport type ViewEncapsulation = number;\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: any|string[];\n descendants: boolean;\n read: any|null;\n static: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\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 */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport function getCompilerFacade(): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (!globalNg || !globalNg.ɵcompilerFacade) {\n throw new Error(\n `Angular JIT compilation failed: '@angular/compiler' not loaded!\\n` +\n ` - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n` +\n ` - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n` +\n ` - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`);\n }\n return globalNg.ɵcompilerFacade;\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\nimport {Type} from '../interface/type';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ngInjectableDef: never|undefined;\n\n constructor(protected _desc: string, options?: {\n providedIn?: Type<any>| 'root' | null,\n factory: () => T\n }) {\n this.ngInjectableDef = undefined;\n if (typeof options == 'number') {\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.\n // We are using it to assign `-1` which is used to identify `Injector`.\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ngInjectableDef = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n toString(): string { return `InjectionToken ${this._desc}`; }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> { ngInjectableDef: never; }\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\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {getInjectableDef, ɵɵInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\n\n\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n 'INJECTOR',\n -1 as any // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n );\n\nconst _THROW_IF_NOT_FOUND = new Object();\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\nexport const USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector|undefined|null = undefined;\n\nexport function setCurrentInjector(injector: Injector | null | undefined): Injector|undefined|null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation: (<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags) => T | null)|\n undefined;\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null) | undefined):\n (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null)|undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>): T;\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|\n null;\nexport function injectInjectorOnly<T>(\n token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n if (_currentInjector === undefined) {\n throw new Error(`inject() must be called from an injection context`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n }\n}\n\n/**\n * Generated instruction: Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this instruction)\n *\n * @see inject\n * @codeGenApi\n */\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|\n null {\n return (_injectImplementation || injectInjectorOnly)(token, flags);\n}\n\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns True if injection is successful, null otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport const inject = ɵɵinject;\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\nexport function injectRootLimpMode<T>(\n token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {\n const injectableDef: ɵɵInjectableDef<T>|null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throw new Error(`Injector: NOT_FOUND [${stringify(token)}]`);\n}\n\nexport function injectArgs(types: (Type<any>| InjectionToken<any>| any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n let type: Type<any>|undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {\n flags |= InjectFlags.Optional;\n } else if (\n meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n flags |= InjectFlags.SkipSelf;\n } else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n flags |= InjectFlags.Self;\n } else if (meta instanceof Inject || meta === Inject) {\n type = meta.token;\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type !, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n // reason why correctly written application should cause this exception.\n // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n // if(ngDevMode) debugger;\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n\nexport function catchInjectorError(\n e: any, token: any, injectorErrorName: string, source: string | null): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string, obj: any, injectorErrorName: string, source: string | null = null): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n let context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\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\nimport {Type} from '../../interface/type';\nimport {ɵɵinject} from '../injector_compatibility';\nimport {getInjectableDef, getInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵgetFactoryOf': getFactoryOf,\n};\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T)|null {\n const typeAny = type as any;\n const def = getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\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 * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiatable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function { prototype: T; }\n\nexport interface Type<T> extends Function { new (...args: any[]): T; }\n\nexport type Mutable<T extends{[x: string]: any}, K extends string> = {\n [P in K]: T[P];\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\nimport {Type, isType} from '../interface/type';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\nimport {stringify} from '../util/stringify';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\n\n\n/**\n * Attention: These regex has to hold even if the code is minified!\n */\nexport const DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nexport const INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\nexport const INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\nexport const INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s+super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n return DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (INHERITED_CLASS.test(typeStr) && !INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) { this._reflect = reflect || global['Reflect']; }\n\n isReflectionEnabled(): boolean { return true; }\n\n factory<T>(t: Type<T>): (args: any[]) => T { return (...args: any[]) => new t(...args); }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n } else {\n result = new Array(paramTypes.length);\n }\n\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n\n private _ownParameters(type: Type<any>, parentCtor: any): any[][]|null {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n\n // Prefer the direct API.\n if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n return (<any>type).parameters;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = (<any>type).ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters =\n typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(\n (ctorParam: any) =>\n ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return new Array((<any>type.length)).fill(undefined);\n }\n\n parameters(type: Type<any>): any[][] {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n\n private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[]|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n let annotations = (<any>typeOrFunc).annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return (typeOrFunc as any)[ANNOTATIONS];\n }\n return null;\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n\n private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]}|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).propMetadata &&\n (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata) {\n let propMetadata = (<any>typeOrFunc).propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).propDecorators &&\n (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators) {\n const propDecorators = (<any>typeOrFunc).propDecorators;\n const propMetadata = <{[key: string]: any[]}>{};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return (typeOrFunc as any)[PROP_METADATA];\n }\n return null;\n }\n\n propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata: {[key: string]: any[]} = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators: any[] = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return type instanceof Type && lcProperty in type.prototype;\n }\n\n guards(type: any): {[key: string]: any} { return {}; }\n\n getter(name: string): GetterFn { return <GetterFn>new Function('o', 'return o.' + name + ';'); }\n\n setter(name: string): SetterFn {\n return <SetterFn>new Function('o', 'v', 'return o.' + name + ' = v;');\n }\n\n method(name: string): MethodFn {\n const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n return o.${name}.apply(o, args);`;\n return <MethodFn>new Function('o', 'args', functionBody);\n }\n\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n importUri(type: any): string {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return `./${stringify(type)}`;\n }\n\n resourceUri(type: any): string { return `./${stringify(type)}`; }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return runtime;\n }\n resolveEnum(enumIdentifier: any, name: string): any { return enumIdentifier[name]; }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\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\nimport {CompilerFacade, R3DependencyMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Attribute, Host, Inject, Optional, Self, SkipSelf} from '../metadata';\n\nlet _reflect: ReflectionCapabilities|null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n const compiler = getCompilerFacade();\n return deps.map(dep => reflectDependency(compiler, dep));\n}\n\nfunction reflectDependency(compiler: CompilerFacade, dep: any | any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n host: false,\n optional: false,\n resolved: compiler.R3ResolvedDependencyType.Token,\n self: false,\n skipSelf: false,\n };\n\n function setTokenAndResolvedType(token: any): void {\n meta.resolved = compiler.R3ResolvedDependencyType.Token;\n meta.token = token;\n }\n\n if (Array.isArray(dep)) {\n if (dep.length === 0) {\n throw new Error('Dependency array must have arguments.');\n }\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n } else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || param.__proto__.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || param.__proto__.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(`Attribute name must be defined.`);\n }\n meta.token = param.attributeName;\n meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n } else {\n setTokenAndResolvedType(param);\n }\n }\n } else {\n setTokenAndResolvedType(dep);\n }\n return meta;\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\nimport {R3InjectableMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {Injectable} from '../injectable';\nimport {NG_INJECTABLE_DEF} from '../interface/defs';\nimport {ClassSansProvider, ExistingSansProvider, FactorySansProvider, ValueProvider, ValueSansProvider} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * `ngInjectableDef` onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, srcMeta?: Injectable): void {\n let def: any = null;\n\n // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it\n if (type.hasOwnProperty(NG_INJECTABLE_DEF)) return;\n\n Object.defineProperty(type, NG_INJECTABLE_DEF, {\n get: () => {\n if (def === null) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const hasAProvider = isUseClassProvider(meta) || isUseFactoryProvider(meta) ||\n isUseValueProvider(meta) || isUseExistingProvider(meta);\n\n\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n ctorDeps: reflectDependencies(type),\n userDeps: undefined,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.userDeps = convertDependencies(meta.deps);\n }\n if (!hasAProvider) {\n // In the case the user specifies a type provider, treat it as {provide: X, useClass: X}.\n // The deps will have been reflected above, causing the factory to create the class by\n // calling\n // its constructor with injected deps.\n compilerMeta.useClass = type;\n } else if (isUseClassProvider(meta)) {\n // The user explicitly specified useClass, and may or may not have provided deps.\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n // The user explicitly specified useValue.\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n // The user explicitly specified useFactory.\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n // The user explicitly specified useExisting.\n compilerMeta.useExisting = meta.useExisting;\n } else {\n // Can't happen - either hasAProvider will be false, or one of the providers will be set.\n throw new Error(`Unreachable state.`);\n }\n def = getCompilerFacade().compileInjectable(\n angularCoreDiEnv, `ng:///${type.name}/ngInjectableDef.js`, compilerMeta);\n }\n return def;\n },\n });\n}\n\ntype UseClassProvider = Injectable & ClassSansProvider & {deps?: any[]};\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable&ValueSansProvider {\n return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable&FactorySansProvider {\n return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable&ExistingSansProvider {\n return (meta as ExistingSansProvider).useExisting !== undefined;\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\nimport {Type} from '../interface/type';\nimport {ReflectionCapabilities} from '../reflection/reflection_capabilities';\nimport {getClosureSafeProperty} from '../util/property';\n\nimport {injectArgs, ɵɵinject} from './injector_compatibility';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\nconst EMPTY_ARRAY: any[] = [];\n\nexport function convertInjectableProviderToFactory(\n type: Type<any>, provider?: ValueSansProvider | ExistingSansProvider | StaticClassSansProvider |\n ConstructorSansProvider | FactorySansProvider | ClassSansProvider): () => any {\n if (!provider) {\n const reflectionCapabilities = new ReflectionCapabilities();\n const deps = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return () => new type(...injectArgs(deps as any[]));\n }\n\n if (USE_VALUE in provider) {\n const valueProvider = (provider as ValueSansProvider);\n return () => valueProvider.useValue;\n } else if ((provider as ExistingSansProvider).useExisting) {\n const existingProvider = (provider as ExistingSansProvider);\n return () => ɵɵinject(existingProvider.useExisting);\n } else if ((provider as FactorySansProvider).useFactory) {\n const factoryProvider = (provider as FactorySansProvider);\n return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n } else if ((provider as StaticClassSansProvider | ClassSansProvider).useClass) {\n const classProvider = (provider as StaticClassSansProvider | ClassSansProvider);\n let deps = (provider as StaticClassSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new classProvider.useClass(...injectArgs(deps));\n } else {\n let deps = (provider as ConstructorSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new type(...injectArgs(deps !));\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\nimport {Type} from '../interface/type';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\nimport {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable as render3CompileInjectable} from './jit/injectable';\nimport {convertInjectableProviderToFactory} from './util';\n\n\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider | ExistingSansProvider |\n StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n /**\n * Decorator that marks a class as available to `Injector` for creation.\n *\n * @see [Introduction to Services and DI](guide/architecture-services)\n * @see [Dependency Injection Guide](guide/dependency-injection)\n *\n * @usageNotes\n *\n * The following example shows how service classes are properly marked as\n * injectable.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"\n * linenums=\"false\"></code-example>\n *\n */\n (): TypeDecorator;\n (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): TypeDecorator;\n new (): Injectable;\n new (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n /**\n * Determines which injectors will provide the injectable,\n * by either associating it with an @NgModule or other `InjectorType`,\n * or by specifying that this injectable should be provided in the\n * 'root' injector, which will be the application-level injector in most apps.\n */\n providedIn?: Type<any>|'root'|null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n 'Injectable', undefined, undefined, undefined,\n (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));\n\n/**\n * Type representing injectable service.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> { ngInjectableDef: ɵɵInjectableDef<T>; }\n\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(\n injectableType: InjectableType<any>,\n options: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n injectableType.ngInjectableDef = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\n\nexport const SWITCH_COMPILE_INJECTABLE__POST_R3__ = render3CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE: typeof render3CompileInjectable =\n SWITCH_COMPILE_INJECTABLE__PRE_R3__;\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\nimport {global} from './global';\n\ndeclare global {\n const ngDevMode: null|NgDevModePerfCounters;\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstTemplatePass: number;\n tNode: number;\n tView: number;\n rendererCreateTextNode: number;\n rendererSetText: number;\n rendererCreateElement: number;\n rendererAddEventListener: number;\n rendererSetAttribute: number;\n rendererRemoveAttribute: number;\n rendererSetProperty: number;\n rendererSetClassName: number;\n rendererAddClass: number;\n rendererRemoveClass: number;\n rendererSetStyle: number;\n rendererRemoveStyle: number;\n rendererDestroy: number;\n rendererDestroyNode: number;\n rendererMoveNode: number;\n rendererRemoveNode: number;\n rendererAppendChild: number;\n rendererInsertBefore: number;\n rendererCreateComment: number;\n styleMap: number;\n styleMapCacheMiss: number;\n classMap: number;\n classMapCacheMiss: number;\n stylingProp: number;\n stylingPropCacheMiss: number;\n stylingApply: number;\n stylingApplyCacheMiss: number;\n }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters: NgDevModePerfCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstTemplatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n styleMap: 0,\n styleMapCacheMiss: 0,\n classMap: 0,\n classMapCacheMiss: 0,\n stylingProp: 0,\n stylingPropCacheMiss: 0,\n stylingApply: 0,\n stylingApplyCacheMiss: 0,\n };\n\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n\n/**\n * This checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * NOTE: changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n ngDevModeResetPerfCounters();\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 */\nimport {InjectorType} from '../di/interface/defs';\nimport {stringify} from '../util/stringify';\n\nimport {TNode} from './interfaces/node';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: any): never {\n throw new Error(`Cannot instantiate cyclic dependency! ${token}`);\n}\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(tNode: TNode): never {\n throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean, oldValue: any, currValue: any): never|void {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n if (creationMode) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n // TODO: include debug context\n throw new Error(msg);\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: InjectorType<any>, providers?: any[], provider?: any) {\n let ngModuleDetail = '';\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n ngModuleDetail =\n ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n }\n\n throw new Error(\n `Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\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\nimport {InjectionToken} from './injection_token';\n\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const APP_ROOT = new InjectionToken<boolean>(\n 'The presence of this token marks an injector as being the root injector.');\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\nimport '../util/ng_dev_mode';\n\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility';\nimport {InjectorType, InjectorTypeWithProviders, getInheritedInjectableDef, getInjectableDef, getInjectorDef, ɵɵInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {APP_ROOT} from './scope';\n\n\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\ntype SingleProvider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider |\n ExistingProvider | FactoryProvider | StaticClassProvider;\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\nconst EMPTY_ARRAY = [] as any[];\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nfunction getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: (() => T)|undefined;\n value: T|{};\n multi: any[]|undefined;\n}\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any, parent: Injector | null = null,\n additionalProviders: StaticProvider[] | null = null, name?: string): Injector {\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent, name);\n}\n\nexport class R3Injector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n */\n private records = new Map<Type<any>|InjectionToken<any>, Record<any>>();\n\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n private injectorDefTypes = new Set<InjectorType<any>>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private onDestroy = new Set<OnDestroy>();\n\n /**\n * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the\n * root scope.\n */\n private readonly isRootInjector: boolean;\n\n readonly source: string|null;\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean { return this._destroyed; }\n private _destroyed = false;\n\n constructor(\n def: InjectorType<any>, additionalProviders: StaticProvider[]|null, readonly parent: Injector,\n source: string|null = null) {\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n const dedupStack: InjectorType<any>[] = [];\n deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n\n additionalProviders && deepForEach(\n additionalProviders, provider => this.processProvider(\n provider, def, additionalProviders));\n\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n this.isRootInjector = this.records.has(APP_ROOT);\n\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(defType => this.get(defType));\n\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy(): void {\n this.assertNotDestroyed();\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n } finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }\n\n get<T>(\n token: Type<T>|InjectionToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n flags = InjectFlags.Default): T {\n this.assertNotDestroyed();\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T>|undefined = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== undefined) {\n return this.hydrate(token, record);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n return nextInjector.get(token, flags & InjectFlags.Optional ? null : notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this.records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n private assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n }\n\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n private processInjectorType(\n defOrWrappedDef: InjectorType<any>|InjectorTypeWithProviders<any>,\n parents: InjectorType<any>[],\n dedupStack: InjectorType<any>[]): defOrWrappedDef is InjectorTypeWithProviders<any> {\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef) return false;\n\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n\n // First attempt to read the ngInjectorDef.\n let def = getInjectorDef(defOrWrappedDef);\n\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n const ngModule =\n (def == null) && (defOrWrappedDef as InjectorTypeWithProviders<any>).ngModule || undefined;\n\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n const defType: InjectorType<any> =\n (ngModule === undefined) ? (defOrWrappedDef as InjectorType<any>) : ngModule;\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n throw new Error(\n `Circular dependency in DI detected for type ${defName}. Dependency path: ${parents.map(defType => stringify(defType)).join(' > ')} > ${defName}.`);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedupStack.indexOf(defType) !== -1;\n\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory, NOT_YET));\n\n // Add providers in the same way that @NgModule resolution did:\n\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n\n let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n try {\n deepForEach(def.imports, imported => {\n if (this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders === undefined) importTypesWithProviders = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n for (let i = 0; i < importTypesWithProviders.length; i++) {\n const {ngModule, providers} = importTypesWithProviders[i];\n deepForEach(\n providers !,\n provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n }\n }\n }\n\n // Next, include providers listed on the definition itself.\n const defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = defOrWrappedDef as InjectorType<any>;\n deepForEach(\n defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n }\n\n return (\n ngModule !== undefined &&\n (defOrWrappedDef as InjectorTypeWithProviders<any>).providers !== undefined);\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any =\n isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider, ngModuleType, providers);\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord !.multi !);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi !.push(provider);\n } else {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: Type<T>|InjectionToken<T>, record: Record<T>): T {\n if (record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory !();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value as T;\n }\n\n private injectableDefInScope(def: ɵɵInjectableDef<any>): boolean {\n if (!def.providedIn) {\n return false;\n } else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n } else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: Type<any>| InjectionToken<any>): () => any {\n // Most tokens will have an ngInjectableDef directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n if (injectableDef !== null) {\n return injectableDef.factory;\n }\n\n // If the token is an NgModule, it's also injectable but the factory is on its ngInjectorDef.\n const injectorDef = getInjectorDef(token);\n if (injectorDef !== null) {\n return injectorDef.factory;\n }\n\n // InjectionTokens should have an ngInjectableDef and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(`Token ${stringify(token)} is missing an ngInjectableDef definition.`);\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args: string[] = new Array(paramLength).fill('?');\n throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an ngInjectableDef\n // from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): Record<any> {\n let factory: (() => any)|undefined = providerToFactory(provider, ngModuleType, providers);\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any {\n let factory: (() => any)|undefined = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n } else {\n return injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nfunction makeRecord<T>(\n factory: (() => T) | undefined, value: T | {}, multi: boolean = false): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nfunction isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nfunction isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n\nfunction hasDeps(value: ClassProvider | ConstructorProvider | StaticClassProvider):\n value is ClassProvider&{deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return value !== null && typeof value === 'object' &&\n typeof(value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is Type<any>|InjectionToken<any> {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\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\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, formatError, ɵɵinject} from './injector_compatibility';\nimport {ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {createInjector} from './r3_injector';\n\nexport function INJECTOR_IMPL__PRE_R3__(\n providers: StaticProvider[], parent: Injector | undefined, name: string) {\n return new StaticInjector(providers, parent, name);\n}\n\nexport function INJECTOR_IMPL__POST_R3__(\n providers: StaticProvider[], parent: Injector | undefined, name: string) {\n return createInjector({name: name}, parent, providers, name);\n}\n\nexport const INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n\n/**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = new NullInjector();\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use Type<T> or InjectionToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n static create(\n options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n parent?: Injector): Injector {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n } else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n }\n\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any' as any,\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = -1;\n}\n\n\n\nconst IDENT = function<T>(value: T): T {\n return value;\n};\nconst EMPTY = <any[]>[];\nconst CIRCULAR = IDENT;\nconst MULTI_PROVIDER_FN = function(): any[] {\n return Array.prototype.slice.call(arguments);\n};\n\nconst enum OptionFlags {\n Optional = 1 << 0,\n CheckSelf = 1 << 1,\n CheckParent = 1 << 2,\n Default = CheckSelf | CheckParent\n}\nconst NO_NEW_LINE = 'ɵ';\n\nexport class StaticInjector implements Injector {\n readonly parent: Injector;\n readonly source: string|null;\n\n private _records: Map<any, Record>;\n\n constructor(\n providers: StaticProvider[], parent: Injector = Injector.NULL, source: string|null = null) {\n this.parent = parent;\n this.source = source;\n const records = this._records = new Map<any, Record>();\n records.set(\n Injector, <Record>{token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n records.set(\n INJECTOR, <Record>{token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n recursivelyProcessProviders(records, providers);\n }\n\n get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags: InjectFlags = InjectFlags.Default): any {\n const record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n } catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this._records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `StaticInjector[${tokens.join(', ')}]`;\n }\n}\n\ntype SupportedProvider =\n ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider;\n\ninterface Record {\n fn: Function;\n useNew: boolean;\n deps: DependencyRecord[];\n value: any;\n}\n\ninterface DependencyRecord {\n token: any;\n options: number;\n}\n\nfunction resolveProvider(provider: SupportedProvider): Record {\n const deps = computeDeps(provider);\n let fn: Function = IDENT;\n let value: any = EMPTY;\n let useNew: boolean = false;\n let provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = (provider as ValueProvider).useValue;\n } else if ((provider as FactoryProvider).useFactory) {\n fn = (provider as FactoryProvider).useFactory;\n } else if ((provider as ExistingProvider).useExisting) {\n // Just use IDENT\n } else if ((provider as StaticClassProvider).useClass) {\n useNew = true;\n fn = resolveForwardRef((provider as StaticClassProvider).useClass);\n } else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n } else {\n throw staticError(\n 'StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable',\n provider);\n }\n return {deps, fn, useNew, value};\n}\n\nfunction multiProviderMixError(token: any) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records: Map<any, Record>, provider: StaticProvider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (let i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\n }\n } else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n } else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n let token = resolveForwardRef(provider.provide);\n const resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n let multiProvider: Record|undefined = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n } else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = <Record>{\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({token, options: OptionFlags.Default});\n }\n const record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n } else {\n throw staticError('Unexpected provider', provider);\n }\n }\n}\n\nfunction tryResolveToken(\n token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n } catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\n\nfunction resolveToken(\n token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n let value;\n if (record && !(flags & InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n } else if (value === EMPTY) {\n record.value = CIRCULAR;\n let obj = undefined;\n let useNew = record.useNew;\n let fn = record.fn;\n let depRecords = record.deps;\n let deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (let i = 0; i < depRecords.length; i++) {\n const depRecord: DependencyRecord = depRecords[i];\n const options = depRecord.options;\n const childRecord =\n options & OptionFlags.CheckSelf ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token,\n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord,\n // Other records we know about.\n records,\n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & OptionFlags.CheckParent) ? Injector.NULL : parent,\n options & OptionFlags.Optional ? null : Injector.THROW_IF_NOT_FOUND,\n InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new (fn as any)(...deps) : fn.apply(obj, deps);\n }\n } else if (!(flags & InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, InjectFlags.Default);\n }\n return value;\n}\n\nfunction computeDeps(provider: StaticProvider): DependencyRecord[] {\n let deps: DependencyRecord[] = EMPTY;\n const providerDeps: any[] =\n (provider as ExistingProvider & StaticClassProvider & ConstructorProvider).deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (let i = 0; i < providerDeps.length; i++) {\n let options = OptionFlags.Default;\n let token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (let j = 0, annotations = token; j < annotations.length; j++) {\n const annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | OptionFlags.Optional;\n } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~OptionFlags.CheckSelf;\n } else if (annotation instanceof Self || annotation == Self) {\n options = options & ~OptionFlags.CheckParent;\n } else if (annotation instanceof Inject) {\n token = (annotation as Inject).token;\n } else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({token, options});\n }\n } else if ((provider as ExistingProvider).useExisting) {\n const token = resolveForwardRef((provider as ExistingProvider).useExisting);\n deps = [{token, options: OptionFlags.Default}];\n } else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\n\nfunction staticError(text: string, obj: any): Error {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\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\nexport const ERROR_TYPE = 'ngType';\nexport const ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nexport const ERROR_LOGGER = 'ngErrorLogger';\n\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg =\n `${message} caused by: ${originalError instanceof Error ? originalError.message: originalError }`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\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\nimport {Type} from '../interface/type';\nimport {ERROR_ORIGINAL_ERROR, wrappedError} from '../util/errors';\nimport {stringify} from '../util/stringify';\n\nimport {ReflectiveInjector} from './reflective_injector';\nimport {ReflectiveKey} from './reflective_key';\n\nfunction findFirstClosedCycle(keys: any[]): any[] {\n const res: any[] = [];\n for (let i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\n\nfunction constructResolvingPath(keys: any[]): string {\n if (keys.length > 1) {\n const reversed = findFirstClosedCycle(keys.slice().reverse());\n const tokenStrs = reversed.map(k => stringify(k.token));\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n\n return '';\n}\n\nexport interface InjectionError extends Error {\n keys: ReflectiveKey[];\n injectors: ReflectiveInjector[];\n constructResolvingMessage: (keys: ReflectiveKey[]) => string;\n addKey(injector: ReflectiveInjector, key: ReflectiveKey): void;\n}\n\nfunction injectionError(\n injector: ReflectiveInjector, key: ReflectiveKey,\n constructResolvingMessage: (keys: ReflectiveKey[]) => string,\n originalError?: Error): InjectionError {\n const keys = [key];\n const errMsg = constructResolvingMessage(keys);\n const error =\n (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError;\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nfunction addKey(this: InjectionError, injector: ReflectiveInjector, key: ReflectiveKey): void {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nexport function noProviderError(injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `No provider for ${first}!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nexport function cyclicDependencyError(\n injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nexport function instantiationError(\n injector: ReflectiveInjector, originalException: any, originalStack: any,\n key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n }, originalException);\n}\n\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nexport function invalidProviderError(provider: any) {\n return Error(\n `Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nexport function noAnnotationError(typeOrFunc: Type<any>| Function, params: any[][]): Error {\n const signature: string[] = [];\n for (let i = 0, ii = params.length; i < ii; i++) {\n const parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n } else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error(\n 'Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nexport function outOfBoundsError(index: number) {\n return Error(`Index ${index} is out-of-bounds.`);\n}\n\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nexport function mixingMultiProvidersWithRegularProvidersError(\n provider1: any, provider2: any): Error {\n return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\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\nimport {stringify} from '../util/stringify';\nimport {resolveForwardRef} from './forward_ref';\n\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nexport class ReflectiveKey {\n public readonly displayName: string;\n /**\n * Private\n */\n constructor(public token: Object, public id: number) {\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n\n /**\n * Retrieves a `Key` for a token.\n */\n static get(token: Object): ReflectiveKey {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n }\n\n /**\n * @returns the number of keys registered in the system.\n */\n static get numberOfKeys(): number { return _globalKeyRegistry.numberOfKeys; }\n}\n\nexport class KeyRegistry {\n private _allKeys = new Map<Object, ReflectiveKey>();\n\n get(token: Object): ReflectiveKey {\n if (token instanceof ReflectiveKey) return token;\n\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token) !;\n }\n\n const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n }\n\n get numberOfKeys(): number { return this._allKeys.size; }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\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\nimport {Type} from '../interface/type';\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\nexport {PlatformReflectionCapabilities};\nexport {GetterFn, MethodFn, SetterFn};\n\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nexport class Reflector {\n constructor(public reflectionCapabilities: PlatformReflectionCapabilities) {}\n\n updateCapabilities(caps: PlatformReflectionCapabilities) { this.reflectionCapabilities = caps; }\n\n factory(type: Type<any>): Function { return this.reflectionCapabilities.factory(type); }\n\n parameters(typeOrFunc: Type<any>): any[][] {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n }\n\n propMetadata(typeOrFunc: Type<any>): {[key: string]: any[]} {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n }\n\n getter(name: string): GetterFn { return this.reflectionCapabilities.getter(name); }\n\n setter(name: string): SetterFn { return this.reflectionCapabilities.setter(name); }\n\n method(name: string): MethodFn { return this.reflectionCapabilities.method(name); }\n\n importUri(type: any): string { return this.reflectionCapabilities.importUri(type); }\n\n resourceUri(type: any): string { return this.reflectionCapabilities.resourceUri(type); }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n }\n\n resolveEnum(identifier: any, name: string): any {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\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\nimport {ReflectionCapabilities} from './reflection_capabilities';\nimport {Reflector} from './reflector';\n\nexport {Reflector} from './reflector';\n\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nexport const reflector = new Reflector(new ReflectionCapabilities());\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\nimport {Type} from '../interface/type';\nimport {reflector} from '../reflection/reflection';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {invalidProviderError, mixingMultiProvidersWithRegularProvidersError, noAnnotationError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\n\n\ninterface NormalizedProvider extends TypeProvider, ValueProvider, ClassProvider, ExistingProvider,\n FactoryProvider {}\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nexport class ReflectiveDependency {\n constructor(\n public key: ReflectiveKey, public optional: boolean, public visibility: Self|SkipSelf|null) {}\n\n static fromKey(key: ReflectiveKey): ReflectiveDependency {\n return new ReflectiveDependency(key, false, null);\n }\n}\n\nconst _EMPTY_LIST: any[] = [];\n\n/**\n * An internal resolved representation of a `Provider` used by the `Injector`.\n *\n * @usageNotes\n * This is usually created automatically by `Injector.resolveAndCreate`.\n *\n * It can be created manually, as follows:\n *\n * ### Example\n *\n * ```typescript\n * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);\n * var injector = Injector.fromResolvedProviders(resolvedProviders);\n *\n * expect(injector.get('message')).toEqual('Hello');\n * ```\n *\n * @publicApi\n */\nexport interface ResolvedReflectiveProvider {\n /**\n * A key, usually a `Type<any>`.\n */\n key: ReflectiveKey;\n\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n resolvedFactories: ResolvedReflectiveFactory[];\n\n /**\n * Indicates if the provider is a multi-provider or a regular provider.\n */\n multiProvider: boolean;\n}\n\nexport class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {\n readonly resolvedFactory: ResolvedReflectiveFactory;\n\n constructor(\n public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],\n public multiProvider: boolean) {\n this.resolvedFactory = this.resolvedFactories[0];\n }\n}\n\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nexport class ResolvedReflectiveFactory {\n constructor(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n public factory: Function,\n\n /**\n * Arguments (dependencies) to the `factory` function.\n */\n public dependencies: ReflectiveDependency[]) {}\n}\n\n\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider: NormalizedProvider): ResolvedReflectiveFactory {\n let factoryFn: Function;\n let resolvedDeps: ReflectiveDependency[];\n if (provider.useClass) {\n const useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n } else if (provider.useExisting) {\n factoryFn = (aliasInstance: any) => aliasInstance;\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n } else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n } else {\n factoryFn = () => provider.useValue;\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider: NormalizedProvider): ResolvedReflectiveProvider {\n return new ResolvedReflectiveProvider_(\n ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)],\n provider.multi || false);\n}\n\n/**\n * Resolve a list of Providers.\n */\nexport function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[] {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nexport function mergeResolvedReflectiveProviders(\n providers: ResolvedReflectiveProvider[],\n normalizedProvidersMap: Map<number, ResolvedReflectiveProvider>):\n Map<number, ResolvedReflectiveProvider> {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider: ResolvedReflectiveProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(\n provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(providers: Provider[], res: Provider[]): Provider[] {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({provide: b, useClass: b});\n\n } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n res.push(b as NormalizedProvider);\n\n } else if (b instanceof Array) {\n _normalizeProviders(b, res);\n\n } else {\n throw invalidProviderError(b);\n }\n });\n\n return res;\n}\n\nexport function constructDependencies(\n typeOrFunc: any, dependencies?: any[]): ReflectiveDependency[] {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n } else {\n const params: any[][] = dependencies.map(t => [t]);\n return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n }\n}\n\nfunction _dependenciesFor(typeOrFunc: any): ReflectiveDependency[] {\n const params = reflector.parameters(typeOrFunc);\n\n if (!params) return [];\n if (params.some(p => p == null)) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(p => _extractToken(typeOrFunc, p, params));\n}\n\nfunction _extractToken(\n typeOrFunc: any, metadata: any[] | any, params: any[][]): ReflectiveDependency {\n let token: any = null;\n let optional = false;\n\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n } else {\n return _createDependency(metadata, optional, null);\n }\n }\n\n let visibility: Self|SkipSelf|null = null;\n\n for (let i = 0; i < metadata.length; ++i) {\n const paramMetadata = metadata[i];\n\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n\n } else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n\n } else if (paramMetadata instanceof Optional) {\n optional = true;\n\n } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n } else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n\n token = resolveForwardRef(token);\n\n if (token != null) {\n return _createDependency(token, optional, visibility);\n } else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\n\nfunction _createDependency(\n token: any, optional: boolean, visibility: Self | SkipSelf | null): ReflectiveDependency {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\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\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\nimport {Provider} from './interface/provider';\nimport {Self, SkipSelf} from './metadata';\nimport {cyclicDependencyError, instantiationError, noProviderError, outOfBoundsError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\nimport {ReflectiveDependency, ResolvedReflectiveFactory, ResolvedReflectiveProvider, resolveReflectiveProviders} from './reflective_provider';\n\n\n// Threshold for the dynamic version\nconst UNDEFINED = new Object();\n\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nexport abstract class ReflectiveInjector implements Injector {\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n static resolve(providers: Provider[]): ResolvedReflectiveProvider[] {\n return resolveReflectiveProviders(providers);\n }\n\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n }\n\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):\n ReflectiveInjector {\n return new ReflectiveInjector_(providers, parent);\n }\n\n\n /**\n * Parent of this injector.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n */\n abstract get parent(): Injector|null;\n\n /**\n * Resolves an array of providers and creates a child injector from those providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);\n * var child = parent.resolveAndCreateChild([ChildProvider]);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;\n\n /**\n * Creates a child injector from previously resolved providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);\n * var childProviders = ReflectiveInjector.resolve([ChildProvider]);\n *\n * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);\n * var child = parent.createChildFromResolved(childProviders);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;\n\n /**\n * Resolves a provider and instantiates an object in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n *\n * var car = injector.resolveAndInstantiate(Car);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.resolveAndInstantiate(Car));\n * ```\n */\n abstract resolveAndInstantiate(provider: Provider): any;\n\n /**\n * Instantiates an object using a resolved provider in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n * var carProvider = ReflectiveInjector.resolve([Car])[0];\n * var car = injector.instantiateResolved(carProvider);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.instantiateResolved(carProvider));\n * ```\n */\n abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;\n\n abstract get(token: any, notFoundValue?: any): any;\n}\n\nexport class ReflectiveInjector_ implements ReflectiveInjector {\n private static INJECTOR_KEY = ReflectiveKey.get(Injector);\n /** @internal */\n _constructionCounter: number = 0;\n /** @internal */\n public _providers: ResolvedReflectiveProvider[];\n public readonly parent: Injector|null;\n\n keyIds: number[];\n objs: any[];\n /**\n * Private\n */\n constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector) {\n this._providers = _providers;\n this.parent = _parent || null;\n\n const len = _providers.length;\n\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n\n for (let i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n }\n\n resolveAndCreateChild(providers: Provider[]): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n }\n\n createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {\n const inj = new ReflectiveInjector_(providers);\n (inj as{parent: Injector | null}).parent = this;\n return inj;\n }\n\n resolveAndInstantiate(provider: Provider): any {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n }\n\n instantiateResolved(provider: ResolvedReflectiveProvider): any {\n return this._instantiateProvider(provider);\n }\n\n getProviderAtIndex(index: number): ResolvedReflectiveProvider {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n }\n\n /** @internal */\n _new(provider: ResolvedReflectiveProvider): any {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n }\n\n private _getMaxNumberOfObjects(): number { return this.objs.length; }\n\n private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n if (provider.multiProvider) {\n const res = new Array(provider.resolvedFactories.length);\n for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n } else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n }\n\n private _instantiate(\n provider: ResolvedReflectiveProvider,\n ResolvedReflectiveFactory: ResolvedReflectiveFactory): any {\n const factory = ResolvedReflectiveFactory.factory;\n\n let deps: any[];\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n } catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n\n let obj: any;\n try {\n obj = factory(...deps);\n } catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n\n return obj;\n }\n\n private _getByReflectiveDependency(dep: ReflectiveDependency): any {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n }\n\n private _getByKey(key: ReflectiveKey, visibility: Self|SkipSelf|null, notFoundValue: any): any {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n\n } else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n }\n\n private _getObjByKeyId(keyId: number): any {\n for (let i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n\n return this.objs[i];\n }\n }\n\n return UNDEFINED;\n }\n\n /** @internal */\n _throwOrNull(key: ReflectiveKey, notFoundValue: any): any {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n } else {\n throw noProviderError(this, key);\n }\n }\n\n /** @internal */\n _getByKeySelf(key: ReflectiveKey, notFoundValue: any): any {\n const obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n }\n\n /** @internal */\n _getByKeyDefault(key: ReflectiveKey, notFoundValue: any, visibility: Self|SkipSelf|null): any {\n let inj: Injector|null;\n\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n } else {\n inj = this;\n }\n\n while (inj instanceof ReflectiveInjector_) {\n const inj_ = <ReflectiveInjector_>inj;\n const obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED) return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n } else {\n return this._throwOrNull(key, notFoundValue);\n }\n }\n\n get displayName(): string {\n const providers =\n _mapProviders(this, (b: ResolvedReflectiveProvider) => ' \"' + b.key.displayName + '\" ')\n .join(', ');\n return `ReflectiveInjector(providers: [${providers}])`;\n }\n\n toString(): string { return this.displayName; }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n const res: any[] = new Array(injector._providers.length);\n for (let i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\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\nimport {InjectionToken} from '../di/injection_token';\nimport {Type} from '../interface/type';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n */\nexport const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` as in the following example.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'\n * linenums=\"false\"}\n *\n * @publicApi\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute to be injected into the constructor.\n */\n attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n descendants: boolean;\n first: boolean;\n read: any;\n isViewQuery: boolean;\n selector: any;\n static: boolean;\n}\n\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see `ContentChildren`.\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n /**\n * Parameter decorator that configures a content query.\n *\n * Use to get the `QueryList` of elements or directives from the content DOM.\n * Any time a child element is added, removed, or moved, the query list will be\n * updated, and the changes observable of the query list will emit a new value.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - True to include all descendants, otherwise include only direct children.\n * * **read** - True to read a different token from the queried elements.\n *\n * @usageNotes\n *\n * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n *\n * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Tab-pane example\n *\n * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n * can be used to implement a tab pane component.\n *\n * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): any;\n new (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n 'ContentChildren',\n (selector?: any, data: any = {}) =>\n ({selector, first: false, isViewQuery: false, descendants: false, ...data}),\n Query);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n /**\n * Parameter decorator that configures a content query.\n *\n * Use to get the first element or the directive matching the selector from the content DOM.\n * If the content DOM changes, and a new child matches the selector,\n * the property will be updated.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried element.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection.\n *\n * When `static` is not provided, uses the query results to determine the timing of query\n * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n * resolved after change detection runs. Otherwise, it is resolved before change detection\n * runs.\n *\n * @usageNotes\n *\n * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Example\n *\n * {@example core/di/ts/contentChild/content_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n 'ContentChild', (selector?: any, data: any = {}) =>\n ({selector, first: true, isViewQuery: false, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see `ViewChildren`.\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n /**\n * Parameter decorator that configures a view query.\n *\n * Use to get the `QueryList` of elements or directives from the view DOM.\n * Any time a child element is added, removed, or moved, the query list will be updated,\n * and the changes observable of the query list will emit a new value.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried elements.\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Another example\n *\n * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts?: {read?: any}): any;\n new (selector: Type<any>|Function|string, opts?: {read?: any}): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n 'ViewChildren', (selector?: any, data: any = {}) =>\n ({selector, first: false, isViewQuery: true, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see `ViewChild`.\n * @publicApi\n */\nexport interface ViewChildDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n * The change detector looks for the first element or the directive matching the selector\n * in the view DOM. If the view DOM changes, and a new child matches the selector,\n * the property is updated.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried elements.\n * * **static** - True to resolve query results before change detection runs\n *\n * When `static` is not provided, uses query results to determine the timing of query\n * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n * resolved after change detection runs. Otherwise, it is resolved before change detection\n * runs.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n * template;`)\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * ### Example 2\n *\n * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Example 3\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n 'ViewChild', (selector: any, data: any) =>\n ({selector, first: true, isViewQuery: true, descendants: true, ...data}),\n Query);\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/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\n}\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nexport enum ChangeDetectorStatus {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n CheckOnce,\n\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n Checked,\n\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n CheckAlways,\n\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n Detached,\n\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n Errored,\n\n /**\n * Indicates that the change detector has been destroyed.\n */\n Destroyed,\n}\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n boolean {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\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\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ngComponentDef for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string | {text(): Promise<string>}): string|Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\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 * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n Emulated = 0,\n /**\n * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using the deprecated [Shadow DOM\n * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n Native = 1,\n /**\n * Don't provide any template or style encapsulation.\n */\n None = 2,\n\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ShadowDom = 3\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 * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects(fn: () => void): string {\n return '' + {toString: fn};\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*/\nimport '../util/ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: {} = {};\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\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\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMPONENT_DEF = getClosureSafeProperty({ngComponentDef: getClosureSafeProperty});\nexport const NG_DIRECTIVE_DEF = getClosureSafeProperty({ngDirectiveDef: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ngPipeDef: getClosureSafeProperty});\nexport const NG_MODULE_DEF = getClosureSafeProperty({ngModuleDef: getClosureSafeProperty});\nexport const NG_LOCALE_ID_DEF = getClosureSafeProperty({ngLocaleIdDef: getClosureSafeProperty});\nexport const NG_BASE_DEF = getClosureSafeProperty({ngBaseDef: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\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\nimport '../util/ng_dev_mode';\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {NG_INJECTABLE_DEF, ɵɵdefineInjectable} from '../di/interface/defs';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {stringify} from '../util/stringify';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from './empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_LOCALE_ID_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ɵɵBaseDef} from './interfaces/definition';\n// while SelectorFlags is unused here, it's required so that types don't get resolved lazily\n// see: https://github.com/Microsoft/web-build-tools/issues/1050\nimport {CssSelectorList, SelectorFlags} from './interfaces/projection';\n\nlet _renderCompCount = 0;\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(componentDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this component. */\n selectors: CssSelectorList;\n\n /**\n * Factory method used to create an instance of directive.\n */\n factory: FactoryFn<T>;\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n consts: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['public', 'declared']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instruction to be inserted into the template function.\n *\n * Query-related instructions need to be pulled out to a specific function as a timing of\n * execution is different as compared to all other instructions (after change detection hooks but\n * before view hooks).\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives and components that may be found in this component's view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directives?: DirectiveTypesOrFactory | null;\n\n /**\n * Registry of pipes that may be found in this component's view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipes?: PipeTypesOrFactory | null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}): never {\n const type = componentDefinition.type;\n const typePrototype = type.prototype;\n const declaredInputs: {[key: string]: string} = {} as any;\n const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n type: type,\n providersResolver: null,\n consts: componentDefinition.consts,\n vars: componentDefinition.vars,\n factory: componentDefinition.factory,\n template: componentDefinition.template || null !,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null !, // assigned in noSideEffects\n outputs: null !, // assigned in noSideEffects\n exportAs: componentDefinition.exportAs || null,\n onChanges: null,\n onInit: typePrototype.ngOnInit || null,\n doCheck: typePrototype.ngDoCheck || null,\n afterContentInit: typePrototype.ngAfterContentInit || null,\n afterContentChecked: typePrototype.ngAfterContentChecked || null,\n afterViewInit: typePrototype.ngAfterViewInit || null,\n afterViewChecked: typePrototype.ngAfterViewChecked || null,\n onDestroy: typePrototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null !, // assigned in noSideEffects\n pipeDefs: null !, // assigned in noSideEffects\n selectors: componentDefinition.selectors,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the\n // next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null as never,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n def._ = noSideEffects(() => {\n const directiveTypes = componentDefinition.directives !;\n const feature = componentDefinition.features;\n const pipeTypes = componentDefinition.pipes !;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = directiveTypes ?\n () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef) :\n null;\n def.pipeDefs = pipeTypes ?\n () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n null;\n\n // Add ngInjectableDef so components are reachable through the module injector by default\n // (unless it has already been set by the @Injectable decorator). This is mostly to\n // support injecting components in tests. In real application code, components should\n // be retrieved through the node injector, so this isn't a problem.\n if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {\n (type as any)[NG_INJECTABLE_DEF] =\n ɵɵdefineInjectable<T>({token: type, factory: componentDefinition.factory as() => T});\n }\n }) as never;\n\n return def as never;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {\n const def = (type.ngComponentDef as ComponentDef<any>);\n def.directiveDefs = () => directives.map(extractDirectiveDef);\n def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nexport function extractDirectiveDef(type: DirectiveType<any>& ComponentType<any>):\n DirectiveDef<any>|ComponentDef<any> {\n const def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n }\n return def !;\n}\n\nexport function extractPipeDef(type: PipeType<any>): PipeDef<any> {\n const def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is not a 'PipeType'.`);\n }\n return def !;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): never {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res as never;\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: {\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n}): void {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n }) as never;\n}\n\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject<T>(\n obj?: {[P in keyof T]?: string | [string, string]},\n secondary?: {[key: string]: string}): {[P in keyof T]: string} {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName: string|[string, string] = obj[minifiedKey] !;\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName as string);\n }\n }\n }\n return newLookup;\n}\n\n/**\n * Create a base definition\n *\n * # Example\n * ```ts\n * class ShouldBeInherited {\n * static ngBaseDef = ɵɵdefineBase({\n * ...\n * })\n * }\n * ```\n *\n * @param baseDefinition The base definition parameters\n *\n * @codeGenApi\n */\nexport function ɵɵdefineBase<T>(baseDefinition: {\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `outputs`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>| null;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Function executed by the parent template to allow children to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n}): ɵɵBaseDef<T> {\n const declaredInputs: {[P in keyof T]: string} = {} as any;\n return {\n inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),\n declaredInputs: declaredInputs,\n outputs: invertObject<T>(baseDefinition.outputs as any),\n viewQuery: baseDefinition.viewQuery || null,\n contentQueries: baseDefinition.contentQueries || null,\n hostBindings: baseDefinition.hostBindings || null\n };\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngDirectiveDef = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵdefineDirective = ɵɵdefineComponent as any as<T>(directiveDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors: CssSelectorList;\n\n /**\n * Factory method used to create an instance of directive.\n */\n factory: FactoryFn<T>;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n}) => never;\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string,\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>,\n\n /** A factory for creating a pipe instance. */\n factory: FactoryFn<T>,\n\n /** Whether the pipe is pure. */\n pure?: boolean\n}): never {\n return (<PipeDef<T>>{\n name: pipeDef.name,\n factory: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n }) as never;\n}\n\n/**\n * The following getter methods retrieve the definition form the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T>|null {\n return (type as any)[NG_COMPONENT_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n return (type as any)[NG_DIRECTIVE_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n return (type as any)[NG_PIPE_DEF] || null;\n}\n\nexport function getBaseDef<T>(type: any): ɵɵBaseDef<T>|null {\n return (type as any)[NG_BASE_DEF] || null;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T>|null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T>|null {\n const ngModuleDef = (type as any)[NG_MODULE_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ngModuleDef' property.`);\n }\n return ngModuleDef;\n}\n\nexport function getNgLocaleIdDef(type: any): string|null {\n return (type as any)[NG_LOCALE_ID_DEF] || null;\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\nimport {global} from '../../util/global';\nimport {RElement} from '../interfaces/renderer';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Returns whether the values are different from a change detection stand point.\n *\n * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.\n */\nexport function isDifferent(a: any, b: any): boolean {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n}\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n return '' + value;\n}\n\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n\n\nexport const defaultScheduler =\n (() =>\n (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only\n setTimeout // everything else\n ).bind(global))();\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {\n return {name: 'window', target: element.ownerDocument.defaultView};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {\n return {name: 'document', target: element.ownerDocument};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {\n return {name: 'body', target: element.ownerDocument.body};\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Determines whether or not the given string is a property metadata string.\n * See storeBindingMetadata().\n */\nexport function isPropMetadataString(str: string): boolean {\n return str.indexOf(INTERPOLATION_DELIMITER) >= 0;\n}\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T | (() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\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\nimport {InjectionToken} from '../../di/injection_token';\nimport {Injector} from '../../di/injector';\nimport {Type} from '../../interface/type';\nimport {QueryList} from '../../linker';\nimport {SchemaMetadata} from '../../metadata';\nimport {Sanitizer} from '../../sanitization/security';\n\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n} from './i18n';\nimport {TElementNode, TNode, TViewNode} from './node';\nimport {PlayerHandler} from './player';\nimport {LQueries} from './query';\nimport {RElement, Renderer3, RendererFactory3} from './renderer';\nimport {StylingContext} from './styling';\n\n\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const QUERIES = 5;\nexport const T_HOST = 6;\nexport const BINDING_INDEX = 7;\nexport const CLEANUP = 8;\nexport const CONTEXT = 9;\nexport const INJECTOR = 10;\nexport const RENDERER_FACTORY = 11;\nexport const RENDERER = 12;\nexport const SANITIZER = 13;\nexport const CHILD_HEAD = 14;\nexport const CHILD_TAIL = 15;\nexport const CONTENT_QUERIES = 16;\nexport const DECLARATION_VIEW = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\n/** Size of LView's header. Necessary to adjust for it when setting slots. */\nexport const HEADER_OFFSET = 20;\n\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView extends Array<any> {\n /**\n * The host node for this LView instance, if this is a component view.\n *\n * If this is an embedded view, HOST will be null.\n *\n * If the component uses host bindings for styling that the `RElement` will be wrapped with\n * `StylingContext`.\n */\n [HOST]: RElement|StylingContext|null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly[TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView|LContainer|null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView|LContainer|null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries|null;\n\n /**\n * Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.\n *\n * If `TViewNode`, this is an embedded view of a container. We need this to be able to\n * efficiently find the `LViewNode` when inserting the view into an anchor.\n *\n * If `TElementNode`, this is the LView of a component.\n *\n * If null, this is the root view of an application (root component is in this view).\n */\n [T_HOST]: TViewNode|TElementNode|null;\n\n /**\n * The binding index we should access next.\n *\n * This is stored so that bindings can continue where they left off\n * if a view is left midway through processing bindings (e.g. if there is\n * a setter that creates an embedded view, like in ngIf).\n */\n [BINDING_INDEX]: number;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n */\n // TODO: flatten into LView[]\n [CLEANUP]: any[]|null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component the context contains change detection data.\n * - For non-root components, the context is the component instance,\n * - For inline views, the context is null.\n */\n [CONTEXT]: {}|RootContext|null;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly[INJECTOR]: Injector|null;\n\n /** Renderer to be used for this view. */\n [RENDERER_FACTORY]: RendererFactory3;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer3;\n\n /** An optional custom sanitizer. */\n [SANITIZER]: Sanitizer|null;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView|LContainer|null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView|LContainer|null;\n\n /**\n * Stores QueryLists associated with content queries of a directive. This data structure is\n * filled-in as part of a directive creation process and is later used to retrieve a QueryList to\n * be refreshed.\n */\n [CONTENT_QUERIES]: QueryList<any>[]|null;\n\n /**\n * View where this view's template was declared.\n *\n * Only applicable for dynamically created views. Will be null for inline/component views.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView|null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 0b00000000100,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 0b00000001000,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 0b00000010000,\n\n /**\n * Whether or not manual change detection is turned on for onPush components.\n *\n * This is a special mode that only marks components dirty in two cases:\n * 1) There has been a change to an @Input property\n * 2) `markDirty()` has been called manually by the user\n *\n * Note that in this mode, the firing of events does NOT mark components\n * dirty automatically.\n *\n * Manual mode is turned off by default for backwards compatibility, as events\n * automatically mark OnPush components dirty in View Engine.\n *\n * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on\n */\n ManualOnPush = 0b00000100000,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 0b000001000000,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 0b000010000000,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 0b000100000000,\n\n /** Whether or not this view is the root view */\n IsRoot = 0b001000000000,\n\n /**\n * Index of the current init phase on last 22 bits\n */\n IndexWithinInitPhaseIncrementer = 0b010000000000,\n IndexWithinInitPhaseShift = 10,\n IndexWithinInitPhaseReset = 0b001111111111,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[FLAGS_MORE]) */\nexport const enum PreOrderHookFlags {\n /** The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Set of instructions used to process host bindings efficiently.\n *\n * See VIEW_DATA.md for more information.\n */\nexport interface ExpandoInstructions extends Array<number|HostBindingsFunction<any>|null> {}\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * ID for inline views to determine whether a view is the same as the previous view\n * in a certain position. If it's not, we know the new view needs to be inserted\n * and the one that exists needs to be removed (e.g. if/else statements)\n *\n * If this is -1, then this is a component view or a dynamically created view.\n */\n readonly id: number;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}>|null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}>|null;\n\n /**\n * Pointer to the host `TNode` (not part of this TView).\n *\n * If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.\n * We need this pointer to be able to efficiently find this node when inserting the view\n * into an anchor.\n *\n * If this is a `TElementNode`, this is the view of a root component. It has exactly one\n * root TNode.\n *\n * If this is null, this is the view of a component that is not at root. We do not store\n * the host TNodes for child component views because they can potentially have several\n * different host TNodes, depending on where the component is being used. These host\n * TNodes cannot be shared (due to different indices, etc).\n */\n node: TViewNode|TElementNode|null;\n\n /** Whether or not this template has been processed. */\n firstTemplatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"consts\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * The index where the viewQueries section of `LView` begins. This section contains\n * view queries defined for a component/directive.\n *\n * We store this start index so we know where the list of view queries starts.\n * This is required when we invoke view queries at runtime. We invoke queries one by one and\n * increment query index after each iteration. This information helps us to reset index back to\n * the beginning of view query list before we invoke view queries again.\n */\n viewQueryStartIndex: number;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode|null;\n\n /**\n * Set of instructions used to process host bindings efficiently.\n *\n * See VIEW_DATA.md for more information.\n */\n expandoInstructions: ExpandoInstructions|null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList|null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList|null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n preOrderHooks: HookData|null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n preOrderCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData|null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData|null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData|null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: HookData|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[]|null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[]|null;\n\n /**\n * A list of indices for child directives that have content queries.\n */\n contentQueries: number[]|null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[]|null;\n}\n\nexport const enum RootContextFlags {Empty = 0b00, DetectChanges = 0b01, FlushPlayers = 0b10}\n\n\n/**\n * RootContext contains information which is shared for all components which\n * were bootstrapped with {@link renderComponent}.\n */\nexport interface RootContext {\n /**\n * A function used for scheduling change detection in the future. Usually\n * this is `requestAnimationFrame`.\n */\n scheduler: (workFn: () => void) => void;\n\n /**\n * A promise which is resolved when all components are considered clean (not dirty).\n *\n * This promise is overwritten every time a first call to {@link markDirty} is invoked.\n */\n clean: Promise<null>;\n\n /**\n * RootComponents - The components that were instantiated by the call to\n * {@link renderComponent}.\n */\n components: {}[];\n\n /**\n * The player flushing handler to kick off all animations\n */\n playerHandler: PlayerHandler|null;\n\n /**\n * What render-related operations to run once a scheduler has been set\n */\n flags: RootContextFlags;\n}\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = (number | (() => void))[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData =\n (TNode | PipeDef<any>| DirectiveDef<any>| ComponentDef<any>| number | Type<any>|\n InjectionToken<any>| TI18n | I18nUpdateOpCodes | null | string)[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string) {\n if (typeof actual != 'number') {\n throwError(msg);\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (actual != expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string) {\n if (actual == expected) {\n throwError(msg);\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string) {\n if (actual !== expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (actual === expected) {\n throwError(msg);\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string) {\n if (actual >= expected) {\n throwError(msg);\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string) {\n if (actual <= expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg);\n }\n}\n\nexport function assertDefined<T>(actual: T, msg: string) {\n if (actual == null) {\n throwError(msg);\n }\n}\n\nexport function throwError(msg: string): never {\n // tslint:disable-next-line\n debugger; // Left intentionally for better debugger experience.\n throw new Error(`ASSERTION ERROR: ${msg}`);\n}\n\nexport function assertDomNode(node: any) {\n // If we're in a worker, `Node` will not be defined.\n assertEqual(\n (typeof Node !== 'undefined' && node instanceof Node) ||\n (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'),\n true, `The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n}\n\n\nexport function assertDataInRange(arr: any[], index: number) {\n const maxLen = arr ? arr.length : 0;\n assertLessThan(index, maxLen, `Index expected to be less than ${maxLen} but got ${index}`);\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\nimport {ViewRef} from '../../linker/view_ref';\n\nimport {TNode} from './node';\nimport {LQueries} from './query';\nimport {RComment, RElement} from './renderer';\nimport {StylingContext} from './styling';\nimport {HOST, LView, NEXT, PARENT, QUERIES, T_HOST} from './view';\n\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\nexport const ACTIVE_INDEX = 2;\n// PARENT, NEXT, QUERIES and T_HOST are indices 3, 4, 5 and 6.\n// As we already have these constants in LView, we don't need to re-create them.\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 9;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n *\n * It could also be a styling context if this is a node with a style/class\n * binding.\n */\n readonly[HOST]: RElement|RComment|StylingContext|LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /**\n * The next active index in the views array to read or write to. This helps us\n * keep track of where we are in the views array.\n * In the case the LContainer is created for a ViewContainerRef,\n * it is set to null to identify this scenario, as indices are \"absolute\" in that case,\n * i.e. provided directly by the user of the ViewContainerRef API.\n */\n [ACTIVE_INDEX]: number;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView|LContainer|null;\n\n /**\n * Queries active for this container - all the views inserted to / removed from\n * this container are reported to queries referenced here.\n */\n [QUERIES]: LQueries|null; // TODO(misko): This is abuse of `LContainer` since we are storing\n // `[QUERIES]` in it which are not needed for `LContainer` (only needed for Template)\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n readonly[NATIVE]:\n RComment; // TODO(misko): remove as this value can be gotten by unwrapping `[HOST]`\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n */\n [VIEW_REFS]: ViewRef[]|null;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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\nimport {RNode} from './renderer';\nimport {LView} from './view';\n\n/**\n * This property will be monkey-patched on elements, components and directives\n */\nexport const MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nexport interface LContext {\n /**\n * The component's parent view data.\n */\n lView: LView;\n\n /**\n * The index instance of the node.\n */\n nodeIndex: number;\n\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native: RNode;\n\n /**\n * The instance of the Component node.\n */\n component: {}|null|undefined;\n\n /**\n * The list of active directives that exist on this element.\n */\n directives: any[]|null|undefined;\n\n /**\n * The map of local references (local reference name => element or directive instance) that exist\n * on this element.\n */\n localRefs: {[key: string]: any}|null|undefined;\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\nimport {assertDataInRange, assertDefined, assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from '../interfaces/context';\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {TNode, TNodeFlags} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, TData, TVIEW} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`,\n * `StylingContext`) in same location in `LView`. This is because we don't want to pre-allocate\n * space for it because the storage is sparse. This file contains utilities for dealing with such\n * data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === 'number'` => `StylingContext`\n * - This happens when we have style/class binding at a given location.\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapRNode(value: RNode | LView | LContainer | StylingContext): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapLView(value: RNode | LView | LContainer | StylingContext): LView|null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapLContainer(value: RNode | LView | LContainer | StylingContext): LContainer|\n null {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true) return value as LContainer;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `StylingContext` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapStylingContext(value: RNode | LView | LContainer | StylingContext):\n StylingContext|null {\n while (Array.isArray(value)) {\n // This check is same as `isStylingContext()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'number') return value as StylingContext;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isLView(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isLContainer(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\n/**\n * True if `value` is `StylingContext`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isStylingContext(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is StylingContext {\n return Array.isArray(value) && typeof value[TYPE] === 'number';\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n return unwrapRNode(lView[index + HEADER_OFFSET]);\n}\n\nexport function getNativeByTNode(tNode: TNode, hostView: LView): RNode {\n return unwrapRNode(hostView[tNode.index]);\n}\n\n/**\n * A helper function that returns `true` if a given `TNode` has any matching directives.\n */\nexport function hasDirectives(tNode: TNode): boolean {\n return tNode.directiveEnd > tNode.directiveStart;\n}\n\nexport function getTNode(index: number, view: LView): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');\n return view[TVIEW].data[index + HEADER_OFFSET] as TNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function loadInternal<T>(view: LView | TData, index: number): T {\n ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);\n return view[index + HEADER_OFFSET];\n}\n\nexport function getComponentViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponent(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isComponent) === TNodeFlags.isComponent;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return (def as ComponentDef<T>).template !== null;\n}\n\nexport function isRootView(target: LView): boolean {\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView|LContext|null {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME];\n}\n\nexport function readPatchedLView(target: any): LView|null {\n const value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : (value as LContext).lView;\n }\n return null;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\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\nimport {assertDefined, assertEqual, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\nimport {isLContainer, isLView} from './util/view_utils';\n\n\nexport function assertComponentType(\n actual: any,\n msg: string =\n 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string =\n 'Type passed in is not NgModuleType, it does not have \\'ngModuleDef\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertPreviousIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode | null) {\n assertDefined(tNode, 'previousOrParentTNode should exist!');\n assertDefined(tNode !.parent, 'previousOrParentTNode should have a parent');\n}\n\nexport function assertDataNext(lView: LView, index: number, arr?: any[]) {\n if (arr == null) arr = lView;\n assertEqual(\n arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nexport function assertLContainerOrUndefined(value: any): void {\n value && assertEqual(isLContainer(value), true, 'Expecting LContainer or undefined or null');\n}\n\nexport function assertLContainer(value: any): void {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): void {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\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\nimport {assertEqual} from '../util/assert';\n\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\n\n\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n * @param nodeIndex The index of the node to which the directive is attached\n * @param initialPreOrderHooksLength the number of pre-order hooks already registered before the\n * current process, used to know if the node index has to be added to the array. If it is -1,\n * the node index is never added.\n * @param initialPreOrderCheckHooksLength same as previous for pre-order check hooks\n */\nexport function registerPreOrderHooks(\n directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView, nodeIndex: number,\n initialPreOrderHooksLength: number, initialPreOrderCheckHooksLength: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n\n const {onChanges, onInit, doCheck} = directiveDef;\n if (initialPreOrderHooksLength >= 0 &&\n (!tView.preOrderHooks || initialPreOrderHooksLength === tView.preOrderHooks.length) &&\n (onChanges || onInit || doCheck)) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(nodeIndex);\n }\n\n if (initialPreOrderCheckHooksLength >= 0 &&\n (!tView.preOrderCheckHooks ||\n initialPreOrderCheckHooksLength === tView.preOrderCheckHooks.length) &&\n (onChanges || doCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(nodeIndex);\n }\n\n if (onChanges) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges);\n }\n\n if (onInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit);\n }\n\n if (doCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n if (tView.firstTemplatePass) {\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n if (directiveDef.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, directiveDef.afterContentInit);\n }\n\n if (directiveDef.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, directiveDef.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [\n ])).push(i, directiveDef.afterContentChecked);\n }\n\n if (directiveDef.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, directiveDef.afterViewInit);\n }\n\n if (directiveDef.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, directiveDef.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [\n ])).push(i, directiveDef.afterViewChecked);\n }\n\n if (directiveDef.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, directiveDef.onDestroy);\n }\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n/**\n * Executes necessary hooks at the start of executing a template.\n *\n * Executes hooks that are to be run during the initialization of a directive such\n * as `onChanges`, `onInit`, and `doCheck`.\n *\n * @param lView The current view\n * @param tView Static data for the view containing the hooks to be executed\n * @param checkNoChangesMode Whether or not we're in checkNoChanges mode.\n * @param @param currentNodeIndex 2 cases depending the the value:\n * - undefined: execute hooks only from the saved index until the end of the array (pre-order case,\n * when flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executePreOrderHooks(\n currentView: LView, tView: TView, checkNoChangesMode: boolean,\n currentNodeIndex: number | undefined): void {\n if (!checkNoChangesMode) {\n executeHooks(\n currentView, tView.preOrderHooks, tView.preOrderCheckHooks, checkNoChangesMode,\n InitPhaseState.OnInitHooksToBeRun,\n currentNodeIndex !== undefined ? currentNodeIndex : null);\n }\n}\n\n/**\n * Executes hooks against the given `LView` based off of whether or not\n * This is the first pass.\n *\n * @param currentView The view instance data to run the hooks against\n * @param firstPassHooks An array of hooks to run if we're in the first view pass\n * @param checkHooks An Array of hooks to run if we're not in the first view pass.\n * @param checkNoChangesMode Whether or not we're in no changes mode.\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeHooks(\n currentView: LView, firstPassHooks: HookData | null, checkHooks: HookData | null,\n checkNoChangesMode: boolean, initPhaseState: InitPhaseState,\n currentNodeIndex: number | null | undefined): void {\n if (checkNoChangesMode) return;\n const hooksToCall = (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState ?\n firstPassHooks :\n checkHooks;\n if (hooksToCall) {\n callHooks(currentView, hooksToCall, initPhaseState, currentNodeIndex);\n }\n // The init phase state must be always checked here as it may have been recursively updated\n if (currentNodeIndex == null &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState &&\n initPhaseState !== InitPhaseState.InitPhaseCompleted) {\n currentView[FLAGS] &= LViewFlags.IndexWithinInitPhaseReset;\n currentView[FLAGS] += LViewFlags.InitPhaseStateIncrementer;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView, arr: HookData, initPhase: InitPhaseState,\n currentNodeIndex: number | null | undefined): void {\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < arr.length; i++) {\n const hook = arr[i + 1] as() => void;\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) + i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1] as() => void;\n const directiveIndex = isInitHook ? -arr[i] : arr[i] as number;\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively\n // updated\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n hook.call(directive);\n }\n } else {\n hook.call(directive);\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 */\nimport {StylingContext} from '../interfaces/styling';\n\nlet stylingContext: StylingContext|null = null;\n\n/**\n * Gets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n */\nexport function getCachedStylingContext() {\n return stylingContext;\n}\n\n/**\n * Sets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n *\n * @param context The styling context value that will be stored\n */\nexport function setCachedStylingContext(context: StylingContext | null) {\n stylingContext = context;\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\nimport {assertDefined, assertGreaterThan} from '../util/assert';\n\nimport {assertLViewOrUndefined} from './assert';\nimport {executeHooks} from './hooks';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {TElementNode, TNode, TViewNode} from './interfaces/node';\nimport {BINDING_INDEX, CONTEXT, DECLARATION_VIEW, FLAGS, InitPhaseState, LView, LViewFlags, OpaqueViewState, TVIEW} from './interfaces/view';\nimport {setCachedStylingContext} from './styling/state';\nimport {resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can than attach `LView` to only those elements.\n */\nlet elementDepthCount !: number;\n\nexport function getElementDepthCount() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n elementDepthCount--;\n}\n\nlet currentDirectiveDef: DirectiveDef<any>|ComponentDef<any>|null = null;\n\nexport function getCurrentDirectiveDef(): DirectiveDef<any>|ComponentDef<any>|null {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentDirectiveDef;\n}\n\nexport function setCurrentDirectiveDef(def: DirectiveDef<any>| ComponentDef<any>| null): void {\n currentDirectiveDef = def;\n}\n\n/**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` than we need to prevent the runtime form matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\nlet bindingsEnabled !: boolean;\n\nexport function getBindingsEnabled(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return bindingsEnabled;\n}\n\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n bindingsEnabled = true;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n bindingsEnabled = false;\n}\n\nexport function getLView(): LView {\n return lView;\n}\n\n/**\n * Used as the starting directive id value.\n *\n * All subsequent directives are incremented from this value onwards.\n * The reason why this value is `1` instead of `0` is because the `0`\n * value is reserved for the template.\n */\nconst MIN_DIRECTIVE_ID = 1;\n\nlet activeDirectiveId = MIN_DIRECTIVE_ID;\n\n/**\n * Position depth (with respect from leaf to root) in a directive sub-class inheritance chain.\n */\nlet activeDirectiveSuperClassDepthPosition = 0;\n\n/**\n * Total count of how many directives are a part of an inheritance chain.\n *\n * When directives are sub-classed (extended) from one to another, Angular\n * needs to keep track of exactly how many were encountered so it can accurately\n * generate the next directive id (once the next directive id is visited).\n * Normally the next directive id just a single incremented value from the\n * previous one, however, if the previous directive is a part of an inheritance\n * chain (a series of sub-classed directives) then the incremented value must\n * also take into account the total amount of sub-classed values.\n *\n * Note that this value resets back to zero once the next directive is\n * visited (when `incrementActiveDirectiveId` or `setActiveHostElement`\n * is called).\n */\nlet activeDirectiveSuperClassHeight = 0;\n\n/**\n * Sets the active directive host element and resets the directive id value\n * (when the provided elementIndex value has changed).\n *\n * @param elementIndex the element index value for the host element where\n * the directive/component instance lives\n */\nexport function setActiveHostElement(elementIndex: number | null = null) {\n if (_selectedIndex !== elementIndex) {\n setSelectedIndex(elementIndex == null ? -1 : elementIndex);\n activeDirectiveId = elementIndex == null ? 0 : MIN_DIRECTIVE_ID;\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n }\n}\n\n/**\n * Returns the current id value of the current directive.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (id == 1)\n * dirTwo->hostBindings() (id == 2)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function getActiveDirectiveId() {\n return activeDirectiveId;\n}\n\n/**\n * Increments the current directive id value.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (index = 1)\n * // increment\n * dirTwo->hostBindings() (index = 2)\n *\n * Depending on whether or not a previous directive had any inherited\n * directives present, that value will be incremented in addition\n * to the id jumping up by one.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function incrementActiveDirectiveId() {\n activeDirectiveId += 1 + activeDirectiveSuperClassHeight;\n\n // because we are dealing with a new directive this\n // means we have exited out of the inheritance chain\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n}\n\n/**\n * Set the current super class (reverse inheritance) position depth for a directive.\n *\n * For example we have two directives: Child and Other (but Child is a sub-class of Parent)\n * <div child-dir other-dir></div>\n *\n * // increment\n * parentInstance->hostBindings() (depth = 1)\n * // decrement\n * childInstance->hostBindings() (depth = 0)\n * otherInstance->hostBindings() (depth = 0 b/c it's a different directive)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function adjustActiveDirectiveSuperClassDepthPosition(delta: number) {\n activeDirectiveSuperClassDepthPosition += delta;\n\n // we keep track of the height value so that when the next directive is visited\n // then Angular knows to generate a new directive id value which has taken into\n // account how many sub-class directives were a part of the previous directive.\n activeDirectiveSuperClassHeight =\n Math.max(activeDirectiveSuperClassHeight, activeDirectiveSuperClassDepthPosition);\n}\n\n/**\n * Returns he current depth of the super/sub class inheritance chain.\n *\n * This will return how many inherited directive/component classes\n * exist in the current chain.\n *\n * ```typescript\n * @Directive({ selector: '[super-dir]' })\n * class SuperDir {}\n *\n * @Directive({ selector: '[sub-dir]' })\n * class SubDir extends SuperDir {}\n *\n * // if `<div sub-dir>` is used then the super class height is `1`\n * // if `<div super-dir>` is used then the super class height is `0`\n * ```\n */\nexport function getActiveDirectiveSuperClassHeight() {\n return activeDirectiveSuperClassHeight;\n}\n\n/**\n * Returns the current super class (reverse inheritance) depth for a directive.\n *\n * This is designed to help instruction code distinguish different hostBindings\n * calls from each other when a directive has extended from another directive.\n * Normally using the directive id value is enough, but with the case\n * of parent/sub-class directive inheritance more information is required.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function getActiveDirectiveSuperClassDepth() {\n return activeDirectiveSuperClassDepthPosition;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView(viewToRestore: OpaqueViewState) {\n contextLView = viewToRestore as any as LView;\n}\n\n/** Used to set the parent property when nodes are created and track query results. */\nlet previousOrParentTNode: TNode;\n\nexport function getPreviousOrParentTNode(): TNode {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return previousOrParentTNode;\n}\n\nexport function setPreviousOrParentTNode(tNode: TNode, _isParent: boolean) {\n previousOrParentTNode = tNode;\n isParent = _isParent;\n}\n\nexport function setTNodeAndViewData(tNode: TNode, view: LView) {\n ngDevMode && assertLViewOrUndefined(view);\n previousOrParentTNode = tNode;\n lView = view;\n}\n\n/**\n * If `isParent` is:\n * - `true`: then `previousOrParentTNode` points to a parent node.\n * - `false`: then `previousOrParentTNode` points to previous node (sibling).\n */\nlet isParent: boolean;\n\nexport function getIsParent(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return isParent;\n}\n\nexport function setIsNotParent(): void {\n isParent = false;\n}\nexport function setIsParent(): void {\n isParent = true;\n}\n\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView = lView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nlet lView: LView;\n\n/**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\nlet contextLView: LView = null !;\n\nexport function getContextLView(): LView {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return contextLView;\n}\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nlet checkNoChangesMode = false;\n\nexport function getCheckNoChangesMode(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return checkNoChangesMode;\n}\n\nexport function setCheckNoChangesMode(mode: boolean): void {\n checkNoChangesMode = mode;\n}\n\n/**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\nlet bindingRootIndex: number = -1;\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n return bindingRootIndex;\n}\n\nexport function setBindingRoot(value: number) {\n bindingRootIndex = value;\n}\n\n/**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\nlet currentQueryIndex: number = 0;\n\nexport function getCurrentQueryIndex(): number {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n currentQueryIndex = value;\n}\n\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nexport function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView {\n ngDevMode && assertLViewOrUndefined(newView);\n const oldView = lView;\n if (newView) {\n const tView = newView[TVIEW];\n bindingRootIndex = tView.bindingStartIndex;\n }\n\n previousOrParentTNode = hostTNode !;\n isParent = true;\n\n lView = contextLView = newView;\n return oldView;\n}\n\nexport function nextContextImpl<T = any>(level: number = 1): T {\n contextLView = walkUpViews(level, contextLView !);\n return contextLView[CONTEXT] as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW] !;\n nestingLevel--;\n }\n return currentView;\n}\n\n/**\n * Resets the application state.\n */\nexport function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null !;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}\n\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n *\n * @param newView New state to become active\n * @param safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.\n * This is not always the case (for example, the application may have crashed and `leaveView` is\n * being executed while unwinding the call stack).\n */\nexport function leaveView(newView: LView, safeToRunHooks: boolean): void {\n const tView = lView[TVIEW];\n if (isCreationMode(lView)) {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n } else {\n try {\n resetPreOrderHookFlags(lView);\n safeToRunHooks && executeHooks(\n lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode,\n InitPhaseState.AfterViewInitHooksToBeRun, undefined);\n } finally {\n // Views are clean and in update mode after being checked, so these bits are cleared\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n }\n }\n setCachedStylingContext(null);\n enterView(newView, null);\n}\n\nlet _selectedIndex = -1;\n\n/**\n * Gets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return _selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function setSelectedIndex(index: number) {\n _selectedIndex = index;\n\n // remove the styling context from the cache\n // because we are now on a different element\n setCachedStylingContext(null);\n}\n\n\nlet _currentNamespace: string|null = null;\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n _currentNamespace = 'http://www.w3.org/2000/svg';\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n _currentNamespace = 'http://www.w3.org/1998/MathML/';\n}\n\n/**\n * Sets the namespace used to create elements no `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n _currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n return _currentNamespace;\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\nconst BRAND = '__SANITIZER_TRUSTED_BRAND__';\n\nexport const enum BypassType {\n Url = 'Url',\n Html = 'Html',\n ResourceUrl = 'ResourceUrl',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * A branded trusted string used with sanitization.\n *\n * See: {@link TrustedHtmlString}, {@link TrustedResourceUrlString}, {@link TrustedScriptString},\n * {@link TrustedStyleString}, {@link TrustedUrlString}\n */\nexport interface TrustedString extends String { [BRAND]: BypassType; }\n\n/**\n * A branded trusted string used with sanitization of `html` strings.\n *\n * See: {@link bypassSanitizationTrustHtml} and {@link htmlSanitizer}.\n */\nexport interface TrustedHtmlString extends TrustedString { [BRAND]: BypassType.Html; }\n\n/**\n * A branded trusted string used with sanitization of `style` strings.\n *\n * See: {@link bypassSanitizationTrustStyle} and {@link styleSanitizer}.\n */\nexport interface TrustedStyleString extends TrustedString { [BRAND]: BypassType.Style; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustScript} and {@link scriptSanitizer}.\n */\nexport interface TrustedScriptString extends TrustedString { [BRAND]: BypassType.Script; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustUrl} and {@link urlSanitizer}.\n */\nexport interface TrustedUrlString extends TrustedString { [BRAND]: BypassType.Url; }\n\n/**\n * A branded trusted string used with sanitization of `resourceUrl` strings.\n *\n * See: {@link bypassSanitizationTrustResourceUrl} and {@link resourceUrlSanitizer}.\n */\nexport interface TrustedResourceUrlString extends TrustedString { [BRAND]: BypassType.ResourceUrl; }\n\nexport function allowSanitizationBypass(value: any, type: BypassType): boolean {\n return (value instanceof String && (value as TrustedStyleString)[BRAND] === type);\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): TrustedHtmlString {\n return bypassSanitizationTrustString(trustedHtml, BypassType.Html);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): TrustedStyleString {\n return bypassSanitizationTrustString(trustedStyle, BypassType.Style);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): TrustedScriptString {\n return bypassSanitizationTrustString(trustedScript, BypassType.Script);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): TrustedUrlString {\n return bypassSanitizationTrustString(trustedUrl, BypassType.Url);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string):\n TrustedResourceUrlString {\n return bypassSanitizationTrustString(trustedResourceUrl, BypassType.ResourceUrl);\n}\n\n\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Html): TrustedHtmlString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Style): TrustedStyleString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Script): TrustedScriptString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Url): TrustedUrlString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.ResourceUrl): TrustedResourceUrlString;\nfunction bypassSanitizationTrustString(trustedString: string, mode: BypassType): TrustedString {\n const trusted = new String(trustedString) as TrustedString;\n trusted[BRAND] = mode;\n return trusted;\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 * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n\nlet _devMode: boolean = true;\nlet _runModeLocked: boolean = false;\n\n\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n _runModeLocked = true;\n return _devMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\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 * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nexport class InertBodyHelper {\n private inertBodyElement: HTMLElement;\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n\n if (this.inertBodyElement == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n * The implementation of this is determined in the constructor, when the class is instantiated.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n private getInertBodyElement_XHR(html: string) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n } catch {\n return null;\n }\n const xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(undefined);\n const body: HTMLBodyElement = xhr.response.body;\n body.removeChild(body.firstChild !);\n return body;\n }\n\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n private getInertBodyElement_DOMParser(html: string) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n const body = new (window as any)\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body as HTMLBodyElement;\n body.removeChild(body.firstChild !);\n return body;\n } catch {\n return null;\n }\n }\n\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n private getInertBodyElement_InertDocument(html: string) {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n\n this.inertBodyElement.innerHTML = html;\n\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if ((this.defaultDoc as any).documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n\n return this.inertBodyElement;\n }\n\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n private stripCustomNsAttrs(el: Element) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib !.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild as Node | null;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode as Element);\n childNode = childNode.nextSibling;\n }\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!(window as any).DOMParser;\n } catch {\n return false;\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\nimport {isDevMode} from '../util/is_dev_mode';\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n if (isDevMode()) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see http://g.co/ng/security#xss)`);\n }\n\n return 'unsafe:' + url;\n}\n\nexport function sanitizeSrcset(srcset: string): string {\n srcset = String(srcset);\n return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\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\nimport {isDevMode} from '../util/is_dev_mode';\nimport {InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS =\n merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n 'address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n\nexport const VALID_ELEMENTS =\n merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\n// Attributes that have special href set hence need to be sanitized\nexport const SRCSET_ATTRS = tagSet('srcset');\n\nconst HTML_ATTRS = tagSet(\n 'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current: Node = el.firstChild !;\n let traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue !);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild !;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = this.checkClobberedElement(current, current.nextSibling !);\n\n if (next) {\n current = next;\n break;\n }\n\n current = this.checkClobberedElement(current, current.parentNode !);\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr !.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr !.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n\n private chars(chars: string) { this.buf.push(encodeEntities(chars)); }\n\n checkClobberedElement(node: Node, nextNode: Node): Node {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\n `Failed to sanitize html because the element is clobbered: ${(node as Element).outerHTML}`);\n }\n return nextNode;\n }\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n return value.replace(/&/g, '&amp;')\n .replace(\n SURROGATE_PAIR_REGEXP,\n function(match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(\n NON_ALPHANUMERIC_REGEXP,\n function(match: string) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): string {\n let inertBodyElement: HTMLElement|null = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement !.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n getTemplateContent(inertBodyElement !) as Element || inertBodyElement);\n if (isDevMode() && sanitizer.sanitizedSomething) {\n console.warn(\n 'WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');\n }\n\n return safeHtml;\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node|null {\n return 'content' in (el as any /** Microsoft/TypeScript#21517 */) && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\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 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;\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\nimport {isDevMode} from '../util/is_dev_mode';\nimport {_sanitizeUrl} from './url_sanitizer';\n\n\n/**\n * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nconst VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nconst TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\nconst COLOR_FNS = '(?:rgb|hsl)a?';\nconst GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nconst CSS3_FNS = '(?:calc|attr)';\nconst FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nconst SAFE_STYLE_VALUE = new RegExp(\n `^(${VALUES}|` +\n `(?:${TRANSFORMATION_FNS}|${COLOR_FNS}|${GRADIENTS}|${CSS3_FNS})` +\n `${FN_ARGS})$`,\n 'g');\n\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nconst URL_RE = /^url\\(([^)]+)\\)$/;\n\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value: string) {\n let outsideSingle = true;\n let outsideDouble = true;\n for (let i = 0; i < value.length; i++) {\n const c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n } else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n}\n\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nexport function _sanitizeStyle(value: string): string {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value) return '';\n\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n const urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n\n if (isDevMode()) {\n console.warn(\n `WARNING: sanitizing unsafe style value ${value} (see http://g.co/ng/security#xss).`);\n }\n\n return 'unsafe';\n}\n\n\n/**\n * A series of flags to instruct a style sanitizer to either validate\n * or sanitize a value.\n *\n * Because sanitization is dependent on the style property (i.e. style\n * sanitization for `width` is much different than for `background-image`)\n * the sanitization function (e.g. `StyleSanitizerFn`) needs to check a\n * property value first before it actually sanitizes any values.\n *\n * This enum exist to allow a style sanitization function to either only\n * do validation (check the property to see whether a value will be\n * sanitized or not) or to sanitize the value (or both).\n *\n * @publicApi\n */\nexport const enum StyleSanitizeMode {\n /** Just check to see if the property is required to be sanitized or not */\n ValidateProperty = 0b01,\n /** Skip checking the property; just sanitize the value */\n SanitizeOnly = 0b10,\n /** Check the property and (if true) then sanitize the value */\n ValidateAndSanitize = 0b11,\n}\n\n/**\n * Used to intercept and sanitize style values before they are written to the renderer.\n *\n * This function is designed to be called in two modes. When a value is not provided\n * then the function will return a boolean whether a property will be sanitized later.\n * If a value is provided then the sanitized version of that will be returned.\n */\nexport interface StyleSanitizeFn {\n (prop: string, value: string|null, mode?: StyleSanitizeMode): any;\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\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/misc_utils';\n\nimport {BypassType, allowSanitizationBypass} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer, SecurityContext} from './security';\nimport {StyleSanitizeFn, StyleSanitizeMode, _sanitizeStyle as _sanitizeStyle} from './style_sanitizer';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n }\n if (allowSanitizationBypass(unsafeHtml, BypassType.Html)) {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypass(unsafeStyle, BypassType.Style)) {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(renderStringify(unsafeStyle));\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypass(unsafeUrl, BypassType.Url)) {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n }\n if (allowSanitizationBypass(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return unsafeResourceUrl.toString();\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';\n }\n if (allowSanitizationBypass(unsafeScript, BypassType.Script)) {\n return unsafeScript.toString();\n }\n throw new Error('unsafe value used in a script context');\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||\n tag === 'media' || tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\n/**\n * The default style sanitizer will handle sanitization for style properties by\n * sanitizing any CSS property that can include a `url` value (usually image-based properties)\n *\n * @publicApi\n */\nexport const ɵɵdefaultStyleSanitizer =\n (function(prop: string, value: string|null, mode?: StyleSanitizeMode): string | boolean | null {\n mode = mode || StyleSanitizeMode.ValidateAndSanitize;\n let doSanitizeValue = true;\n if (mode & StyleSanitizeMode.ValidateProperty) {\n doSanitizeValue = prop === 'background-image' || prop === 'background' ||\n prop === 'border-image' || prop === 'filter' || prop === 'list-style' ||\n prop === 'list-style-image' || prop === 'clip-path';\n }\n\n if (mode & StyleSanitizeMode.SanitizeOnly) {\n return doSanitizeValue ? ɵɵsanitizeStyle(value) : value;\n } else {\n return doSanitizeValue;\n }\n } as StyleSanitizeFn);\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new Error(msg);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new Error(msg);\n }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n const lView = getLView();\n return lView && lView[SANITIZER];\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\nimport {InjectionToken} from '../../di/injection_token';\nimport {InjectFlags} from '../../di/interface/injector';\nimport {Type} from '../../interface/type';\n\nimport {TElementNode} from './node';\nimport {LView, TData} from './view';\n\nexport const TNODE = 8;\nexport const PARENT_INJECTOR = 8;\nexport const INJECTOR_BLOOM_PARENT_SIZE = 9;\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport interface RelativeInjectorLocation { __brand__: 'RelativeInjectorLocationFlags'; }\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR: RelativeInjectorLocation = -1 as any;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n* Factory for creating instances of injectors in the NodeInjector.\n*\n* This factory is complicated by the fact that it can resolve `multi` factories as well.\n*\n* NOTE: Some of the fields are optional which means that this class has two hidden classes.\n* - One without `multi` support (most common)\n* - One with `multi` values, (rare).\n*\n* Since VMs can cache up to 4 inline hidden classes this is OK.\n*\n* - Single factory: Only `resolving` and `factory` is defined.\n* - `providers` factory: `componentProviders` is a number and `index = -1`.\n* - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n*/\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```\n * component:\n * provides: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * provides: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `provides` and `viewProvides` it is\n * possible for `viewProvides` to shadow the `provides`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```\n * provides: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProvides`\n * `Factory` has a pointer to the shadowed `provides` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory|null;\n\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory:\n (this: NodeInjectorFactory, _: null,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TElementNode) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T)) {\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n // See: https://jsperf.com/instanceof-vs-getprototypeof\n return obj !== null && typeof obj == 'object' &&\n Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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\nimport {assertDefined, assertEqual} from '../util/assert';\nimport {TNode, TNodeType} from './interfaces/node';\n\nexport function assertNodeType(tNode: TNode, type: TNodeType) {\n assertDefined(tNode, 'should be called with a TNode');\n assertEqual(tNode.type, type, `should be a ${typeName(type)}`);\n}\n\nexport function assertNodeOfPossibleTypes(tNode: TNode, ...types: TNodeType[]) {\n assertDefined(tNode, 'should be called with a TNode');\n const found = types.some(type => tNode.type === type);\n assertEqual(\n found, true,\n `Should be one of ${types.map(typeName).join(', ')} but got ${typeName(tNode.type)}`);\n}\n\nfunction typeName(type: TNodeType): string {\n if (type == TNodeType.Projection) return 'Projection';\n if (type == TNodeType.Container) return 'Container';\n if (type == TNodeType.View) return 'View';\n if (type == TNodeType.Element) return 'Element';\n if (type == TNodeType.ElementContainer) return 'ElementContainer';\n return '<unknown>';\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 * The goal here is to make sure that the browser DOM API is the Renderer.\n * We do this by defining a subset of DOM API to be the renderer and than\n * use that time for rendering.\n *\n * At runtime we can then use the DOM api directly, in server or web-worker\n * it will be easy to implement such API.\n */\n\nimport {RendererStyleFlags2, RendererType2} from '../../render/api';\n\n\n// TODO: cleanup once the code is merged in angular/angular\nexport enum RendererStyleFlags3 {\n Important = 1 << 0,\n DashCase = 1 << 1\n}\n\nexport type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;\n\nexport type GlobalTargetName = 'document' | 'window' | 'body';\n\nexport type GlobalTargetResolver = (element: any) => {\n name: GlobalTargetName, target: EventTarget\n};\n\n/**\n * Object Oriented style of API needed to create elements and text nodes.\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade\n * (reducing payload size).\n * */\nexport interface ObjectOrientedRenderer3 {\n createComment(data: string): RComment;\n createElement(tagName: string): RElement;\n createElementNS(namespace: string, tagName: string): RElement;\n createTextNode(data: string): RText;\n\n querySelector(selectors: string): RElement|null;\n}\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nexport function isProceduralRenderer(renderer: ProceduralRenderer3 | ObjectOrientedRenderer3):\n renderer is ProceduralRenderer3 {\n return !!((renderer as any).listen);\n}\n\n/**\n * Procedural style of API needed to create elements and text nodes.\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the\n * facade that enables element manipulation. This also facilitates backwards compatibility\n * with Renderer2.\n */\nexport interface ProceduralRenderer3 {\n destroy(): void;\n createComment(value: string): RComment;\n createElement(name: string, namespace?: string|null): RElement;\n createText(value: string): RText;\n /**\n * This property is allowed to be null / undefined,\n * in which case the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode?: ((node: RNode) => void)|null;\n appendChild(parent: RElement, newChild: RNode): void;\n insertBefore(parent: RNode, newChild: RNode, refChild: RNode|null): void;\n removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;\n selectRootElement(selectorOrNode: string|any): RElement;\n\n parentNode(node: RNode): RElement|null;\n nextSibling(node: RNode): RNode|null;\n\n setAttribute(el: RElement, name: string, value: string, namespace?: string|null): void;\n removeAttribute(el: RElement, name: string, namespace?: string|null): void;\n addClass(el: RElement, name: string): void;\n removeClass(el: RElement, name: string): void;\n setStyle(\n el: RElement, style: string, value: any,\n flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n setProperty(el: RElement, name: string, value: any): void;\n setValue(node: RText|RComment, value: string): void;\n\n // TODO(misko): Deprecate in favor of addEventListener/removeEventListener\n listen(\n target: GlobalTargetName|RNode, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n}\n\nexport interface RendererFactory3 {\n createRenderer(hostElement: RElement|null, rendererType: RendererType2|null): Renderer3;\n begin?(): void;\n end?(): void;\n}\n\nexport const domRendererFactory3: RendererFactory3 = {\n createRenderer: (hostElement: RElement | null, rendererType: RendererType2 | null):\n Renderer3 => { return document;}\n};\n\n/** Subset of API needed for appending elements and text nodes. */\nexport interface RNode {\n /**\n * Returns the parent Element, Document, or DocumentFragment\n */\n parentNode: RNode|null;\n\n\n /**\n * Returns the parent Element if there is one\n */\n parentElement: RElement|null;\n\n /**\n * Gets the Node immediately following this one in the parent's childNodes\n */\n nextSibling: RNode|null;\n\n /**\n * Removes a child from the current node and returns the removed node\n * @param oldChild the child node to remove\n */\n removeChild(oldChild: RNode): RNode;\n\n /**\n * Insert a child node.\n *\n * Used exclusively for adding View root nodes into ViewAnchor location.\n */\n insertBefore(newChild: RNode, refChild: RNode|null, isViewRoot: boolean): void;\n\n /**\n * Append a child node.\n *\n * Used exclusively for building up DOM which are static (ie not View roots)\n */\n appendChild(newChild: RNode): RNode;\n}\n\n/**\n * Subset of API needed for writing attributes, properties, and setting up\n * listeners on Element.\n */\nexport interface RElement extends RNode {\n style: RCssStyleDeclaration;\n classList: RDomTokenList;\n className: string;\n setAttribute(name: string, value: string): void;\n removeAttribute(name: string): void;\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\n removeEventListener(type: string, listener?: EventListener, options?: boolean): void;\n\n setProperty?(name: string, value: any): void;\n}\n\nexport interface RCssStyleDeclaration {\n removeProperty(propertyName: string): string;\n setProperty(propertyName: string, value: string|null, priority?: string): void;\n}\n\nexport interface RDomTokenList {\n add(token: string): void;\n remove(token: string): void;\n}\n\nexport interface RText extends RNode { textContent: string|null; }\n\nexport interface RComment extends RNode { textContent: string|null; }\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 */\nimport '../util/ng_dev_mode';\n\nimport {assertDomNode} from '../util/assert';\n\nimport {EMPTY_ARRAY} from './empty';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from './interfaces/context';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer';\nimport {CONTEXT, HEADER_OFFSET, HOST, LView, TVIEW} from './interfaces/view';\nimport {getComponentViewByIndex, getNativeByTNode, readPatchedData, unwrapRNode} from './util/view_utils';\n\n\n\n/** Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext|null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n const lView: LView = mpValue !;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[]|null|undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n let lView: LView|null;\n if (Array.isArray(parentContext)) {\n lView = parentContext as LView;\n } else {\n lView = parentContext.lView;\n }\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let lView = readPatchedData(componentInstance);\n let view: LView;\n\n if (Array.isArray(lView)) {\n const nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentViewByIndex(nodeIndex, lView);\n const context = createLContext(lView, nodeIndex, view[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = lView as any as LContext;\n view = getComponentViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n}\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView | LContext) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ngComponentDef;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ngDirectiveDef;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const native = getNativeByTNode(tNode, lView) !;\n if (native === target) {\n return tNode.index;\n }\n tNode = traverseNextElement(tNode);\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode|null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nexport function getDirectivesAtNodeIndex(\n nodeIndex: number, lView: LView, includeComponents: boolean): any[]|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0) return EMPTY_ARRAY;\n const directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & TNodeFlags.isComponent) directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n return tNode.flags & TNodeFlags.isComponent ? lView[directiveStartIndex] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\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 */\nimport {PlayState, Player, PlayerHandler} from '../interfaces/player';\n\nexport class CorePlayerHandler implements PlayerHandler {\n private _players: Player[] = [];\n\n flushPlayers() {\n for (let i = 0; i < this._players.length; i++) {\n const player = this._players[i];\n if (!player.parent && player.state === PlayState.Pending) {\n player.play();\n }\n }\n this._players.length = 0;\n }\n\n queuePlayer(player: Player) { this._players.push(player); }\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 * The default directive styling index value for template-based bindings.\n *\n * All host-level bindings (e.g. `hostStyleProp` and `hostStyleMap`) are\n * assigned a directive styling index value based on the current directive\n * uniqueId and the directive super-class inheritance depth. But for template\n * bindings they always have the same directive styling index value.\n */\nexport const DEFAULT_TEMPLATE_DIRECTIVE_INDEX = 0;\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 */\nimport '../../util/ng_dev_mode';\n\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {getLContext} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {LContext} from '../interfaces/context';\nimport {AttributeMarker, TAttributes, TNode, TNodeFlags} from '../interfaces/node';\nimport {PlayState, Player, PlayerContext, PlayerIndex} from '../interfaces/player';\nimport {RElement} from '../interfaces/renderer';\nimport {DirectiveRegistryValuesIndex, InitialStylingValues, StylingContext, StylingFlags, StylingIndex} from '../interfaces/styling';\nimport {HEADER_OFFSET, HOST, LView, RootContext} from '../interfaces/view';\nimport {getTNode, isStylingContext} from '../util/view_utils';\n\nimport {CorePlayerHandler} from './core_player_handler';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from './shared';\n\nexport const ANIMATION_PROP_PREFIX = '@';\n\nexport function createEmptyStylingContext(\n wrappedElement?: LContainer | LView | RElement | null, sanitizer?: StyleSanitizeFn | null,\n initialStyles?: InitialStylingValues | null,\n initialClasses?: InitialStylingValues | null): StylingContext {\n const context: StylingContext = [\n wrappedElement || null, // Element\n 0, // MasterFlags\n [] as any, // DirectiveRefs (this gets filled below)\n initialStyles || [null, null], // InitialStyles\n initialClasses || [null, null], // InitialClasses\n [0, 0], // SinglePropOffsets\n [0], // CachedMultiClassValue\n [0], // CachedMultiStyleValue\n null, // HostBuffer\n null, // PlayerContext\n ];\n\n // whenever a context is created there is always a `null` directive\n // that is registered (which is a placeholder for the \"template\").\n allocateOrUpdateDirectiveIntoContext(context, DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n return context;\n}\n\n/**\n * Allocates (registers) a directive into the directive registry within the provided styling\n * context.\n *\n * For each and every `[style]`, `[style.prop]`, `[class]`, `[class.name]` binding\n * (as well as static style and class attributes) a directive, component or template\n * is marked as the owner. When an owner is determined (this happens when the template\n * is first passed over) the directive owner is allocated into the styling context. When\n * this happens, each owner gets its own index value. This then ensures that once any\n * style and/or class binding are assigned into the context then they are marked to\n * that directive's index value.\n *\n * @param context the target StylingContext\n * @param directiveRef the directive that will be allocated into the context\n * @returns the index where the directive was inserted into\n */\nexport function allocateOrUpdateDirectiveIntoContext(\n context: StylingContext, directiveIndex: number, singlePropValuesIndex: number = -1,\n styleSanitizer?: StyleSanitizeFn | null | undefined): void {\n const directiveRegistry = context[StylingIndex.DirectiveRegistryPosition];\n\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n // we preemptively make space into the directives array and then\n // assign values slot-by-slot to ensure that if the directive ordering\n // changes then it will still function\n const limit = index + DirectiveRegistryValuesIndex.Size;\n for (let i = directiveRegistry.length; i < limit; i += DirectiveRegistryValuesIndex.Size) {\n // -1 is used to signal that the directive has been allocated, but\n // no actual style or class bindings have been registered yet...\n directiveRegistry.push(-1, null);\n }\n\n const propValuesStartPosition = index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset;\n if (singlePropValuesIndex >= 0 && directiveRegistry[propValuesStartPosition] === -1) {\n directiveRegistry[propValuesStartPosition] = singlePropValuesIndex;\n directiveRegistry[index + DirectiveRegistryValuesIndex.StyleSanitizerOffset] =\n styleSanitizer || null;\n }\n}\n\n/**\n * Used clone a copy of a pre-computed template of a styling context.\n *\n * A pre-computed template is designed to be computed once for a given element\n * (instructions.ts has logic for caching this).\n */\nexport function allocStylingContext(\n element: RElement | null, templateStyleContext: StylingContext): StylingContext {\n // each instance gets a copy\n const context = templateStyleContext.slice() as any as StylingContext;\n\n // the HEADER values contain arrays which also need\n // to be copied over into the new context\n for (let i = 0; i < StylingIndex.SingleStylesStartPosition; i++) {\n const value = templateStyleContext[i];\n if (Array.isArray(value)) {\n context[i] = value.slice();\n }\n }\n\n context[StylingIndex.ElementPosition] = element;\n\n // this will prevent any other directives from extending the context\n context[StylingIndex.MasterFlagPosition] |= StylingFlags.BindingAllocationLocked;\n return context;\n}\n\n/**\n * Retrieve the `StylingContext` at a given index.\n *\n * This method lazily creates the `StylingContext`. This is because in most cases\n * we have styling without any bindings. Creating `StylingContext` eagerly would mean that\n * every style declaration such as `<div style=\"color: red\">` would result `StyleContext`\n * which would create unnecessary memory pressure.\n *\n * @param index Index of the style allocation. See: `styling`.\n * @param viewData The view to search for the styling context\n */\nexport function getStylingContextFromLView(index: number, viewData: LView): StylingContext {\n let storageIndex = index;\n let slotValue: LContainer|LView|StylingContext|RElement = viewData[storageIndex];\n let wrapper: LContainer|LView|StylingContext = viewData;\n\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST] as LView | StylingContext | RElement;\n }\n\n if (isStylingContext(wrapper)) {\n return wrapper;\n } else {\n // This is an LView or an LContainer\n const stylingTemplate = getTNode(index - HEADER_OFFSET, viewData).stylingTemplate;\n\n if (wrapper !== viewData) {\n storageIndex = HOST;\n }\n\n return wrapper[storageIndex] = stylingTemplate ?\n allocStylingContext(slotValue, stylingTemplate) :\n createEmptyStylingContext(slotValue);\n }\n}\n\n\nexport function isAnimationProp(name: string): boolean {\n return name[0] === ANIMATION_PROP_PREFIX;\n}\n\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\n}\n\nexport function forceClassesAsString(classes: string | {[key: string]: any} | null | undefined):\n string {\n if (classes && typeof classes !== 'string') {\n classes = Object.keys(classes).join(' ');\n }\n return (classes as string) || '';\n}\n\nexport function forceStylesAsString(styles: {[key: string]: any} | null | undefined): string {\n let str = '';\n if (styles) {\n const props = Object.keys(styles);\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n str += (i ? ';' : '') + `${prop}:${styles[prop]}`;\n }\n }\n return str;\n}\n\nexport function addPlayerInternal(\n playerContext: PlayerContext, rootContext: RootContext, element: HTMLElement,\n player: Player | null, playerContextIndex: number, ref?: any): boolean {\n ref = ref || element;\n if (playerContextIndex) {\n playerContext[playerContextIndex] = player;\n } else {\n playerContext.push(player);\n }\n\n if (player) {\n player.addEventListener(PlayState.Destroyed, () => {\n const index = playerContext.indexOf(player);\n const nonFactoryPlayerIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n\n // if the player is being removed from the factory side of the context\n // (which is where the [style] and [class] bindings do their thing) then\n // that side of the array cannot be resized since the respective bindings\n // have pointer index values that point to the associated factory instance\n if (index) {\n if (index < nonFactoryPlayerIndex) {\n playerContext[index] = null;\n } else {\n playerContext.splice(index, 1);\n }\n }\n player.destroy();\n });\n\n const playerHandler =\n rootContext.playerHandler || (rootContext.playerHandler = new CorePlayerHandler());\n playerHandler.queuePlayer(player, ref);\n return true;\n }\n\n return false;\n}\n\nexport function getPlayersInternal(playerContext: PlayerContext): Player[] {\n const players: Player[] = [];\n const nonFactoryPlayersStart = playerContext[PlayerIndex.NonBuilderPlayersStart];\n\n // add all factory-based players (which are apart of [style] and [class] bindings)\n for (let i = PlayerIndex.PlayerBuildersStartPosition + PlayerIndex.PlayerOffsetPosition;\n i < nonFactoryPlayersStart; i += PlayerIndex.PlayerAndPlayerBuildersTupleSize) {\n const player = playerContext[i] as Player | null;\n if (player) {\n players.push(player);\n }\n }\n\n // add all custom players (not apart of [style] and [class] bindings)\n for (let i = nonFactoryPlayersStart; i < playerContext.length; i++) {\n players.push(playerContext[i] as Player);\n }\n\n return players;\n}\n\n\nexport function getOrCreatePlayerContext(target: {}, context?: LContext | null): PlayerContext|\n null {\n context = context || getLContext(target) !;\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return null;\n }\n\n const {lView, nodeIndex} = context;\n const stylingContext = getStylingContextFromLView(nodeIndex, lView);\n return getPlayerContext(stylingContext) || allocPlayerContext(stylingContext);\n}\n\nexport function getPlayerContext(stylingContext: StylingContext): PlayerContext|null {\n return stylingContext[StylingIndex.PlayerContext];\n}\n\nexport function allocPlayerContext(data: StylingContext): PlayerContext {\n return data[StylingIndex.PlayerContext] =\n [PlayerIndex.SinglePlayerBuildersStartPosition, null, null, null, null];\n}\n\nexport function throwInvalidRefError() {\n throw new Error('Only elements that exist in an Angular application can be used for animations');\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 */\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {ProceduralRenderer3, RElement, isProceduralRenderer} from '../interfaces/renderer';\nimport {RENDERER} from '../interfaces/view';\nimport {getLView} from '../state';\nimport {isAnimationProp} from '../styling/util';\n\n\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n *\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(native: RElement, attrs: TAttributes): number {\n const renderer = getLView()[RENDERER];\n const isProc = isProceduralRenderer(renderer);\n\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n (renderer as ProceduralRenderer3).setProperty(native, attrName, attrVal);\n }\n } else {\n isProc ?\n (renderer as ProceduralRenderer3)\n .setAttribute(native, attrName as string, attrVal as string) :\n native.setAttribute(attrName as string, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n\nexport function attrsStylingIndexOf(attrs: TAttributes, startIndex: number): number {\n for (let i = startIndex; i < attrs.length; i++) {\n const val = attrs[i];\n if (val === AttributeMarker.Classes || val === AttributeMarker.Styles) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string | AttributeMarker | CssSelector) {\n return marker === AttributeMarker.Bindings || marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n;\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 */\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, LView} from '../interfaces/view';\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW] !;\n viewOffset--;\n }\n return parentView;\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\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {TNodeType} from '../interfaces/node';\nimport {CONTEXT, DECLARATION_VIEW, FLAGS, LView, LViewFlags, PARENT, RootContext, T_HOST} from '../interfaces/view';\n\nimport {isLContainer, isLView, readPatchedLView} from './view_utils';\n\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView|null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] ! : parent;\n}\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView(componentOrLView: LView | {}): LView {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView) !;\n while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n lView = getLViewParent(lView) !;\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Given an `LView`, find the closest declaration view which is not an embedded view.\n *\n * This method searches for the `LView` associated with the component which declared the `LView`.\n *\n * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise\n * it walks the declaration parents until it finds a component view (non-embedded-view.)\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nexport function findComponentView(lView: LView): LView {\n let rootTNode = lView[T_HOST];\n while (rootTNode !== null && rootTNode.type === TNodeType.View) {\n ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');\n lView = lView[DECLARATION_VIEW] !;\n rootTNode = lView[T_HOST];\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext(viewOrComponent: LView | {}): RootContext {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as RootContext;\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\nimport {InjectFlags, InjectionToken} from '../di';\nimport {Injector} from '../di/injector';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/injector_compatibility';\nimport {getInjectableDef, getInjectorDef} from '../di/interface/defs';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual} from '../util/assert';\n\nimport {getComponentDef, getDirectiveDef, getPipeDef} from './definition';\nimport {NG_ELEMENT_ID} from './fields';\nimport {DirectiveDef, FactoryFn} from './interfaces/definition';\nimport {NO_PARENT_INJECTOR, NodeInjectorFactory, PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags, TNODE, isFactory} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {DECLARATION_VIEW, INJECTOR, LView, TData, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {getLView, getPreviousOrParentTNode, setTNodeAndViewData} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {isComponent, isComponentDef} from './util/view_utils';\n\n\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nfunction setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number, tView: TView, type: Type<any>| InjectionToken<any>| string): void {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'expected firstTemplatePass to be true');\n let id: number|undefined =\n typeof type !== 'string' ? (type as any)[NG_ELEMENT_ID] : type.charCodeAt(0) || 0;\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomBit = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomBit;\n\n // Use the raw bloomBit number to determine which bloom filter bucket we should check\n // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n const b7 = bloomBit & 0x80;\n const b6 = bloomBit & 0x40;\n const b5 = bloomBit & 0x20;\n const tData = tView.data as number[];\n\n if (b7) {\n b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :\n (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));\n } else {\n b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :\n (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));\n }\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param hostView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode | TContainerNode | TElementContainerNode, hostView: LView): number {\n const existingInjectorIndex = getInjectorIndex(tNode, hostView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = hostView[TVIEW];\n if (tView.firstTemplatePass) {\n tNode.injectorIndex = hostView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(hostView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n\n ngDevMode && assertEqual(\n tNode.flags === 0 || tNode.flags === TNodeFlags.isComponent, true,\n 'expected tNode.flags to not be initialized');\n }\n\n const parentLoc = getParentInjectorLocation(tNode, hostView);\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, hostView);\n\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < 8; i++) {\n hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode | null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\n\nexport function getInjectorIndex(tNode: TNode, hostView: LView): number {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {\n return -1;\n } else {\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`\n */\nexport function getParentInjectorLocation(tNode: TNode, view: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n return tNode.parent.injectorIndex as any; // ViewOffset is 0\n }\n\n // For most cases, the parent injector index can be found on the host node (e.g. for component\n // or container), so this loop will be skipped, but we must keep the loop here to support\n // the rarer case of deeply nested <ng-template> tags or inline views.\n let hostTNode = view[T_HOST];\n let viewOffset = 1;\n while (hostTNode && hostTNode.injectorIndex === -1) {\n view = view[DECLARATION_VIEW] !;\n hostTNode = view ? view[T_HOST] : null;\n viewOffset++;\n }\n\n return hostTNode ?\n hostTNode.injectorIndex | (viewOffset << RelativeInjectorLocationFlags.ViewOffsetShift) :\n -1 as any;\n}\n\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number, view: LView, token: InjectionToken<any>| Type<any>): void {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string|null {\n ngDevMode && assertNodeOfPossibleTypes(\n tNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n if (value === AttributeMarker.Classes && attrNameToInject === 'class') {\n let accumulatedClasses = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedClasses += ' ' + attrs[i++];\n }\n return accumulatedClasses.trim();\n } else if (value === AttributeMarker.Styles && attrNameToInject === 'style') {\n let accumulatedStyles = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedStyles += `${attrs[i++]}: ${attrs[i++]}; `;\n }\n return accumulatedStyles.trim();\n } else {\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. Negative values are reserved for special objects.\n * - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TElementNode | TContainerNode | TElementContainerNode | null, lView: LView,\n token: Type<T>| InjectionToken<T>, flags: InjectFlags = InjectFlags.Default,\n notFoundValue?: any): T|null {\n if (tNode) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n const savePreviousOrParentTNode = getPreviousOrParentTNode();\n const saveLView = getLView();\n setTNodeAndViewData(tNode, lView);\n try {\n const value = bloomHash();\n if (value == null && !(flags & InjectFlags.Optional)) {\n throw new Error(`No provider for ${stringifyForError(token)}!`);\n } else {\n return value;\n }\n } finally {\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n } else if (typeof bloomHash == 'number') {\n if (bloomHash === -1) {\n // `-1` is a special value used to identify `Injector` types.\n return new NodeInjector(tNode, lView) as any;\n }\n // If the token has a bloom hash, then it is a token which could be in NodeInjector.\n\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView|null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation: RelativeInjectorLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode|null =\n flags & InjectFlags.Host ? findComponentView(lView)[T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching\n // the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + PARENT_INJECTOR];\n\n if (!shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n parentLocation = lView[injectorIndex + PARENT_INJECTOR];\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T|null = searchTokensOnInjector<T>(\n injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n if (shouldSearchParent(\n flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n if (flags & InjectFlags.Optional) {\n return notFoundValue;\n } else {\n throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);\n }\n}\n\nconst NOT_FOUND = {};\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number, lView: LView, token: Type<T>| InjectionToken<T>,\n previousTView: TView | null, flags: InjectFlags, hostTElementNode: TNode | null) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponent(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && (tNode.type === TNodeType.Element));\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(currentTView.data, lView, injectableIdx, tNode as TElementNode);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode, tView: TView, token: Type<T>| InjectionToken<T>, canAccessViewProviders: boolean,\n isHostSpecialCase: boolean | number): number|null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex =\n canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as InjectionToken<any>| Type<any>| DirectiveDef<any>;\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n* Retrieve or instantiate the injectable from the `lData` at particular `index`.\n*\n* This function checks to see if the value has already been instantiated and if so returns the\n* cached `injectable`. Otherwise if it detects that the value is still a factory it\n* instantiates the `injectable` and caches the value.\n*/\nexport function getNodeInjectable(\n tData: TData, lData: LView, index: number, tNode: TElementNode): any {\n let value = lData[index];\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n let previousInjectImplementation;\n if (factory.injectImpl) {\n previousInjectImplementation = setInjectImplementation(factory.injectImpl);\n }\n const savePreviousOrParentTNode = getPreviousOrParentTNode();\n const saveLView = getLView();\n setTNodeAndViewData(tNode, lData);\n try {\n value = lData[index] = factory.factory(null, tData, lData, tNode);\n } finally {\n if (factory.injectImpl) setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(token: Type<any>| InjectionToken<any>| string): number|\n Function|undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number|undefined = (token as any)[NG_ELEMENT_ID];\n // Negative token IDs are used for special objects such as `Injector`\n return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId;\n}\n\nexport function bloomHasToken(\n bloomHash: number, injectorIndex: number, injectorView: LView | TData) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n const b7 = bloomHash & 0x80;\n const b6 = bloomHash & 0x40;\n const b5 = bloomHash & 0x20;\n\n // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n let value: number;\n\n if (b7) {\n value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :\n (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);\n } else {\n value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :\n (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);\n }\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean|number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode|TContainerNode|TElementContainerNode|null,\n private _lView: LView) {}\n\n get(token: any, notFoundValue?: any): any {\n return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n }\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetFactoryOf<T>(type: Type<any>): FactoryFn<T>|null {\n const typeAny = type as any;\n const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||\n getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;\n const factory = ɵɵgetFactoryOf<T>(proto);\n if (factory !== null) {\n return factory;\n } else {\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return (t) => new t();\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\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER, ERROR_ORIGINAL_ERROR, ERROR_TYPE} from './util/errors';\nimport {DebugContext} from './view';\n\nexport function getType(error: Error): Function {\n return (error as any)[ERROR_TYPE];\n}\n\nexport function getDebugContext(error: Error): DebugContext {\n return (error as any)[ERROR_DEBUG_CONTEXT];\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n\nexport function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void {\n return (error as any)[ERROR_LOGGER] || defaultErrorLogger;\n}\n\n\nfunction defaultErrorLogger(console: Console, ...values: any[]) {\n (<any>console.error)(...values);\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\nimport {getDebugContext, getErrorLogger, getOriginalError} from './errors';\n\n\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n const originalError = this._findOriginalError(error);\n const context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n const errorLogger = getErrorLogger(error);\n\n errorLogger(this._console, `ERROR`, error);\n if (originalError) {\n errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n }\n\n /** @internal */\n _findContext(error: any): any {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n\n return null;\n }\n\n /** @internal */\n _findOriginalError(error: Error): any {\n let e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e;\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/**\n * A schema definition associated with an NgModule.\n *\n * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata { name: string; }\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n name: 'custom-elements'\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema'\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\nimport './ng_dev_mode';\nimport {global} from './global';\n\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n\n\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\nexport function createNamedArrayType(name: string): typeof Array {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // We need to do it this way so that TypeScript does not down-level the below code.\n const FunctionConstructor: any = createNamedArrayType.constructor;\n return (new FunctionConstructor('Array', `return class ABC extends Array{}`))(Array);\n } catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n } else {\n throw new Error(\n 'Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\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\nexport function normalizeDebugBindingName(name: string) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n } catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\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\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n brand: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE = {} as NO_CHANGE;\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*/\nimport {HostInstructionsQueue, HostInstructionsQueueIndex, StylingContext, StylingIndex} from '../interfaces/styling';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from '../styling/shared';\n\n/*\n * This file contains the logic to defer all hostBindings-related styling code to run\n * at a later point, instead of immediately (as is the case with how template-level\n * styling instructions are run).\n *\n * Certain styling instructions, present within directives, components and sub-classed\n * directives, are evaluated at different points (depending on priority) and will therefore\n * not be applied to the styling context of an element immediately. They are instead\n * designed to be applied just before styling is applied to an element.\n *\n * (The priority for when certain host-related styling operations are executed is discussed\n * more within `interfaces/styling.ts`.)\n */\n\nexport function registerHostDirective(context: StylingContext, directiveIndex: number) {\n let buffer = context[StylingIndex.HostInstructionsQueue];\n if (!buffer) {\n buffer = context[StylingIndex.HostInstructionsQueue] = [DEFAULT_TEMPLATE_DIRECTIVE_INDEX];\n }\n buffer[HostInstructionsQueueIndex.LastRegisteredDirectiveIndexPosition] = directiveIndex;\n}\n\n/**\n * Queues a styling instruction to be run just before `renderStyling()` is executed.\n */\nexport function enqueueHostInstruction<T extends Function>(\n context: StylingContext, priority: number, instructionFn: T, instructionFnArgs: ParamsOf<T>) {\n const buffer: HostInstructionsQueue|null = context[StylingIndex.HostInstructionsQueue];\n // Buffer may be null if host element is a template node. In this case, just ignore the style.\n if (buffer != null) {\n const index = findNextInsertionIndex(buffer, priority);\n buffer.splice(index, 0, priority, instructionFn, instructionFnArgs);\n }\n}\n\n/**\n * Figures out where exactly to to insert the next host instruction queue entry.\n */\nfunction findNextInsertionIndex(buffer: HostInstructionsQueue, priority: number): number {\n for (let i = HostInstructionsQueueIndex.ValuesStartPosition; i < buffer.length;\n i += HostInstructionsQueueIndex.Size) {\n const p = buffer[i + HostInstructionsQueueIndex.DirectiveIndexOffset] as number;\n if (p > priority) {\n return i;\n }\n }\n return buffer.length;\n}\n\n/**\n * Iterates through the host instructions queue (if present within the provided\n * context) and executes each queued instruction entry.\n */\nexport function flushQueue(context: StylingContext): void {\n const buffer = context[StylingIndex.HostInstructionsQueue];\n if (buffer) {\n for (let i = HostInstructionsQueueIndex.ValuesStartPosition; i < buffer.length;\n i += HostInstructionsQueueIndex.Size) {\n const fn = buffer[i + HostInstructionsQueueIndex.InstructionFnOffset] as Function;\n const args = buffer[i + HostInstructionsQueueIndex.ParamsOffset] as any[];\n fn.apply(this, args);\n }\n buffer.length = HostInstructionsQueueIndex.ValuesStartPosition;\n }\n}\n\n/**\n * Determines whether or not to allow the host instructions queue to be flushed or not.\n *\n * Because the hostBindings function code is unaware of the presence of other host bindings\n * (as well as the template function) then styling is evaluated multiple times per element.\n * To prevent style and class values from being applied to the element multiple times, a\n * flush is only allowed when the last directive (the directive that was registered into\n * the styling context) attempts to render its styling.\n */\nexport function allowFlush(context: StylingContext, directiveIndex: number): boolean {\n const buffer = context[StylingIndex.HostInstructionsQueue];\n if (buffer) {\n return buffer[HostInstructionsQueueIndex.LastRegisteredDirectiveIndexPosition] ===\n directiveIndex;\n }\n return true;\n}\n\n/**\n * Infers the parameters of a given function into a typed array.\n */\nexport type ParamsOf<T> = T extends(...args: infer T) => any ? T : never;\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 */\nimport {PlayerFactory, PlayerFactoryBuildFn} from '../interfaces/player';\n\n/**\n * Combines the binding value and a factory for an animation player.\n *\n * Used to bind a player to an element template binding (currently only\n * `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings\n * supported). The provided `factoryFn` function will be run once all\n * the associated bindings have been evaluated on the element and is\n * designed to return a player which will then be placed on the element.\n *\n * @param factoryFn The function that is used to create a player\n * once all the rendering-related (styling values) have been\n * processed for the element binding.\n * @param value The raw value that will be exposed to the binding\n * so that the binding can update its internal values when\n * any changes are evaluated.\n */\nexport function bindPlayerFactory<T>(factoryFn: PlayerFactoryBuildFn, value: T): PlayerFactory {\n return new BoundPlayerFactory(factoryFn, value) as any;\n}\n\nexport class BoundPlayerFactory<T> {\n '__brand__': 'Brand for PlayerFactory that nothing will match';\n constructor(public fn: PlayerFactoryBuildFn, public value: T) {}\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*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {BindingStore, BindingType, Player, PlayerBuilder, PlayerFactory, PlayerIndex} from '../interfaces/player';\nimport {RElement, Renderer3, RendererStyleFlags3, isProceduralRenderer} from '../interfaces/renderer';\nimport {DirectiveOwnerAndPlayerBuilderIndex, DirectiveRegistryValuesIndex, InitialStylingValues, InitialStylingValuesIndex, MapBasedOffsetValues, MapBasedOffsetValuesIndex, SinglePropOffsetValues, SinglePropOffsetValuesIndex, StylingContext, StylingFlags, StylingIndex} from '../interfaces/styling';\nimport {LView, RootContext} from '../interfaces/view';\nimport {NO_CHANGE} from '../tokens';\nimport {getRootContext} from '../util/view_traversal_utils';\n\nimport {allowFlush as allowHostInstructionsQueueFlush, flushQueue as flushHostInstructionsQueue} from './host_instructions_queue';\nimport {BoundPlayerFactory} from './player_factory';\nimport {addPlayerInternal, allocPlayerContext, allocateOrUpdateDirectiveIntoContext, createEmptyStylingContext, getPlayerContext} from './util';\n\n\n/**\n * This file includes the code to power all styling-binding operations in Angular.\n *\n * These include:\n * [style]=\"myStyleObj\"\n * [class]=\"myClassObj\"\n * [style.prop]=\"myPropValue\"\n * [class.name]=\"myClassValue\"\n *\n * It also includes code that will allow style binding code to operate within host\n * bindings for components/directives.\n *\n * There are many different ways in which these functions below are called. Please see\n * `render3/interfaces/styling.ts` to get a better idea of how the styling algorithm works.\n */\n\n\n\n/**\n * Creates a new StylingContext an fills it with the provided static styling attribute values.\n */\nexport function initializeStaticContext(\n attrs: TAttributes, stylingStartIndex: number, directiveIndex: number = 0): StylingContext {\n const context = createEmptyStylingContext();\n patchContextWithStaticAttrs(context, attrs, stylingStartIndex, directiveIndex);\n return context;\n}\n\n/**\n * Designed to update an existing styling context with new static styling\n * data (classes and styles).\n *\n * @param context the existing styling context\n * @param attrs an array of new static styling attributes that will be\n * assigned to the context\n * @param attrsStylingStartIndex what index to start iterating within the\n * provided `attrs` array to start reading style and class values\n */\nexport function patchContextWithStaticAttrs(\n context: StylingContext, attrs: TAttributes, attrsStylingStartIndex: number,\n directiveIndex: number): void {\n // this means the context has already been set and instantiated\n if (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) return;\n\n allocateOrUpdateDirectiveIntoContext(context, directiveIndex);\n\n let initialClasses: InitialStylingValues|null = null;\n let initialStyles: InitialStylingValues|null = null;\n let mode = -1;\n for (let i = attrsStylingStartIndex; i < attrs.length; i++) {\n const attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n } else if (mode == AttributeMarker.Classes) {\n initialClasses = initialClasses || context[StylingIndex.InitialClassValuesPosition];\n patchInitialStylingValue(initialClasses, attr as string, true, directiveIndex);\n } else if (mode == AttributeMarker.Styles) {\n initialStyles = initialStyles || context[StylingIndex.InitialStyleValuesPosition];\n patchInitialStylingValue(initialStyles, attr as string, attrs[++i], directiveIndex);\n }\n }\n}\n\n/**\n * Designed to add a style or class value into the existing set of initial styles.\n *\n * The function will search and figure out if a style/class value is already present\n * within the provided initial styling array. If and when a style/class value is\n * present (allocated) then the code below will set the new value depending on the\n * following cases:\n *\n * 1) if the existing value is falsy (this happens because a `[class.prop]` or\n * `[style.prop]` binding was set, but there wasn't a matching static style\n * or class present on the context)\n * 2) if the value was set already by the template, component or directive, but the\n * new value is set on a higher level (i.e. a sub component which extends a parent\n * component sets its value after the parent has already set the same one)\n * 3) if the same directive provides a new set of styling values to set\n *\n * @param initialStyling the initial styling array where the new styling entry will be added to\n * @param prop the property value of the new entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the new entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n */\nfunction patchInitialStylingValue(\n initialStyling: InitialStylingValues, prop: string, value: any,\n directiveOwnerIndex: number): void {\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialStyling.length;\n i += InitialStylingValuesIndex.Size) {\n const key = initialStyling[i + InitialStylingValuesIndex.PropOffset];\n if (key === prop) {\n const existingValue =\n initialStyling[i + InitialStylingValuesIndex.ValueOffset] as string | null | boolean;\n const existingOwner =\n initialStyling[i + InitialStylingValuesIndex.DirectiveOwnerOffset] as number;\n if (allowValueChange(existingValue, value, existingOwner, directiveOwnerIndex)) {\n addOrUpdateStaticStyle(i, initialStyling, prop, value, directiveOwnerIndex);\n }\n return;\n }\n }\n\n // We did not find existing key, add a new one.\n addOrUpdateStaticStyle(null, initialStyling, prop, value, directiveOwnerIndex);\n}\n\n/**\n * Runs through the initial class values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the classes were applied up until\n */\nexport function renderInitialClasses(\n element: RElement, context: StylingContext, renderer: Renderer3, startIndex?: number): number {\n const initialClasses = context[StylingIndex.InitialClassValuesPosition];\n let i = startIndex || InitialStylingValuesIndex.KeyValueStartPosition;\n while (i < initialClasses.length) {\n const value = initialClasses[i + InitialStylingValuesIndex.ValueOffset];\n if (value) {\n setClass(\n element, initialClasses[i + InitialStylingValuesIndex.PropOffset] as string, true,\n renderer, null);\n }\n i += InitialStylingValuesIndex.Size;\n }\n return i;\n}\n\n/**\n * Runs through the initial styles values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the styles were applied up until\n */\nexport function renderInitialStyles(\n element: RElement, context: StylingContext, renderer: Renderer3, startIndex?: number) {\n const initialStyles = context[StylingIndex.InitialStyleValuesPosition];\n let i = startIndex || InitialStylingValuesIndex.KeyValueStartPosition;\n while (i < initialStyles.length) {\n const value = initialStyles[i + InitialStylingValuesIndex.ValueOffset];\n if (value) {\n setStyle(\n element, initialStyles[i + InitialStylingValuesIndex.PropOffset] as string,\n value as string, renderer, null);\n }\n i += InitialStylingValuesIndex.Size;\n }\n return i;\n}\n\nexport function allowNewBindingsForStylingContext(context: StylingContext): boolean {\n return (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) === 0;\n}\n\n/**\n * Adds in new binding values to a styling context.\n *\n * If a directive value is provided then all provided class/style binding names will\n * reference the provided directive.\n *\n * @param context the existing styling context\n * @param classBindingNames an array of class binding names that will be added to the context\n * @param styleBindingNames an array of style binding names that will be added to the context\n * @param styleSanitizer an optional sanitizer that handle all sanitization on for each of\n * the bindings added to the context. Note that if a directive is provided then the sanitizer\n * instance will only be active if and when the directive updates the bindings that it owns.\n */\nexport function updateContextWithBindings(\n context: StylingContext, directiveIndex: number, classBindingNames?: string[] | null,\n styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null) {\n if (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) return;\n\n // this means the context has already been patched with the directive's bindings\n const isNewDirective =\n findOrPatchDirectiveIntoRegistry(context, directiveIndex, false, styleSanitizer);\n if (!isNewDirective) {\n // this means the directive has already been patched in ... No point in doing anything\n return;\n }\n\n if (styleBindingNames) {\n styleBindingNames = hyphenateEntries(styleBindingNames);\n }\n\n // there are alot of variables being used below to track where in the context the new\n // binding values will be placed. Because the context consists of multiple types of\n // entries (single classes/styles and multi classes/styles) alot of the index positions\n // need to be computed ahead of time and the context needs to be extended before the values\n // are inserted in.\n const singlePropOffsetValues = context[StylingIndex.SinglePropOffsetPositions];\n const totalCurrentClassBindings =\n singlePropOffsetValues[SinglePropOffsetValuesIndex.ClassesCountPosition];\n const totalCurrentStyleBindings =\n singlePropOffsetValues[SinglePropOffsetValuesIndex.StylesCountPosition];\n\n const cachedClassMapValues = context[StylingIndex.CachedMultiClasses];\n const cachedStyleMapValues = context[StylingIndex.CachedMultiStyles];\n\n const classesOffset = totalCurrentClassBindings * StylingIndex.Size;\n const stylesOffset = totalCurrentStyleBindings * StylingIndex.Size;\n\n const singleStylesStartIndex = StylingIndex.SingleStylesStartPosition;\n let singleClassesStartIndex = singleStylesStartIndex + stylesOffset;\n let multiStylesStartIndex = singleClassesStartIndex + classesOffset;\n let multiClassesStartIndex = multiStylesStartIndex + stylesOffset;\n\n // because we're inserting more bindings into the context, this means that the\n // binding values need to be referenced the singlePropOffsetValues array so that\n // the template/directive can easily find them inside of the `styleProp`\n // and the `classProp` functions without iterating through the entire context.\n // The first step to setting up these reference points is to mark how many bindings\n // are being added. Even if these bindings already exist in the context, the directive\n // or template code will still call them unknowingly. Therefore the total values need\n // to be registered so that we know how many bindings are assigned to each directive.\n const currentSinglePropsLength = singlePropOffsetValues.length;\n singlePropOffsetValues.push(\n styleBindingNames ? styleBindingNames.length : 0,\n classBindingNames ? classBindingNames.length : 0);\n\n // the code below will check to see if a new style binding already exists in the context\n // if so then there is no point in inserting it into the context again. Whether or not it\n // exists the styling offset code will now know exactly where it is\n let insertionOffset = 0;\n const filteredStyleBindingNames: string[] = [];\n if (styleBindingNames && styleBindingNames.length) {\n for (let i = 0; i < styleBindingNames.length; i++) {\n const name = styleBindingNames[i];\n let singlePropIndex =\n getMatchingBindingIndex(context, name, singleStylesStartIndex, singleClassesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = singleClassesStartIndex + insertionOffset;\n insertionOffset += StylingIndex.Size;\n filteredStyleBindingNames.push(name);\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n\n // just like with the style binding loop above, the new class bindings get the same treatment...\n const filteredClassBindingNames: string[] = [];\n if (classBindingNames && classBindingNames.length) {\n for (let i = 0; i < classBindingNames.length; i++) {\n const name = classBindingNames[i];\n let singlePropIndex =\n getMatchingBindingIndex(context, name, singleClassesStartIndex, multiStylesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = multiStylesStartIndex + insertionOffset;\n insertionOffset += StylingIndex.Size;\n filteredClassBindingNames.push(name);\n } else {\n singlePropIndex += filteredStyleBindingNames.length * StylingIndex.Size;\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n\n // because new styles are being inserted, this means the existing collection of style offset\n // index values are incorrect (they point to the wrong values). The code below will run through\n // the entire offset array and update the existing set of index values to point to their new\n // locations while taking the new binding values into consideration.\n let i = SinglePropOffsetValuesIndex.ValueStartPosition;\n if (filteredStyleBindingNames.length) {\n while (i < currentSinglePropsLength) {\n const totalStyles =\n singlePropOffsetValues[i + SinglePropOffsetValuesIndex.StylesCountPosition];\n const totalClasses =\n singlePropOffsetValues[i + SinglePropOffsetValuesIndex.ClassesCountPosition];\n if (totalClasses) {\n const start = i + SinglePropOffsetValuesIndex.ValueStartPosition + totalStyles;\n for (let j = start; j < start + totalClasses; j++) {\n singlePropOffsetValues[j] += filteredStyleBindingNames.length * StylingIndex.Size;\n }\n }\n\n const total = totalStyles + totalClasses;\n i += SinglePropOffsetValuesIndex.ValueStartPosition + total;\n }\n }\n\n const totalNewEntries = filteredClassBindingNames.length + filteredStyleBindingNames.length;\n\n // in the event that there are new style values being inserted, all existing class and style\n // bindings need to have their pointer values offsetted with the new amount of space that is\n // used for the new style/class bindings.\n for (let i = singleStylesStartIndex; i < context.length; i += StylingIndex.Size) {\n const isMultiBased = i >= multiStylesStartIndex;\n const isClassBased = i >= (isMultiBased ? multiClassesStartIndex : singleClassesStartIndex);\n const flag = getPointers(context, i);\n const staticIndex = getInitialIndex(flag);\n let singleOrMultiIndex = getMultiOrSingleIndex(flag);\n if (isMultiBased) {\n singleOrMultiIndex +=\n isClassBased ? (filteredStyleBindingNames.length * StylingIndex.Size) : 0;\n } else {\n singleOrMultiIndex += (totalNewEntries * StylingIndex.Size) +\n ((isClassBased ? filteredStyleBindingNames.length : 0) * StylingIndex.Size);\n }\n setFlag(context, i, pointers(flag, staticIndex, singleOrMultiIndex));\n }\n\n // this is where we make space in the context for the new style bindings\n for (let i = 0; i < filteredStyleBindingNames.length * StylingIndex.Size; i++) {\n context.splice(multiClassesStartIndex, 0, null);\n context.splice(singleClassesStartIndex, 0, null);\n singleClassesStartIndex++;\n multiStylesStartIndex++;\n multiClassesStartIndex += 2; // both single + multi slots were inserted\n }\n\n // this is where we make space in the context for the new class bindings\n for (let i = 0; i < filteredClassBindingNames.length * StylingIndex.Size; i++) {\n context.splice(multiStylesStartIndex, 0, null);\n context.push(null);\n multiStylesStartIndex++;\n multiClassesStartIndex++;\n }\n\n const initialClasses = context[StylingIndex.InitialClassValuesPosition];\n const initialStyles = context[StylingIndex.InitialStyleValuesPosition];\n\n // the code below will insert each new entry into the context and assign the appropriate\n // flags and index values to them. It's important this runs at the end of this function\n // because the context, property offset and index values have all been computed just before.\n for (let i = 0; i < totalNewEntries; i++) {\n const entryIsClassBased = i >= filteredStyleBindingNames.length;\n const adjustedIndex = entryIsClassBased ? (i - filteredStyleBindingNames.length) : i;\n const propName = entryIsClassBased ? filteredClassBindingNames[adjustedIndex] :\n filteredStyleBindingNames[adjustedIndex];\n\n let multiIndex, singleIndex;\n if (entryIsClassBased) {\n multiIndex = multiClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * StylingIndex.Size);\n singleIndex = singleClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * StylingIndex.Size);\n } else {\n multiIndex =\n multiStylesStartIndex + ((totalCurrentStyleBindings + adjustedIndex) * StylingIndex.Size);\n singleIndex = singleStylesStartIndex +\n ((totalCurrentStyleBindings + adjustedIndex) * StylingIndex.Size);\n }\n\n // if a property is not found in the initial style values list then it\n // is ALWAYS added in case a follow-up directive introduces the same initial\n // style/class value later on.\n let initialValuesToLookup = entryIsClassBased ? initialClasses : initialStyles;\n let indexForInitial = getInitialStylingValuesIndexOf(initialValuesToLookup, propName);\n if (indexForInitial === -1) {\n indexForInitial = addOrUpdateStaticStyle(\n null, initialValuesToLookup, propName, entryIsClassBased ? false : null,\n directiveIndex) +\n InitialStylingValuesIndex.ValueOffset;\n } else {\n indexForInitial += InitialStylingValuesIndex.ValueOffset;\n }\n\n const initialFlag =\n prepareInitialFlag(context, propName, entryIsClassBased, styleSanitizer || null);\n\n setFlag(context, singleIndex, pointers(initialFlag, indexForInitial, multiIndex));\n setProp(context, singleIndex, propName);\n setValue(context, singleIndex, null);\n setPlayerBuilderIndex(context, singleIndex, 0, directiveIndex);\n\n setFlag(context, multiIndex, pointers(initialFlag, indexForInitial, singleIndex));\n setProp(context, multiIndex, propName);\n setValue(context, multiIndex, null);\n setPlayerBuilderIndex(context, multiIndex, 0, directiveIndex);\n }\n\n // the total classes/style values are updated so the next time the context is patched\n // additional style/class bindings from another directive then it knows exactly where\n // to insert them in the context\n singlePropOffsetValues[SinglePropOffsetValuesIndex.ClassesCountPosition] =\n totalCurrentClassBindings + filteredClassBindingNames.length;\n singlePropOffsetValues[SinglePropOffsetValuesIndex.StylesCountPosition] =\n totalCurrentStyleBindings + filteredStyleBindingNames.length;\n\n // the map-based values also need to know how many entries got inserted\n cachedClassMapValues[MapBasedOffsetValuesIndex.EntriesCountPosition] +=\n filteredClassBindingNames.length;\n cachedStyleMapValues[MapBasedOffsetValuesIndex.EntriesCountPosition] +=\n filteredStyleBindingNames.length;\n const newStylesSpaceAllocationSize = filteredStyleBindingNames.length * StylingIndex.Size;\n const newClassesSpaceAllocationSize = filteredClassBindingNames.length * StylingIndex.Size;\n\n // update the multi styles cache with a reference for the directive that was just inserted\n const directiveMultiStylesStartIndex =\n multiStylesStartIndex + totalCurrentStyleBindings * StylingIndex.Size;\n const cachedStyleMapIndex = cachedStyleMapValues.length;\n registerMultiMapEntry(\n context, directiveIndex, false, directiveMultiStylesStartIndex,\n filteredStyleBindingNames.length);\n\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < cachedStyleMapIndex;\n i += MapBasedOffsetValuesIndex.Size) {\n // multi values start after all the single values (which is also where classes are) in the\n // context therefore the new class allocation size should be taken into account\n cachedStyleMapValues[i + MapBasedOffsetValuesIndex.PositionStartOffset] +=\n newClassesSpaceAllocationSize + newStylesSpaceAllocationSize;\n }\n\n // update the multi classes cache with a reference for the directive that was just inserted\n const directiveMultiClassesStartIndex =\n multiClassesStartIndex + totalCurrentClassBindings * StylingIndex.Size;\n const cachedClassMapIndex = cachedClassMapValues.length;\n registerMultiMapEntry(\n context, directiveIndex, true, directiveMultiClassesStartIndex,\n filteredClassBindingNames.length);\n\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < cachedClassMapIndex;\n i += MapBasedOffsetValuesIndex.Size) {\n // the reason why both the styles + classes space is allocated to the existing offsets is\n // because the styles show up before the classes in the context and any new inserted\n // styles will offset any existing class entries in the context (even if there are no\n // new class entries added) also the reason why it's *2 is because both single + multi\n // entries for each new style have been added in the context before the multi class values\n // actually start\n cachedClassMapValues[i + MapBasedOffsetValuesIndex.PositionStartOffset] +=\n (newStylesSpaceAllocationSize * 2) + newClassesSpaceAllocationSize;\n }\n\n // there is no initial value flag for the master index since it doesn't\n // reference an initial style value\n const masterFlag = pointers(0, 0, multiStylesStartIndex);\n setFlag(context, StylingIndex.MasterFlagPosition, masterFlag);\n}\n\n/**\n * Searches through the existing registry of directives\n */\nexport function findOrPatchDirectiveIntoRegistry(\n context: StylingContext, directiveIndex: number, staticModeOnly: boolean,\n styleSanitizer?: StyleSanitizeFn | null): boolean {\n const directiveRegistry = context[StylingIndex.DirectiveRegistryPosition];\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n const singlePropStartPosition = index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset;\n\n // this means that the directive has already been registered into the registry\n if (index < directiveRegistry.length &&\n (directiveRegistry[singlePropStartPosition] as number) >= 0)\n return false;\n\n const singlePropsStartIndex =\n staticModeOnly ? -1 : context[StylingIndex.SinglePropOffsetPositions].length;\n allocateOrUpdateDirectiveIntoContext(\n context, directiveIndex, singlePropsStartIndex, styleSanitizer);\n return true;\n}\n\nfunction getMatchingBindingIndex(\n context: StylingContext, bindingName: string, start: number, end: number) {\n for (let j = start; j < end; j += StylingIndex.Size) {\n if (getProp(context, j) === bindingName) return j;\n }\n return -1;\n}\n\n/**\n * Registers the provided multi class values to the context.\n *\n * This function will iterate over the provided `classesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngClass` and `[class]`\n * both update the `foo` className value at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param classesInput The key/value map of CSS class names that will be used for the update.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\nexport function updateClassMap(\n context: StylingContext, classesInput: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n directiveIndex: number = 0): void {\n updateStylingMap(context, classesInput, true, directiveIndex);\n}\n\n/**\n * Registers the provided multi style values to the context.\n *\n * This function will iterate over the provided `stylesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngStyle` and `[style]`\n * both update the `width` property at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\nexport function updateStyleMap(\n context: StylingContext, stylesInput: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n directiveIndex: number = 0): void {\n updateStylingMap(context, stylesInput, false, directiveIndex);\n}\n\nfunction updateStylingMap(\n context: StylingContext, input: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n entryIsClassBased: boolean, directiveIndex: number = 0): void {\n ngDevMode && (entryIsClassBased ? ngDevMode.classMap++ : ngDevMode.styleMap++);\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n\n // early exit (this is what's done to avoid using ctx.bind() to cache the value)\n if (isMultiValueCacheHit(context, entryIsClassBased, directiveIndex, input)) return;\n\n input =\n input === NO_CHANGE ? readCachedMapValue(context, entryIsClassBased, directiveIndex) : input;\n\n const element = context[StylingIndex.ElementPosition] !as HTMLElement;\n const playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(\n input as any, element, entryIsClassBased ? BindingType.Class : BindingType.Style) :\n null;\n\n const rawValue =\n playerBuilder ? (input as BoundPlayerFactory<{[key: string]: any}|string>) !.value : input;\n\n // the position is always the same, but whether the player builder gets set\n // at all (depending if its set) will be reflected in the index value below...\n const playerBuilderPosition = entryIsClassBased ? PlayerIndex.ClassMapPlayerBuilderPosition :\n PlayerIndex.StyleMapPlayerBuilderPosition;\n let playerBuilderIndex = playerBuilder ? playerBuilderPosition : 0;\n let playerBuildersAreDirty = false;\n if (hasPlayerBuilderChanged(context, playerBuilder, playerBuilderPosition)) {\n setPlayerBuilder(context, playerBuilder, playerBuilderPosition);\n playerBuildersAreDirty = true;\n }\n\n // each time a string-based value pops up then it shouldn't require a deep\n // check of what's changed.\n let startIndex: number;\n let endIndex: number;\n let propNames: string[];\n let applyAll = false;\n if (entryIsClassBased) {\n if (typeof rawValue == 'string') {\n propNames = rawValue.split(/\\s+/);\n // this boolean is used to avoid having to create a key/value map of `true` values\n // since a className string implies that all those classes are added\n applyAll = true;\n } else {\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY;\n }\n startIndex = getMultiClassesStartIndex(context);\n endIndex = context.length;\n } else {\n startIndex = getMultiStylesStartIndex(context);\n endIndex = getMultiClassesStartIndex(context);\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY;\n }\n\n const values = (rawValue || EMPTY_OBJ) as{[key: string]: any};\n patchStylingMapIntoContext(\n context, directiveIndex, playerBuilderIndex, startIndex, endIndex, propNames,\n applyAll || values, input, entryIsClassBased);\n\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n\n ngDevMode && (entryIsClassBased ? ngDevMode.classMapCacheMiss++ : ngDevMode.styleMapCacheMiss++);\n}\n\n/**\n * Applies the given multi styling (styles or classes) values to the context.\n *\n * The styling algorithm code that applies multi-level styling (things like `[style]` and `[class]`\n * values) resides here.\n *\n * Because this function understands that multiple directives may all write to the `[style]` and\n * `[class]` bindings (through host bindings), it relies of each directive applying its binding\n * value in order. This means that a directive like `classADirective` will always fire before\n * `classBDirective` and therefore its styling values (classes and styles) will always be evaluated\n * in the same order. Because of this consistent ordering, the first directive has a higher priority\n * than the second one. It is with this prioritzation mechanism that the styling algorithm knows how\n * to merge and apply redudant styling properties.\n *\n * The function itself applies the key/value entries (or an array of keys) to\n * the context in the following steps.\n *\n * STEP 1:\n * First check to see what properties are already set and in use by another directive in the\n * context (e.g. `ngClass` set the `width` value and `[style.width]=\"w\"` in a directive is\n * attempting to set it as well).\n *\n * STEP 2:\n * All remaining properties (that were not set prior to this directive) are now updated in\n * the context. Any new properties are inserted exactly at their spot in the context and any\n * previously set properties are shifted to exactly where the cursor sits while iterating over\n * the context. The end result is a balanced context that includes the exact ordering of the\n * styling properties/values for the provided input from the directive.\n *\n * STEP 3:\n * Any unmatched properties in the context that belong to the directive are set to null\n *\n * Once the updating phase is done, then the algorithm will decide whether or not to flag the\n * follow-up directives (the directives that will pass in their styling values) depending on if\n * the \"shape\" of the multi-value map has changed (either if any keys are removed or added or\n * if there are any new `null` values). If any follow-up directives are flagged as dirty then the\n * algorithm will run again for them. Otherwise if the shape did not change then any follow-up\n * directives will not run (so long as their binding values stay the same).\n *\n * @returns the total amount of new slots that were allocated into the context due to new styling\n * properties that were detected.\n */\nfunction patchStylingMapIntoContext(\n context: StylingContext, directiveIndex: number, playerBuilderIndex: number, ctxStart: number,\n ctxEnd: number, props: (string | null)[], values: {[key: string]: any} | true, cacheValue: any,\n entryIsClassBased: boolean): number {\n let dirty = false;\n\n const cacheIndex = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n\n // the cachedValues array is the registry of all multi style values (map values). Each\n // value is stored (cached) each time is updated.\n const cachedValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n\n // this is the index in which this directive has ownership access to write to this\n // value (anything before is owned by a previous directive that is more important)\n const ownershipValuesStartIndex =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.PositionStartOffset];\n\n const existingCachedValue = cachedValues[cacheIndex + MapBasedOffsetValuesIndex.ValueOffset];\n const existingCachedValueCount =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.ValueCountOffset];\n const existingCachedValueIsDirty =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.DirtyFlagOffset] === 1;\n\n // A shape change means the provided map value has either removed or added new properties\n // compared to what were in the last time. If a shape change occurs then it means that all\n // follow-up multi-styling entries are obsolete and will be examined again when CD runs\n // them. If a shape change has not occurred then there is no reason to check any other\n // directive values if their identity has not changed. If a previous directive set this\n // value as dirty (because its own shape changed) then this means that the object has been\n // offset to a different area in the context. Because its value has been offset then it\n // can't write to a region that it wrote to before (which may have been apart of another\n // directive) and therefore its shape changes too.\n let valuesEntryShapeChange =\n existingCachedValueIsDirty || ((!existingCachedValue && cacheValue) ? true : false);\n\n let totalUniqueValues = 0;\n let totalNewAllocatedSlots = 0;\n\n // this is a trick to avoid building {key:value} map where all the values\n // are `true` (this happens when a className string is provided instead of a\n // map as an input value to this styling algorithm)\n const applyAllProps = values === true;\n\n // STEP 1:\n // loop through the earlier directives and figure out if any properties here will be placed\n // in their area (this happens when the value is null because the earlier directive erased it).\n let ctxIndex = ctxStart;\n let totalRemainingProperties = props.length;\n while (ctxIndex < ownershipValuesStartIndex) {\n const currentProp = getProp(context, ctxIndex);\n if (totalRemainingProperties) {\n for (let i = 0; i < props.length; i++) {\n const mapProp = props[i];\n const normalizedProp = mapProp ? (entryIsClassBased ? mapProp : hyphenate(mapProp)) : null;\n if (normalizedProp && currentProp === normalizedProp) {\n const currentValue = getValue(context, ctxIndex);\n const currentDirectiveIndex = getDirectiveIndexFromEntry(context, ctxIndex);\n const value = applyAllProps ? true : (values as{[key: string]: any})[normalizedProp];\n const currentFlag = getPointers(context, ctxIndex);\n if (hasValueChanged(currentFlag, currentValue, value) &&\n allowValueChange(currentValue, value, currentDirectiveIndex, directiveIndex)) {\n setValue(context, ctxIndex, value);\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n if (hasInitialValueChanged(context, currentFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n props[i] = null;\n totalRemainingProperties--;\n break;\n }\n }\n }\n ctxIndex += StylingIndex.Size;\n }\n\n // STEP 2:\n // apply the left over properties to the context in the correct order.\n if (totalRemainingProperties) {\n const sanitizer = entryIsClassBased ? null : getStyleSanitizer(context, directiveIndex);\n propertiesLoop: for (let i = 0; i < props.length; i++) {\n const mapProp = props[i];\n\n if (!mapProp) {\n // this is an early exit in case a value was already encountered above in the\n // previous loop (which means that the property was applied or rejected)\n continue;\n }\n\n const value = applyAllProps ? true : (values as{[key: string]: any})[mapProp];\n const normalizedProp = entryIsClassBased ? mapProp : hyphenate(mapProp);\n const isInsideOwnershipArea = ctxIndex >= ownershipValuesStartIndex;\n\n for (let j = ctxIndex; j < ctxEnd; j += StylingIndex.Size) {\n const distantCtxProp = getProp(context, j);\n if (distantCtxProp === normalizedProp) {\n const distantCtxDirectiveIndex = getDirectiveIndexFromEntry(context, j);\n const distantCtxPlayerBuilderIndex = getPlayerBuilderIndex(context, j);\n const distantCtxValue = getValue(context, j);\n const distantCtxFlag = getPointers(context, j);\n\n if (allowValueChange(distantCtxValue, value, distantCtxDirectiveIndex, directiveIndex)) {\n // even if the entry isn't updated (by value or directiveIndex) then\n // it should still be moved over to the correct spot in the array so\n // the iteration loop is tighter.\n if (isInsideOwnershipArea) {\n swapMultiContextEntries(context, ctxIndex, j);\n totalUniqueValues++;\n }\n\n if (hasValueChanged(distantCtxFlag, distantCtxValue, value)) {\n if (value === null || value === undefined && value !== distantCtxValue) {\n valuesEntryShapeChange = true;\n }\n\n setValue(context, ctxIndex, value);\n\n // SKIP IF INITIAL CHECK\n // If the former `value` is `null` then it means that an initial value\n // could be being rendered on screen. If that is the case then there is\n // no point in updating the value in case it matches. In other words if the\n // new value is the exact same as the previously rendered value (which\n // happens to be the initial value) then do nothing.\n if (distantCtxValue !== null ||\n hasInitialValueChanged(context, distantCtxFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n\n if (distantCtxDirectiveIndex !== directiveIndex ||\n playerBuilderIndex !== distantCtxPlayerBuilderIndex) {\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n }\n\n ctxIndex += StylingIndex.Size;\n continue propertiesLoop;\n }\n }\n\n // fallback case ... value not found at all in the context\n if (value != null) {\n valuesEntryShapeChange = true;\n totalUniqueValues++;\n const flag = prepareInitialFlag(context, normalizedProp, entryIsClassBased, sanitizer) |\n StylingFlags.Dirty;\n\n const insertionIndex = isInsideOwnershipArea ?\n ctxIndex :\n (ownershipValuesStartIndex + totalNewAllocatedSlots * StylingIndex.Size);\n insertNewMultiProperty(\n context, insertionIndex, entryIsClassBased, normalizedProp, flag, value, directiveIndex,\n playerBuilderIndex);\n\n totalNewAllocatedSlots++;\n ctxEnd += StylingIndex.Size;\n ctxIndex += StylingIndex.Size;\n\n dirty = true;\n }\n }\n }\n\n // STEP 3:\n // Remove (nullify) any existing entries in the context that were not apart of the\n // map input value that was passed into this algorithm for this directive.\n while (ctxIndex < ctxEnd) {\n valuesEntryShapeChange = true; // some values are missing\n const ctxValue = getValue(context, ctxIndex);\n const ctxFlag = getPointers(context, ctxIndex);\n const ctxDirective = getDirectiveIndexFromEntry(context, ctxIndex);\n if (ctxValue != null) {\n valuesEntryShapeChange = true;\n }\n if (hasValueChanged(ctxFlag, ctxValue, null)) {\n setValue(context, ctxIndex, null);\n // only if the initial value is falsy then\n if (hasInitialValueChanged(context, ctxFlag, ctxValue)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n ctxIndex += StylingIndex.Size;\n }\n\n // Because the object shape has changed, this means that all follow-up directives will need to\n // reapply their values into the object. For this to happen, the cached array needs to be updated\n // with dirty flags so that follow-up calls to `updateStylingMap` will reapply their styling code.\n // the reapplication of styling code within the context will reshape it and update the offset\n // values (also follow-up directives can write new values in case earlier directives set anything\n // to null due to removals or falsy values).\n valuesEntryShapeChange = valuesEntryShapeChange || existingCachedValueCount !== totalUniqueValues;\n updateCachedMapValue(\n context, directiveIndex, entryIsClassBased, cacheValue, ownershipValuesStartIndex, ctxEnd,\n totalUniqueValues, valuesEntryShapeChange);\n\n if (dirty) {\n setContextDirty(context, true);\n }\n\n return totalNewAllocatedSlots;\n}\n\n/**\n * Sets and resolves a single class value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * @param context The styling context that will be updated with the\n * newly provided class value.\n * @param offset The index of the CSS class which is being updated.\n * @param addOrRemove Whether or not to add or remove the CSS class\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\nexport function updateClassProp(\n context: StylingContext, offset: number,\n input: boolean | BoundPlayerFactory<boolean|null>| null, directiveIndex: number = 0,\n forceOverride?: boolean): void {\n updateSingleStylingValue(context, offset, input, true, directiveIndex, forceOverride);\n}\n\n/**\n * Sets and resolves a single style value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * Note that prop-level styling values are considered higher priority than any styling that\n * has been applied using `updateStylingMap`, therefore, when styling values are rendered\n * then any styles/classes that have been applied using this function will be considered first\n * (then multi values second and then initial values as a backup).\n *\n * @param context The styling context that will be updated with the\n * newly provided style value.\n * @param offset The index of the property which is being updated.\n * @param value The CSS style value that will be assigned\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\nexport function updateStyleProp(\n context: StylingContext, offset: number,\n input: string | boolean | null | BoundPlayerFactory<string|boolean|null>,\n directiveIndex: number = 0, forceOverride?: boolean): void {\n updateSingleStylingValue(context, offset, input, false, directiveIndex, forceOverride);\n}\n\nfunction updateSingleStylingValue(\n context: StylingContext, offset: number,\n input: string | boolean | null | BoundPlayerFactory<string|boolean|null>, isClassBased: boolean,\n directiveIndex: number, forceOverride?: boolean): void {\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n const singleIndex = getSinglePropIndexValue(context, directiveIndex, offset, isClassBased);\n const currValue = getValue(context, singleIndex);\n const currFlag = getPointers(context, singleIndex);\n const currDirective = getDirectiveIndexFromEntry(context, singleIndex);\n const value: string|boolean|null = (input instanceof BoundPlayerFactory) ? input.value : input;\n\n ngDevMode && ngDevMode.stylingProp++;\n\n if (hasValueChanged(currFlag, currValue, value) &&\n (forceOverride || allowValueChange(currValue, value, currDirective, directiveIndex))) {\n const isClassBased = (currFlag & StylingFlags.Class) === StylingFlags.Class;\n const element = context[StylingIndex.ElementPosition] !as HTMLElement;\n const playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(\n input as any, element, isClassBased ? BindingType.Class : BindingType.Style) :\n null;\n const value = (playerBuilder ? (input as BoundPlayerFactory<any>).value : input) as string |\n boolean | null;\n const currPlayerIndex = getPlayerBuilderIndex(context, singleIndex);\n\n let playerBuildersAreDirty = false;\n let playerBuilderIndex = playerBuilder ? currPlayerIndex : 0;\n if (hasPlayerBuilderChanged(context, playerBuilder, currPlayerIndex)) {\n const newIndex = setPlayerBuilder(context, playerBuilder, currPlayerIndex);\n playerBuilderIndex = playerBuilder ? newIndex : 0;\n playerBuildersAreDirty = true;\n }\n\n if (playerBuildersAreDirty || currDirective !== directiveIndex) {\n setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex, directiveIndex);\n }\n\n if (currDirective !== directiveIndex) {\n const prop = getProp(context, singleIndex);\n const sanitizer = getStyleSanitizer(context, directiveIndex);\n setSanitizeFlag(\n context, singleIndex,\n (sanitizer && sanitizer(prop, null, StyleSanitizeMode.ValidateProperty)) ? true : false);\n }\n\n // the value will always get updated (even if the dirty flag is skipped)\n setValue(context, singleIndex, value);\n const indexForMulti = getMultiOrSingleIndex(currFlag);\n\n // if the value is the same in the multi-area then there's no point in re-assembling\n const valueForMulti = getValue(context, indexForMulti);\n if (!valueForMulti || hasValueChanged(currFlag, valueForMulti, value)) {\n let multiDirty = false;\n let singleDirty = true;\n\n // only when the value is set to `null` should the multi-value get flagged\n if (!valueExists(value, isClassBased) && valueExists(valueForMulti, isClassBased)) {\n multiDirty = true;\n singleDirty = false;\n }\n\n setDirty(context, indexForMulti, multiDirty);\n setDirty(context, singleIndex, singleDirty);\n setContextDirty(context, true);\n }\n\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n\n ngDevMode && ngDevMode.stylingPropCacheMiss++;\n }\n}\n\n\n/**\n * Renders all queued styling using a renderer onto the given element.\n *\n * This function works by rendering any styles (that have been applied\n * using `updateStylingMap`) and any classes (that have been applied using\n * `updateStyleProp`) onto the provided element using the provided renderer.\n * Just before the styles/classes are rendered a final key/value style map\n * will be assembled (if `styleStore` or `classStore` are provided).\n *\n * @param lElement the element that the styles will be rendered on\n * @param context The styling context that will be used to determine\n * what styles will be rendered\n * @param renderer the renderer that will be used to apply the styling\n * @param classesStore if provided, the updated class values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @param stylesStore if provided, the updated style values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @returns number the total amount of players that got queued for animation (if any)\n */\nexport function renderStyling(\n context: StylingContext, renderer: Renderer3 | null, rootOrView: RootContext | LView,\n isFirstRender: boolean, classesStore?: BindingStore | null, stylesStore?: BindingStore | null,\n directiveIndex: number = 0): number {\n let totalPlayersQueued = 0;\n ngDevMode && ngDevMode.stylingApply++;\n\n // this prevents multiple attempts to render style/class values on\n // the same element...\n if (allowHostInstructionsQueueFlush(context, directiveIndex)) {\n // all styling instructions present within any hostBindings functions\n // do not update the context immediately when called. They are instead\n // queued up and applied to the context right at this point. Why? This\n // is because Angular evaluates component/directive and directive\n // sub-class code at different points and it's important that the\n // styling values are applied to the context in the right order\n // (see `interfaces/styling.ts` for more information).\n flushHostInstructionsQueue(context);\n\n if (isContextDirty(context)) {\n ngDevMode && ngDevMode.stylingApplyCacheMiss++;\n\n // this is here to prevent things like <ng-container [style] [class]>...</ng-container>\n // or if there are any host style or class bindings present in a directive set on\n // a container node\n const native = context[StylingIndex.ElementPosition] !as HTMLElement;\n\n const flushPlayerBuilders: any =\n context[StylingIndex.MasterFlagPosition] & StylingFlags.PlayerBuildersDirty;\n const multiStartIndex = getMultiStylesStartIndex(context);\n\n for (let i = StylingIndex.SingleStylesStartPosition; i < context.length;\n i += StylingIndex.Size) {\n // there is no point in rendering styles that have not changed on screen\n if (isDirty(context, i)) {\n const flag = getPointers(context, i);\n const directiveIndex = getDirectiveIndexFromEntry(context, i);\n const prop = getProp(context, i);\n const value = getValue(context, i);\n const styleSanitizer =\n (flag & StylingFlags.Sanitize) ? getStyleSanitizer(context, directiveIndex) : null;\n const playerBuilder = getPlayerBuilder(context, i);\n const isClassBased = flag & StylingFlags.Class ? true : false;\n const isInSingleRegion = i < multiStartIndex;\n\n let valueToApply: string|boolean|null = value;\n\n // VALUE DEFER CASE 1: Use a multi value instead of a null single value\n // this check implies that a single value was removed and we\n // should now defer to a multi value and use that (if set).\n if (isInSingleRegion && !valueExists(valueToApply, isClassBased)) {\n // single values ALWAYS have a reference to a multi index\n const multiIndex = getMultiOrSingleIndex(flag);\n valueToApply = getValue(context, multiIndex);\n }\n\n // VALUE DEFER CASE 2: Use the initial value if all else fails (is falsy)\n // the initial value will always be a string or null,\n // therefore we can safely adopt it in case there's nothing else\n // note that this should always be a falsy check since `false` is used\n // for both class and style comparisons (styles can't be false and false\n // classes are turned off and should therefore defer to their initial values)\n // Note that we ignore class-based deferals because otherwise a class can never\n // be removed in the case that it exists as true in the initial classes list...\n if (!valueExists(valueToApply, isClassBased)) {\n valueToApply = getInitialValue(context, flag);\n }\n\n // if the first render is true then we do not want to start applying falsy\n // values to the DOM element's styling. Otherwise then we know there has\n // been a change and even if it's falsy then it's removing something that\n // was truthy before.\n const doApplyValue = renderer && (isFirstRender ? valueToApply : true);\n if (doApplyValue) {\n if (isClassBased) {\n setClass(\n native, prop, valueToApply ? true : false, renderer !, classesStore,\n playerBuilder);\n } else {\n setStyle(\n native, prop, valueToApply as string | null, renderer !, styleSanitizer,\n stylesStore, playerBuilder);\n }\n }\n\n setDirty(context, i, false);\n }\n }\n\n if (flushPlayerBuilders) {\n const rootContext =\n Array.isArray(rootOrView) ? getRootContext(rootOrView) : rootOrView as RootContext;\n const playerContext = getPlayerContext(context) !;\n const playersStartIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n for (let i = PlayerIndex.PlayerBuildersStartPosition; i < playersStartIndex;\n i += PlayerIndex.PlayerAndPlayerBuildersTupleSize) {\n const builder = playerContext[i] as ClassAndStylePlayerBuilder<any>| null;\n const playerInsertionIndex = i + PlayerIndex.PlayerOffsetPosition;\n const oldPlayer = playerContext[playerInsertionIndex] as Player | null;\n if (builder) {\n const player = builder.buildPlayer(oldPlayer, isFirstRender);\n if (player !== undefined) {\n if (player != null) {\n const wasQueued = addPlayerInternal(\n playerContext, rootContext, native as HTMLElement, player,\n playerInsertionIndex);\n wasQueued && totalPlayersQueued++;\n }\n if (oldPlayer) {\n oldPlayer.destroy();\n }\n }\n } else if (oldPlayer) {\n // the player builder has been removed ... therefore we should delete the associated\n // player\n oldPlayer.destroy();\n }\n }\n setContextPlayersDirty(context, false);\n }\n\n setContextDirty(context, false);\n }\n }\n\n return totalPlayersQueued;\n}\n\n/**\n * Assigns a style value to a style property for the given element.\n *\n * This function renders a given CSS prop/value entry using the\n * provided renderer. If a `store` value is provided then\n * that will be used a render context instead of the provided\n * renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nexport function setStyle(\n native: any, prop: string, value: string | null, renderer: Renderer3,\n sanitizer: StyleSanitizeFn | null, store?: BindingStore | null,\n playerBuilder?: ClassAndStylePlayerBuilder<any>| null) {\n value =\n sanitizer && value ? sanitizer(prop, value, StyleSanitizeMode.ValidateAndSanitize) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n } else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n } else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n}\n\n/**\n * Adds/removes the provided className value to the provided element.\n *\n * This function renders a given CSS class value using the provided\n * renderer (by adding or removing it from the provided element).\n * If a `store` value is provided then that will be used a render\n * context instead of the provided renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nfunction setClass(\n native: any, className: string, add: boolean, renderer: Renderer3, store?: BindingStore | null,\n playerBuilder?: ClassAndStylePlayerBuilder<any>| null) {\n if (store || playerBuilder) {\n if (store) {\n store.setValue(className, add);\n }\n if (playerBuilder) {\n playerBuilder.setValue(className, add);\n }\n // DOMTokenList will throw if we try to add or remove an empty string.\n } else if (className !== '') {\n if (add) {\n ngDevMode && ngDevMode.rendererAddClass++;\n isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native['classList'].add(className);\n } else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native['classList'].remove(className);\n }\n }\n}\n\nfunction setSanitizeFlag(context: StylingContext, index: number, sanitizeYes: boolean) {\n if (sanitizeYes) {\n (context[index] as number) |= StylingFlags.Sanitize;\n } else {\n (context[index] as number) &= ~StylingFlags.Sanitize;\n }\n}\n\nfunction setDirty(context: StylingContext, index: number, isDirtyYes: boolean) {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n if (isDirtyYes) {\n (context[adjustedIndex] as number) |= StylingFlags.Dirty;\n } else {\n (context[adjustedIndex] as number) &= ~StylingFlags.Dirty;\n }\n}\n\nfunction isDirty(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Dirty) == StylingFlags.Dirty;\n}\n\nexport function isClassBasedValue(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Class) == StylingFlags.Class;\n}\n\nfunction isSanitizable(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Sanitize) == StylingFlags.Sanitize;\n}\n\nfunction pointers(configFlag: number, staticIndex: number, dynamicIndex: number) {\n return (configFlag & StylingFlags.BitMask) | (staticIndex << StylingFlags.BitCountSize) |\n (dynamicIndex << (StylingIndex.BitCountSize + StylingFlags.BitCountSize));\n}\n\nfunction getInitialValue(context: StylingContext, flag: number): string|boolean|null {\n const index = getInitialIndex(flag);\n const entryIsClassBased = flag & StylingFlags.Class;\n const initialValues = entryIsClassBased ? context[StylingIndex.InitialClassValuesPosition] :\n context[StylingIndex.InitialStyleValuesPosition];\n return initialValues[index] as string | boolean | null;\n}\n\nfunction getInitialIndex(flag: number): number {\n return (flag >> StylingFlags.BitCountSize) & StylingIndex.BitMask;\n}\n\nfunction getMultiOrSingleIndex(flag: number): number {\n const index =\n (flag >> (StylingIndex.BitCountSize + StylingFlags.BitCountSize)) & StylingIndex.BitMask;\n return index >= StylingIndex.SingleStylesStartPosition ? index : -1;\n}\n\nfunction getMultiStartIndex(context: StylingContext): number {\n return getMultiOrSingleIndex(context[StylingIndex.MasterFlagPosition]) as number;\n}\n\nfunction getMultiClassesStartIndex(context: StylingContext): number {\n const classCache = context[StylingIndex.CachedMultiClasses];\n return classCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n}\n\nfunction getMultiStylesStartIndex(context: StylingContext): number {\n const stylesCache = context[StylingIndex.CachedMultiStyles];\n return stylesCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n}\n\nfunction setProp(context: StylingContext, index: number, prop: string) {\n context[index + StylingIndex.PropertyOffset] = prop;\n}\n\nfunction setValue(context: StylingContext, index: number, value: string | null | boolean) {\n context[index + StylingIndex.ValueOffset] = value;\n}\n\nfunction hasPlayerBuilderChanged(\n context: StylingContext, builder: ClassAndStylePlayerBuilder<any>| null, index: number) {\n const playerContext = context[StylingIndex.PlayerContext] !;\n if (builder) {\n if (!playerContext || index === 0) {\n return true;\n }\n } else if (!playerContext) {\n return false;\n }\n return playerContext[index] !== builder;\n}\n\nfunction setPlayerBuilder(\n context: StylingContext, builder: ClassAndStylePlayerBuilder<any>| null,\n insertionIndex: number): number {\n let playerContext = context[StylingIndex.PlayerContext] || allocPlayerContext(context);\n if (insertionIndex > 0) {\n playerContext[insertionIndex] = builder;\n } else {\n insertionIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n playerContext.splice(insertionIndex, 0, builder, null);\n playerContext[PlayerIndex.NonBuilderPlayersStart] +=\n PlayerIndex.PlayerAndPlayerBuildersTupleSize;\n }\n return insertionIndex;\n}\n\nexport function directiveOwnerPointers(directiveIndex: number, playerIndex: number) {\n return (playerIndex << DirectiveOwnerAndPlayerBuilderIndex.BitCountSize) | directiveIndex;\n}\n\nfunction setPlayerBuilderIndex(\n context: StylingContext, index: number, playerBuilderIndex: number, directiveIndex: number) {\n const value = directiveOwnerPointers(directiveIndex, playerBuilderIndex);\n context[index + StylingIndex.PlayerBuilderIndexOffset] = value;\n}\n\nfunction getPlayerBuilderIndex(context: StylingContext, index: number): number {\n const flag = context[index + StylingIndex.PlayerBuilderIndexOffset] as number;\n const playerBuilderIndex = (flag >> DirectiveOwnerAndPlayerBuilderIndex.BitCountSize) &\n DirectiveOwnerAndPlayerBuilderIndex.BitMask;\n return playerBuilderIndex;\n}\n\nfunction getPlayerBuilder(context: StylingContext, index: number): ClassAndStylePlayerBuilder<any>|\n null {\n const playerBuilderIndex = getPlayerBuilderIndex(context, index);\n if (playerBuilderIndex) {\n const playerContext = context[StylingIndex.PlayerContext];\n if (playerContext) {\n return playerContext[playerBuilderIndex] as ClassAndStylePlayerBuilder<any>| null;\n }\n }\n return null;\n}\n\nfunction setFlag(context: StylingContext, index: number, flag: number) {\n const adjustedIndex =\n index === StylingIndex.MasterFlagPosition ? index : (index + StylingIndex.FlagsOffset);\n context[adjustedIndex] = flag;\n}\n\nfunction getPointers(context: StylingContext, index: number): number {\n const adjustedIndex =\n index === StylingIndex.MasterFlagPosition ? index : (index + StylingIndex.FlagsOffset);\n return context[adjustedIndex] as number;\n}\n\nexport function getValue(context: StylingContext, index: number): string|boolean|null {\n return context[index + StylingIndex.ValueOffset] as string | boolean | null;\n}\n\nexport function getProp(context: StylingContext, index: number): string {\n return context[index + StylingIndex.PropertyOffset] as string;\n}\n\nexport function isContextDirty(context: StylingContext): boolean {\n return isDirty(context, StylingIndex.MasterFlagPosition);\n}\n\nexport function setContextDirty(context: StylingContext, isDirtyYes: boolean): void {\n setDirty(context, StylingIndex.MasterFlagPosition, isDirtyYes);\n}\n\nexport function setContextPlayersDirty(context: StylingContext, isDirtyYes: boolean): void {\n if (isDirtyYes) {\n (context[StylingIndex.MasterFlagPosition] as number) |= StylingFlags.PlayerBuildersDirty;\n } else {\n (context[StylingIndex.MasterFlagPosition] as number) &= ~StylingFlags.PlayerBuildersDirty;\n }\n}\n\nfunction swapMultiContextEntries(context: StylingContext, indexA: number, indexB: number) {\n if (indexA === indexB) return;\n\n const tmpValue = getValue(context, indexA);\n const tmpProp = getProp(context, indexA);\n const tmpFlag = getPointers(context, indexA);\n const tmpPlayerBuilderIndex = getPlayerBuilderIndex(context, indexA);\n const tmpDirectiveIndex = getDirectiveIndexFromEntry(context, indexA);\n\n let flagA = tmpFlag;\n let flagB = getPointers(context, indexB);\n\n const singleIndexA = getMultiOrSingleIndex(flagA);\n if (singleIndexA >= 0) {\n const _flag = getPointers(context, singleIndexA);\n const _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexA, pointers(_flag, _initial, indexB));\n }\n\n const singleIndexB = getMultiOrSingleIndex(flagB);\n if (singleIndexB >= 0) {\n const _flag = getPointers(context, singleIndexB);\n const _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexB, pointers(_flag, _initial, indexA));\n }\n\n setValue(context, indexA, getValue(context, indexB));\n setProp(context, indexA, getProp(context, indexB));\n setFlag(context, indexA, getPointers(context, indexB));\n const playerIndexA = getPlayerBuilderIndex(context, indexB);\n const directiveIndexA = getDirectiveIndexFromEntry(context, indexB);\n setPlayerBuilderIndex(context, indexA, playerIndexA, directiveIndexA);\n\n setValue(context, indexB, tmpValue);\n setProp(context, indexB, tmpProp);\n setFlag(context, indexB, tmpFlag);\n setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex, tmpDirectiveIndex);\n}\n\nfunction updateSinglePointerValues(context: StylingContext, indexStartPosition: number) {\n for (let i = indexStartPosition; i < context.length; i += StylingIndex.Size) {\n const multiFlag = getPointers(context, i);\n const singleIndex = getMultiOrSingleIndex(multiFlag);\n if (singleIndex > 0) {\n const singleFlag = getPointers(context, singleIndex);\n const initialIndexForSingle = getInitialIndex(singleFlag);\n const flagValue = (isDirty(context, singleIndex) ? StylingFlags.Dirty : StylingFlags.None) |\n (isClassBasedValue(context, singleIndex) ? StylingFlags.Class : StylingFlags.None) |\n (isSanitizable(context, singleIndex) ? StylingFlags.Sanitize : StylingFlags.None);\n const updatedFlag = pointers(flagValue, initialIndexForSingle, i);\n setFlag(context, singleIndex, updatedFlag);\n }\n }\n}\n\nfunction insertNewMultiProperty(\n context: StylingContext, index: number, classBased: boolean, name: string, flag: number,\n value: string | boolean, directiveIndex: number, playerIndex: number): void {\n const doShift = index < context.length;\n\n // prop does not exist in the list, add it in\n context.splice(\n index, 0, flag | StylingFlags.Dirty | (classBased ? StylingFlags.Class : StylingFlags.None),\n name, value, 0);\n setPlayerBuilderIndex(context, index, playerIndex, directiveIndex);\n\n if (doShift) {\n // because the value was inserted midway into the array then we\n // need to update all the shifted multi values' single value\n // pointers to point to the newly shifted location\n updateSinglePointerValues(context, index + StylingIndex.Size);\n }\n}\n\nfunction valueExists(value: string | null | boolean, isClassBased?: boolean) {\n return value !== null;\n}\n\nfunction prepareInitialFlag(\n context: StylingContext, prop: string, entryIsClassBased: boolean,\n sanitizer?: StyleSanitizeFn | null) {\n let flag = (sanitizer && sanitizer(prop, null, StyleSanitizeMode.ValidateProperty)) ?\n StylingFlags.Sanitize :\n StylingFlags.None;\n\n let initialIndex: number;\n if (entryIsClassBased) {\n flag |= StylingFlags.Class;\n initialIndex =\n getInitialStylingValuesIndexOf(context[StylingIndex.InitialClassValuesPosition], prop);\n } else {\n initialIndex =\n getInitialStylingValuesIndexOf(context[StylingIndex.InitialStyleValuesPosition], prop);\n }\n\n initialIndex = initialIndex > 0 ? (initialIndex + InitialStylingValuesIndex.ValueOffset) : 0;\n return pointers(flag, initialIndex, 0);\n}\n\nfunction hasInitialValueChanged(context: StylingContext, flag: number, newValue: any) {\n const initialValue = getInitialValue(context, flag);\n return !initialValue || hasValueChanged(flag, initialValue, newValue);\n}\n\nfunction hasValueChanged(\n flag: number, a: string | boolean | null, b: string | boolean | null): boolean {\n const isClassBased = flag & StylingFlags.Class;\n const hasValues = a && b;\n const usesSanitizer = flag & StylingFlags.Sanitize;\n // the toString() comparison ensures that a value is checked\n // ... otherwise (during sanitization bypassing) the === comparsion\n // would fail since a new String() instance is created\n if (!isClassBased && hasValues && usesSanitizer) {\n // we know for sure we're dealing with strings at this point\n return (a as string).toString() !== (b as string).toString();\n }\n\n // everything else is safe to check with a normal equality check\n return a !== b;\n}\n\nexport class ClassAndStylePlayerBuilder<T> implements PlayerBuilder {\n private _values: {[key: string]: string | null} = {};\n private _dirty = false;\n private _factory: BoundPlayerFactory<T>;\n\n constructor(factory: PlayerFactory, private _element: HTMLElement, private _type: BindingType) {\n this._factory = factory as any;\n }\n\n setValue(prop: string, value: any) {\n if (this._values[prop] !== value) {\n this._values[prop] = value;\n this._dirty = true;\n }\n }\n\n buildPlayer(currentPlayer: Player|null, isFirstRender: boolean): Player|undefined|null {\n // if no values have been set here then this means the binding didn't\n // change and therefore the binding values were not updated through\n // `setValue` which means no new player will be provided.\n if (this._dirty) {\n const player = this._factory.fn(\n this._element, this._type, this._values !, isFirstRender, currentPlayer || null);\n this._values = {};\n this._dirty = false;\n return player;\n }\n\n return undefined;\n }\n}\n\n/**\n * Used to provide a summary of the state of the styling context.\n *\n * This is an internal interface that is only used inside of test tooling to\n * help summarize what's going on within the styling context. None of this code\n * is designed to be exported publicly and will, therefore, be tree-shaken away\n * during runtime.\n */\nexport interface LogSummary {\n name: string; //\n staticIndex: number; //\n dynamicIndex: number; //\n value: number; //\n flags: {\n dirty: boolean; //\n class: boolean; //\n sanitize: boolean; //\n playerBuildersDirty: boolean; //\n bindingAllocationLocked: boolean; //\n };\n}\n\n/**\n * This function is not designed to be used in production.\n * It is a utility tool for debugging and testing and it\n * will automatically be tree-shaken away during production.\n */\nexport function generateConfigSummary(source: number): LogSummary;\nexport function generateConfigSummary(source: StylingContext): LogSummary;\nexport function generateConfigSummary(source: StylingContext, index: number): LogSummary;\nexport function generateConfigSummary(source: number | StylingContext, index?: number): LogSummary {\n let flag, name = 'config value for ';\n if (Array.isArray(source)) {\n if (index) {\n name += 'index: ' + index;\n } else {\n name += 'master config';\n }\n index = index || StylingIndex.MasterFlagPosition;\n flag = source[index] as number;\n } else {\n flag = source;\n name += 'index: ' + flag;\n }\n const dynamicIndex = getMultiOrSingleIndex(flag);\n const staticIndex = getInitialIndex(flag);\n return {\n name,\n staticIndex,\n dynamicIndex,\n value: flag,\n flags: {\n dirty: flag & StylingFlags.Dirty ? true : false,\n class: flag & StylingFlags.Class ? true : false,\n sanitize: flag & StylingFlags.Sanitize ? true : false,\n playerBuildersDirty: flag & StylingFlags.PlayerBuildersDirty ? true : false,\n bindingAllocationLocked: flag & StylingFlags.BindingAllocationLocked ? true : false,\n }\n };\n}\n\nexport function getDirectiveIndexFromEntry(context: StylingContext, index: number) {\n const value = context[index + StylingIndex.PlayerBuilderIndexOffset] as number;\n return value & DirectiveOwnerAndPlayerBuilderIndex.BitMask;\n}\n\nfunction getInitialStylingValuesIndexOf(keyValues: InitialStylingValues, key: string): number {\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < keyValues.length;\n i += InitialStylingValuesIndex.Size) {\n if (keyValues[i] === key) return i;\n }\n return -1;\n}\n\nexport function compareLogSummaries(a: LogSummary, b: LogSummary) {\n const log: string[] = [];\n const diffs: [string, any, any][] = [];\n diffSummaryValues(diffs, 'staticIndex', 'staticIndex', a, b);\n diffSummaryValues(diffs, 'dynamicIndex', 'dynamicIndex', a, b);\n Object.keys(a.flags).forEach(\n name => { diffSummaryValues(diffs, 'flags.' + name, name, a.flags, b.flags); });\n\n if (diffs.length) {\n log.push('Log Summaries for:');\n log.push(' A: ' + a.name);\n log.push(' B: ' + b.name);\n log.push('\\n Differ in the following way (A !== B):');\n diffs.forEach(result => {\n const [name, aVal, bVal] = result;\n log.push(' => ' + name);\n log.push(' => ' + aVal + ' !== ' + bVal + '\\n');\n });\n }\n\n return log;\n}\n\nfunction diffSummaryValues(result: any[], name: string, prop: string, a: any, b: any) {\n const aVal = a[prop];\n const bVal = b[prop];\n if (aVal !== bVal) {\n result.push([name, aVal, bVal]);\n }\n}\n\nexport function getSinglePropIndexValue(\n context: StylingContext, directiveIndex: number, offset: number, isClassBased: boolean) {\n const singlePropOffsetRegistryIndex =\n context[StylingIndex.DirectiveRegistryPosition]\n [(directiveIndex * DirectiveRegistryValuesIndex.Size) +\n DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset] as number;\n const offsets = context[StylingIndex.SinglePropOffsetPositions];\n const indexForOffset = singlePropOffsetRegistryIndex +\n SinglePropOffsetValuesIndex.ValueStartPosition +\n (isClassBased ?\n offsets\n [singlePropOffsetRegistryIndex + SinglePropOffsetValuesIndex.StylesCountPosition] :\n 0) +\n offset;\n return offsets[indexForOffset];\n}\n\nfunction getStyleSanitizer(context: StylingContext, directiveIndex: number): StyleSanitizeFn|null {\n const dirs = context[StylingIndex.DirectiveRegistryPosition];\n const value = dirs\n [directiveIndex * DirectiveRegistryValuesIndex.Size +\n DirectiveRegistryValuesIndex.StyleSanitizerOffset] ||\n dirs[DirectiveRegistryValuesIndex.StyleSanitizerOffset] || null;\n return value as StyleSanitizeFn | null;\n}\n\nfunction allowValueChange(\n currentValue: string | boolean | null, newValue: string | boolean | null,\n currentDirectiveOwner: number, newDirectiveOwner: number) {\n // the code below relies the importance of directive's being tied to their\n // index value. The index values for each directive are derived from being\n // registered into the styling context directive registry. The most important\n // directive is the parent component directive (the template) and each directive\n // that is added after is considered less important than the previous entry. This\n // prioritization of directives enables the styling algorithm to decide if a style\n // or class should be allowed to be updated/replaced in case an earlier directive\n // already wrote to the exact same style-property or className value. In other words\n // this decides what to do if and when there is a collision.\n if (currentValue != null) {\n if (newValue != null) {\n // if a directive index is lower than it always has priority over the\n // previous directive's value...\n return newDirectiveOwner <= currentDirectiveOwner;\n } else {\n // only write a null value in case it's the same owner writing it.\n // this avoids having a higher-priority directive write to null\n // only to have a lesser-priority directive change right to a\n // non-null value immediately afterwards.\n return currentDirectiveOwner === newDirectiveOwner;\n }\n }\n return true;\n}\n\n/**\n * Returns the className string of all the initial classes for the element.\n *\n * This function is designed to populate and cache all the static class\n * values into a className string. The caching mechanism works by placing\n * the completed className string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the className string (e.g. `on active red`)\n */\nexport function getInitialClassNameValue(context: StylingContext): string {\n const initialClassValues = context[StylingIndex.InitialClassValuesPosition];\n let className = initialClassValues[InitialStylingValuesIndex.CachedStringValuePosition];\n if (className === null) {\n className = '';\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialClassValues.length;\n i += InitialStylingValuesIndex.Size) {\n const isPresent = initialClassValues[i + 1];\n if (isPresent) {\n className += (className.length ? ' ' : '') + initialClassValues[i];\n }\n }\n initialClassValues[InitialStylingValuesIndex.CachedStringValuePosition] = className;\n }\n return className;\n}\n\n/**\n * Returns the style string of all the initial styles for the element.\n *\n * This function is designed to populate and cache all the static style\n * values into a style string. The caching mechanism works by placing\n * the completed style string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the style string (e.g. `width:100px;height:200px`)\n */\nexport function getInitialStyleStringValue(context: StylingContext): string {\n const initialStyleValues = context[StylingIndex.InitialStyleValuesPosition];\n let styleString = initialStyleValues[InitialStylingValuesIndex.CachedStringValuePosition];\n if (styleString === null) {\n styleString = '';\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialStyleValues.length;\n i += InitialStylingValuesIndex.Size) {\n const value = initialStyleValues[i + 1];\n if (value !== null) {\n styleString += (styleString.length ? ';' : '') + `${initialStyleValues[i]}:${value}`;\n }\n }\n initialStyleValues[InitialStylingValuesIndex.CachedStringValuePosition] = styleString;\n }\n return styleString;\n}\n\n/**\n * Returns the current cached multi-value for a given directiveIndex within the provided context.\n */\nfunction readCachedMapValue(\n context: StylingContext, entryIsClassBased: boolean, directiveIndex: number) {\n const values: MapBasedOffsetValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n return values[index + MapBasedOffsetValuesIndex.ValueOffset] || null;\n}\n\n/**\n * Determines whether the provided multi styling value should be updated or not.\n *\n * Because `[style]` and `[class]` bindings rely on an identity change to occur before\n * applying new values, the styling algorithm may not update an existing entry into\n * the context if a previous directive's entry changed shape.\n *\n * This function will decide whether or not a value should be applied (if there is a\n * cache miss) to the context based on the following rules:\n *\n * - If there is an identity change between the existing value and new value\n * - If there is no existing value cached (first write)\n * - If a previous directive flagged the existing cached value as dirty\n */\nfunction isMultiValueCacheHit(\n context: StylingContext, entryIsClassBased: boolean, directiveIndex: number,\n newValue: any): boolean {\n const indexOfCachedValues =\n entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles;\n const cachedValues = context[indexOfCachedValues] as MapBasedOffsetValues;\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n if (cachedValues[index + MapBasedOffsetValuesIndex.DirtyFlagOffset]) return false;\n return newValue === NO_CHANGE ||\n readCachedMapValue(context, entryIsClassBased, directiveIndex) === newValue;\n}\n\n/**\n * Updates the cached status of a multi-styling value in the context.\n *\n * The cached map array (which exists in the context) contains a manifest of\n * each multi-styling entry (`[style]` and `[class]` entries) for the template\n * as well as all directives.\n *\n * This function will update the cached status of the provided multi-style\n * entry within the cache.\n *\n * When called, this function will update the following information:\n * - The actual cached value (the raw value that was passed into `[style]` or `[class]`)\n * - The total amount of unique styling entries that this value has written into the context\n * - The exact position of where the multi styling entries start in the context for this binding\n * - The dirty flag will be set to true\n *\n * If the `dirtyFutureValues` param is provided then it will update all future entries (binding\n * entries that exist as apart of other directives) to be dirty as well. This will force the\n * styling algorithm to reapply those values once change detection checks them (which will in\n * turn cause the styling context to update itself and the correct styling values will be\n * rendered on screen).\n */\nfunction updateCachedMapValue(\n context: StylingContext, directiveIndex: number, entryIsClassBased: boolean, cacheValue: any,\n startPosition: number, endPosition: number, totalValues: number, dirtyFutureValues: boolean) {\n const values =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n\n // in the event that this is true we assume that future values are dirty and therefore\n // will be checked again in the next CD cycle\n if (dirtyFutureValues) {\n const nextStartPosition = startPosition + totalValues * MapBasedOffsetValuesIndex.Size;\n for (let i = index + MapBasedOffsetValuesIndex.Size; i < values.length;\n i += MapBasedOffsetValuesIndex.Size) {\n values[i + MapBasedOffsetValuesIndex.PositionStartOffset] = nextStartPosition;\n values[i + MapBasedOffsetValuesIndex.DirtyFlagOffset] = 1;\n }\n }\n\n values[index + MapBasedOffsetValuesIndex.DirtyFlagOffset] = 0;\n values[index + MapBasedOffsetValuesIndex.PositionStartOffset] = startPosition;\n values[index + MapBasedOffsetValuesIndex.ValueOffset] = cacheValue;\n values[index + MapBasedOffsetValuesIndex.ValueCountOffset] = totalValues;\n\n // the code below counts the total amount of styling values that exist in\n // the context up until this directive. This value will be later used to\n // update the cached value map's total counter value.\n let totalStylingEntries = totalValues;\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < index;\n i += MapBasedOffsetValuesIndex.Size) {\n totalStylingEntries += values[i + MapBasedOffsetValuesIndex.ValueCountOffset];\n }\n\n // because style values come before class values in the context this means\n // that if any new values were inserted then the cache values array for\n // classes is out of sync. The code below will update the offsets to point\n // to their new values.\n if (!entryIsClassBased) {\n const classCache = context[StylingIndex.CachedMultiClasses];\n const classesStartPosition = classCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n const diffInStartPosition = endPosition - classesStartPosition;\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < classCache.length;\n i += MapBasedOffsetValuesIndex.Size) {\n classCache[i + MapBasedOffsetValuesIndex.PositionStartOffset] += diffInStartPosition;\n }\n }\n\n values[MapBasedOffsetValuesIndex.EntriesCountPosition] = totalStylingEntries;\n}\n\nfunction hyphenateEntries(entries: string[]): string[] {\n const newEntries: string[] = [];\n for (let i = 0; i < entries.length; i++) {\n newEntries.push(hyphenate(entries[i]));\n }\n return newEntries;\n}\n\nfunction hyphenate(value: string): string {\n return value.replace(\n /[a-z][A-Z]/g, match => `${match.charAt(0)}-${match.charAt(1).toLowerCase()}`);\n}\n\nfunction registerMultiMapEntry(\n context: StylingContext, directiveIndex: number, entryIsClassBased: boolean,\n startPosition: number, count = 0) {\n const cachedValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n if (directiveIndex > 0) {\n const limit = MapBasedOffsetValuesIndex.ValuesStartPosition +\n (directiveIndex * MapBasedOffsetValuesIndex.Size);\n while (cachedValues.length < limit) {\n // this means that ONLY directive class styling (like ngClass) was used\n // therefore the root directive will still need to be filled in as well\n // as any other directive spaces in case they only used static values\n cachedValues.push(0, startPosition, null, 0);\n }\n }\n cachedValues.push(0, startPosition, null, count);\n}\n\n/**\n * Inserts or updates an existing entry in the provided `staticStyles` collection.\n *\n * @param index the index representing an existing styling entry in the collection:\n * if provided (numeric): then it will update the existing entry at the given position\n * if null: then it will insert a new entry within the collection\n * @param staticStyles a collection of style or class entries where the value will\n * be inserted or patched\n * @param prop the property value of the entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n * @returns the index of the updated or new entry within the collection\n */\nfunction addOrUpdateStaticStyle(\n index: number | null, staticStyles: InitialStylingValues, prop: string,\n value: string | boolean | null, directiveOwnerIndex: number) {\n if (index === null) {\n index = staticStyles.length;\n staticStyles.push(null, null, null);\n staticStyles[index + InitialStylingValuesIndex.PropOffset] = prop;\n }\n staticStyles[index + InitialStylingValuesIndex.ValueOffset] = value;\n staticStyles[index + InitialStylingValuesIndex.DirectiveOwnerOffset] = directiveOwnerIndex;\n return index;\n}\n\nfunction assertValidDirectiveIndex(context: StylingContext, directiveIndex: number) {\n const dirs = context[StylingIndex.DirectiveRegistryPosition];\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n if (index >= dirs.length ||\n dirs[index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset] === -1) {\n throw new Error('The provided directive is not registered with the styling context');\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\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';\nimport {getInitialClassNameValue} from './styling/class_and_style_bindings';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2;\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\nfunction isCssClassMatching(nodeClassAttrVal: string, cssClassToMatch: string): boolean {\n const nodeClassesLen = nodeClassAttrVal.length;\n const matchIndex = nodeClassAttrVal !.indexOf(cssClassToMatch);\n const matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal ![matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal ![matchEndIdx] !== ' ')) // no space after\n {\n return false;\n }\n return true;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode, currentSelector: string, isProjectionMode: boolean): boolean {\n const tagNameToCompare = tNode.type === TNodeType.Container && !isProjectionMode ?\n NG_TEMPLATE_SELECTOR :\n tNode.tagName;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs || [];\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current as number)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & SelectorFlags.CLASS ? current : selector[++i];\n\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & SelectorFlags.CLASS) && tNode.stylingTemplate) {\n if (!isCssClassMatching(readClassValueFromTNode(tNode), selectorAttrValue as string)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n\n const isInlineTemplate =\n tNode.type == TNodeType.Container && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n const attrIndexInNode =\n findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate, isProjectionMode);\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode && assertNotEqual(\n nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes');\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1] as string;\n }\n\n const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n !isCssClassMatching(compareAgainstClassName, selectorAttrValue as string) ||\n mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\nfunction readClassValueFromTNode(tNode: TNode): string {\n // comparing against CSS class values is complex because the compiler doesn't place them as\n // regular attributes when an element is created. Instead, the classes (and styles for\n // that matter) are placed in a special styling context that is used for resolving all\n // class/style values across static attributes, [style]/[class] and [style.prop]/[class.name]\n // bindings. Therefore if and when the styling context exists then the class values are to be\n // extracted by the context helper code below...\n return tNode.stylingTemplate ? getInitialClassNameValue(tNode.stylingTemplate) : '';\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string, attrs: TAttributes | null, isInlineTemplate: boolean,\n isProjectionMode: boolean): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {\n bindingsMode = true;\n } else if (maybeAttrName === AttributeMarker.Classes) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode, selector: CssSelectorList, isProjectionMode: boolean = false): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector|null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n if (attrs[i] === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\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 * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset.\n * 2) Reference node index offset.\n * 3) The OpCode to execute.\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nimport {SanitizerFn} from './sanitization';\n\nexport const enum I18nMutateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 3,\n /**\n * Stores shift amount for bits 31-17 that contain parent index.\n */\n SHIFT_PARENT = 17,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b111,\n\n /**\n * OpCode to select a node. (next OpCode will contain the operation.)\n */\n Select = 0b000,\n /**\n * OpCode to append the current node to `PARENT`.\n */\n AppendChild = 0b001,\n /**\n * OpCode to remove the `REF` node from `PARENT`.\n */\n Remove = 0b011,\n /**\n * OpCode to set the attribute of a node.\n */\n Attr = 0b100,\n /**\n * OpCode to simulate elementEnd()\n */\n ElementEnd = 0b101,\n /**\n * OpCode to read the remove OpCodes for the nested ICU\n */\n RemoveNestedIcu = 0b110,\n}\n\n/**\n * Marks that the next string is for element.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element'\n};\nexport interface ELEMENT_MARKER { marker: 'element'; }\n\n/**\n * Marks that the next string is for comment.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const COMMENT_MARKER: COMMENT_MARKER = {\n marker: 'comment'\n};\n\nexport interface COMMENT_MARKER { marker: 'comment'; }\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n * // For adding text nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createTextNode('abc');\n * // lView[1].insertBefore(node, lView[2]);\n * 'abc', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createTextNode('xyz');\n * // lView[1].appendChild(node);\n * 'xyz', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createElement('div');\n * // lView[1].insertBefore(node, lView[2]);\n * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createElement('div');\n * // lView[1].appendChild(node);\n * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createComment('');\n * // lView[1].insertBefore(node, lView[2]);\n * COMMENT_MARKER, '', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createComment('');\n * // lView[1].appendChild(node);\n * COMMENT_MARKER, '', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].insertBefore(node, lView[3]);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 3 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | AppendChild,\n *\n * // For removing existing nodes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // removeChild(tView.data(1), node, lView);\n * 1 << SHIFT_REF | Remove,\n *\n * // For writing attributes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // node.setAttribute('attr', 'value');\n * 1 << SHIFT_REF | Select, 'attr', 'value'\n * // NOTE: Select followed by two string (vs select followed by OpCode)\n * ];\n * ```\n * NOTE:\n * - `index` is initial location where the extra nodes should be stored in the EXPANDO section of\n * `LVIewData`.\n *\n * See: `applyI18nCreateOpCodes`;\n */\nexport interface I18nMutateOpCodes extends Array<number|string|ELEMENT_MARKER|COMMENT_MARKER|null> {\n}\n\nexport const enum I18nUpdateOpCode {\n /**\n * Stores shift amount for bits 17-2 that contain reference index.\n */\n SHIFT_REF = 2,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b11,\n\n /**\n * OpCode to update a text node.\n */\n Text = 0b00,\n /**\n * OpCode to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * OpCode to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * OpCode to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n * if (rf & RenderFlags.Update) {\n * i18nExp(bind(ctx.exp1)); // If changed set mask bit 1\n * i18nExp(bind(ctx.exp2)); // If changed set mask bit 2\n * i18nExp(bind(ctx.exp3)); // If changed set mask bit 3\n * i18nExp(bind(ctx.exp4)); // If changed set mask bit 4\n * i18nApply(0); // Apply all changes by executing the OpCodes.\n * }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n * // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n * // If `changeMask & 0b11`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `7` values and start processing next OpCodes.\n * 0b11, 7,\n * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n * 'pre', -4, 'in', -3, 'post',\n * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n * // If `changeMask & 0b100`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b100, 4,\n * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n * 'Hello ', -2, '!',\n * // Update text: `lView[1].textContent = newValue;`\n * 1 << SHIFT_REF | Text,\n *\n * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n * // If `changeMask & 0b1000`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b1000, 4,\n * // Concatenate `newValue = lView[bindIndex -1];`.\n * -1,\n * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n * -1, 1,\n * // Update ICU: `icuUpdateCase(lView[1], 0);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string|number|SanitizerFn|null> {}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n /**\n * Number of slots to allocate in expando.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number;\n\n /**\n * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n *\n * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n */\n create: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes which will be executed on each change detection to determine if any changes to\n * DOM are required.\n */\n update: I18nUpdateOpCodes;\n\n /**\n * A list of ICUs in a translation block (or `null` if block has no ICUs).\n *\n * Example:\n * Given: `<div i18n>You have {count, plural, ...} and {state, switch, ...}</div>`\n * There would be 2 ICUs in this array.\n * 1. `{count, plural, ...}`\n * 2. `{state, switch, ...}`\n */\n icus: TIcu[]|null;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n select = 0,\n plural = 1,\n}\n\nexport interface TIcu {\n /**\n * Defines the ICU type of `select` or `plural`\n */\n type: IcuType;\n\n /**\n * Number of slots to allocate in expando for each case.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number[];\n\n /**\n * An optional array of child/sub ICUs.\n *\n * In case of nested ICUs such as:\n * ```\n * {�0�, plural,\n * =0 {zero}\n * other {�0� {�1�, select,\n * cat {cats}\n * dog {dogs}\n * other {animals}\n * }!\n * }\n * }\n * ```\n * When the parent ICU is changing it must clean up child ICUs as well. For this reason it needs\n * to know which child ICUs to run clean up for as well.\n *\n * In the above example this would be:\n * ```ts\n * [\n * [], // `=0` has no sub ICUs\n * [1], // `other` has one subICU at `1`st index.\n * ]\n * ```\n *\n * The reason why it is Array of Arrays is because first array represents the case, and second\n * represents the child ICUs to clean up. There may be more than one child ICUs per case.\n */\n childIcus: number[][];\n\n /**\n * A list of case values which the current ICU will try to match.\n *\n * The last value is `other`\n */\n cases: any[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: I18nMutateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nMutateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes[];\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\n\n/**\n * --------\n *\n * This file contains temporary code to incorporate the new styling refactor\n * code to work alongside the existing instruction set.\n *\n * This file will be removed once `select(n)` is fully functional (once\n * it is able to evaluate host bindings in sync element-by-element\n * with template code).\n *\n * --------\n */\n\n/**\n * A temporary enum of states that inform the core whether or not\n * to defer all styling instruction calls to the old or new\n * styling implementation.\n */\nexport const enum RuntimeStylingMode {\n UseOld = 0,\n UseBothOldAndNew = 1,\n UseNew = 2,\n}\n\nlet _stylingMode = 0;\n\n/**\n * Temporary function used to inform the existing styling algorithm\n * code to delegate all styling instruction calls to the new refactored\n * styling code.\n */\nexport function runtimeSetStylingMode(mode: RuntimeStylingMode) {\n _stylingMode = mode;\n}\n\nexport function runtimeIsNewStylingInUse() {\n return _stylingMode > RuntimeStylingMode.UseOld;\n}\n\nexport function runtimeAllowOldStyling() {\n return _stylingMode < RuntimeStylingMode.UseNew;\n}\n\nlet _currentSanitizer: Sanitizer|StyleSanitizeFn|null;\nexport function setCurrentStyleSanitizer(sanitizer: Sanitizer | StyleSanitizeFn | null) {\n _currentSanitizer = sanitizer;\n}\n\nexport function getCurrentStyleSanitizer() {\n return _currentSanitizer;\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 */\nexport function attachDebugObject(obj: any, debug: any) {\n Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});\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*/\nimport {Sanitizer, SecurityContext} from '../../sanitization/security';\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {StylingContext} from '../interfaces/styling';\nimport {LView, SANITIZER} from '../interfaces/view';\nimport {getProp as getOldProp, getSinglePropIndexValue as getOldSinglePropIndexValue} from '../styling/class_and_style_bindings';\n\nimport {LStylingMap, LStylingMapIndex, TStylingConfigFlags, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\nimport {getCurrentStyleSanitizer, setCurrentStyleSanitizer} from './state';\n\nconst MAP_BASED_ENTRY_PROP_NAME = '--MAP--';\n\n/**\n * Creates a new instance of the `TStylingContext`.\n *\n * This function will also pre-fill the context with data\n * for map-based bindings.\n */\nexport function allocTStylingContext(): TStylingContext {\n // because map-based bindings deal with a dynamic set of values, there\n // is no way to know ahead of time whether or not sanitization is required.\n // For this reason the configuration will always mark sanitization as active\n // (this means that when map-based values are applied then sanitization will\n // be checked against each property).\n const mapBasedConfig = TStylingContextPropConfigFlags.SanitizationRequired;\n return [TStylingConfigFlags.Initial, 0, mapBasedConfig, 0, MAP_BASED_ENTRY_PROP_NAME];\n}\n\n/**\n * Temporary function that allows for a string-based property name to be\n * obtained from an index-based property identifier.\n *\n * This function will be removed once the new styling refactor code (which\n * lives inside of `render3/styling_next/`) replaces the existing styling\n * implementation.\n */\nexport function getBindingNameFromIndex(\n stylingContext: StylingContext, offset: number, directiveIndex: number, isClassBased: boolean) {\n const singleIndex =\n getOldSinglePropIndexValue(stylingContext, directiveIndex, offset, isClassBased);\n return getOldProp(stylingContext, singleIndex);\n}\n\nexport function updateContextDirectiveIndex(context: TStylingContext, index: number) {\n context[TStylingContextIndex.MaxDirectiveIndexPosition] = index;\n}\n\nfunction getConfig(context: TStylingContext) {\n return context[TStylingContextIndex.ConfigPosition];\n}\n\nexport function setConfig(context: TStylingContext, value: number) {\n context[TStylingContextIndex.ConfigPosition] = value;\n}\n\nexport function getProp(context: TStylingContext, index: number) {\n return context[index + TStylingContextIndex.PropOffset] as string;\n}\n\nfunction getPropConfig(context: TStylingContext, index: number): number {\n return (context[index + TStylingContextIndex.ConfigAndGuardOffset] as number) &\n TStylingContextPropConfigFlags.Mask;\n}\n\nexport function isSanitizationRequired(context: TStylingContext, index: number) {\n return (getPropConfig(context, index) & TStylingContextPropConfigFlags.SanitizationRequired) > 0;\n}\n\nexport function getGuardMask(context: TStylingContext, index: number) {\n const configGuardValue = context[index + TStylingContextIndex.ConfigAndGuardOffset] as number;\n return configGuardValue >> TStylingContextPropConfigFlags.TotalBits;\n}\n\nexport function setGuardMask(context: TStylingContext, index: number, maskValue: number) {\n const config = getPropConfig(context, index);\n const guardMask = maskValue << TStylingContextPropConfigFlags.TotalBits;\n context[index + TStylingContextIndex.ConfigAndGuardOffset] = config | guardMask;\n}\n\nexport function getValuesCount(context: TStylingContext, index: number) {\n return context[index + TStylingContextIndex.ValuesCountOffset] as number;\n}\n\nexport function getBindingValue(context: TStylingContext, index: number, offset: number) {\n return context[index + TStylingContextIndex.BindingsStartOffset + offset] as number | string;\n}\n\nexport function getDefaultValue(context: TStylingContext, index: number): string|boolean|null {\n const valuesCount = getValuesCount(context, index);\n return context[index + TStylingContextIndex.BindingsStartOffset + valuesCount - 1] as string |\n boolean | null;\n}\n\n/**\n * Temporary function which determines whether or not a context is\n * allowed to be flushed based on the provided directive index.\n */\nexport function allowStylingFlush(context: TStylingContext, index: number) {\n return index === context[TStylingContextIndex.MaxDirectiveIndexPosition];\n}\n\nexport function lockContext(context: TStylingContext) {\n setConfig(context, getConfig(context) | TStylingConfigFlags.Locked);\n}\n\nexport function isContextLocked(context: TStylingContext): boolean {\n return (getConfig(context) & TStylingConfigFlags.Locked) > 0;\n}\n\nexport function getPropValuesStartPosition(context: TStylingContext) {\n return TStylingContextIndex.MapBindingsBindingsStartPosition +\n context[TStylingContextIndex.MapBindingsValuesCountPosition];\n}\n\nexport function isMapBased(prop: string) {\n return prop === MAP_BASED_ENTRY_PROP_NAME;\n}\n\nexport function hasValueChanged(\n a: LStylingMap | number | String | string | null | boolean | undefined | {},\n b: LStylingMap | number | String | string | null | boolean | undefined | {}): boolean {\n const compareValueA = Array.isArray(a) ? a[LStylingMapIndex.RawValuePosition] : a;\n const compareValueB = Array.isArray(b) ? b[LStylingMapIndex.RawValuePosition] : b;\n return compareValueA !== compareValueB;\n}\n\n/**\n * Determines whether the provided styling value is truthy or falsy.\n */\nexport function isStylingValueDefined(value: any) {\n // the reason why null is compared against is because\n // a CSS class value that is set to `false` must be\n // respected (otherwise it would be treated as falsy).\n // Empty string values are because developers usually\n // set a value to an empty string to remove it.\n return value != null && value !== '';\n}\n\n/**\n * Returns the current style sanitizer function for the given view.\n *\n * The default style sanitizer (which lives inside of `LView`) will\n * be returned depending on whether the `styleSanitizer` instruction\n * was called or not prior to any styling instructions running.\n */\nexport function getCurrentOrLViewSanitizer(lView: LView): StyleSanitizeFn|null {\n const sanitizer: StyleSanitizeFn|null = (getCurrentStyleSanitizer() || lView[SANITIZER]) as any;\n if (sanitizer && typeof sanitizer !== 'function') {\n setCurrentStyleSanitizer(sanitizer);\n return sanitizeUsingSanitizerObject;\n }\n return sanitizer;\n}\n\n/**\n * Style sanitization function that internally uses a `Sanitizer` instance to handle style\n * sanitization.\n */\nconst sanitizeUsingSanitizerObject: StyleSanitizeFn =\n (prop: string, value: string, mode: StyleSanitizeMode) => {\n const sanitizer = getCurrentStyleSanitizer() as Sanitizer;\n if (sanitizer) {\n if (mode & StyleSanitizeMode.SanitizeOnly) {\n return sanitizer.sanitize(SecurityContext.STYLE, value);\n } else {\n return true;\n }\n }\n return value;\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*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3, RendererStyleFlags3, isProceduralRenderer} from '../interfaces/renderer';\n\nimport {ApplyStylingFn, LStylingData, LStylingMap, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\nimport {allowStylingFlush, getBindingValue, getGuardMask, getProp, getPropValuesStartPosition, getValuesCount, hasValueChanged, isContextLocked, isSanitizationRequired, isStylingValueDefined, lockContext, setGuardMask} from './util';\n\n\n/**\n * --------\n *\n * This file contains the core logic for styling in Angular.\n *\n * All styling bindings (i.e. `[style]`, `[style.prop]`, `[class]` and `[class.name]`)\n * will have their values be applied through the logic in this file.\n *\n * When a binding is encountered (e.g. `<div [style.width]=\"w\">`) then\n * the binding data will be populated into a `TStylingContext` data-structure.\n * There is only one `TStylingContext` per `TNode` and each element instance\n * will update its style/class binding values in concert with the styling\n * context.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\nconst DEFAULT_BINDING_VALUE = null;\nconst DEFAULT_SIZE_VALUE = 1;\n\n// The first bit value reflects a map-based binding value's bit.\n// The reason why it's always activated for every entry in the map\n// is so that if any map-binding values update then all other prop\n// based bindings will pass the guard check automatically without\n// any extra code or flags.\nexport const DEFAULT_GUARD_MASK_VALUE = 0b1;\nconst STYLING_INDEX_FOR_MAP_BINDING = 0;\nconst STYLING_INDEX_START_VALUE = 1;\n\n// the values below are global to all styling code below. Each value\n// will either increment or mutate each time a styling instruction is\n// executed. Do not modify the values below.\nlet currentStyleIndex = STYLING_INDEX_START_VALUE;\nlet currentClassIndex = STYLING_INDEX_START_VALUE;\nlet stylesBitMask = 0;\nlet classesBitMask = 0;\nlet deferredBindingQueue: (TStylingContext | number | string | null | boolean)[] = [];\n\n/**\n * Visits a class-based binding and updates the new value (if changed).\n *\n * This function is called each time a class-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateClassBinding(\n context: TStylingContext, data: LStylingData, prop: string | null, bindingIndex: number,\n value: boolean | string | null | undefined | LStylingMap, deferRegistration: boolean,\n forceUpdate: boolean): void {\n const isMapBased = !prop;\n const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentClassIndex++;\n const updated = updateBindingData(\n context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, false);\n if (updated || forceUpdate) {\n classesBitMask |= 1 << index;\n }\n}\n\n/**\n * Visits a style-based binding and updates the new value (if changed).\n *\n * This function is called each time a style-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateStyleBinding(\n context: TStylingContext, data: LStylingData, prop: string | null, bindingIndex: number,\n value: String | string | number | null | undefined | LStylingMap,\n sanitizer: StyleSanitizeFn | null, deferRegistration: boolean, forceUpdate: boolean): void {\n const isMapBased = !prop;\n const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentStyleIndex++;\n const sanitizationRequired = isMapBased ?\n true :\n (sanitizer ? sanitizer(prop !, null, StyleSanitizeMode.ValidateProperty) : false);\n const updated = updateBindingData(\n context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate,\n sanitizationRequired);\n if (updated || forceUpdate) {\n stylesBitMask |= 1 << index;\n }\n}\n\n/**\n * Called each time a binding value has changed within the provided `TStylingContext`.\n *\n * This function is designed to be called from `updateStyleBinding` and `updateClassBinding`.\n * If called during the first update pass, the binding will be registered in the context.\n * If the binding does get registered and the `deferRegistration` flag is true then the\n * binding data will be queued up until the context is later flushed in `applyStyling`.\n *\n * This function will also update binding slot in the provided `LStylingData` with the\n * new binding entry (if it has changed).\n *\n * @returns whether or not the binding value was updated in the `LStylingData`.\n */\nfunction updateBindingData(\n context: TStylingContext, data: LStylingData, counterIndex: number, prop: string | null,\n bindingIndex: number,\n value: string | String | number | boolean | null | undefined | LStylingMap,\n deferRegistration: boolean, forceUpdate: boolean, sanitizationRequired: boolean): boolean {\n if (!isContextLocked(context)) {\n if (deferRegistration) {\n deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n } else {\n deferredBindingQueue.length && flushDeferredBindings();\n\n // this will only happen during the first update pass of the\n // context. The reason why we can't use `tNode.firstTemplatePass`\n // here is because its not guaranteed to be true when the first\n // update pass is executed (remember that all styling instructions\n // are run in the update phase, and, as a result, are no more\n // styling instructions that are run in the creation phase).\n registerBinding(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n }\n }\n\n const changed = forceUpdate || hasValueChanged(data[bindingIndex], value);\n if (changed) {\n data[bindingIndex] = value;\n }\n return changed;\n}\n\n/**\n * Schedules a binding registration to be run at a later point.\n *\n * The reasoning for this feature is to ensure that styling\n * bindings are registered in the correct order for when\n * directives/components have a super/sub class inheritance\n * chains. Each directive's styling bindings must be\n * registered into the context in reverse order. Therefore all\n * bindings will be buffered in reverse order and then applied\n * after the inheritance chain exits.\n */\nfunction deferBindingRegistration(\n context: TStylingContext, counterIndex: number, prop: string | null, bindingIndex: number,\n sanitizationRequired: boolean) {\n deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n}\n\n/**\n * Flushes the collection of deferred bindings and causes each entry\n * to be registered into the context.\n */\nfunction flushDeferredBindings() {\n let i = 0;\n while (i < deferredBindingQueue.length) {\n const context = deferredBindingQueue[i++] as TStylingContext;\n const count = deferredBindingQueue[i++] as number;\n const prop = deferredBindingQueue[i++] as string;\n const bindingIndex = deferredBindingQueue[i++] as number | null;\n const sanitizationRequired = deferredBindingQueue[i++] as boolean;\n registerBinding(context, count, prop, bindingIndex, sanitizationRequired);\n }\n deferredBindingQueue.length = 0;\n}\n\n/**\n * Registers the provided binding (prop + bindingIndex) into the context.\n *\n * This function is shared between bindings that are assigned immediately\n * (via `updateBindingData`) and at a deferred stage. When called, it will\n * figure out exactly where to place the binding data in the context.\n *\n * It is needed because it will either update or insert a styling property\n * into the context at the correct spot.\n *\n * When called, one of two things will happen:\n *\n * 1) If the property already exists in the context then it will just add\n * the provided `bindingValue` to the end of the binding sources region\n * for that particular property.\n *\n * - If the binding value is a number then it will be added as a new\n * binding index source next to the other binding sources for the property.\n *\n * - Otherwise, if the binding value is a string/boolean/null type then it will\n * replace the default value for the property if the default value is `null`.\n *\n * 2) If the property does not exist then it will be inserted into the context.\n * The styling context relies on all properties being stored in alphabetical\n * order, so it knows exactly where to store it.\n *\n * When inserted, a default `null` value is created for the property which exists\n * as the default value for the binding. If the bindingValue property is inserted\n * and it is either a string, number or null value then that will replace the default\n * value.\n *\n * Note that this function is also used for map-based styling bindings. They are treated\n * much the same as prop-based bindings, but, because they do not have a property value\n * (since it's a map), all map-based entries are stored in an already populated area of\n * the context at the top (which is reserved for map-based entries).\n */\nexport function registerBinding(\n context: TStylingContext, countId: number, prop: string | null,\n bindingValue: number | null | string | boolean, sanitizationRequired?: boolean) {\n // prop-based bindings (e.g `<div [style.width]=\"w\" [class.foo]=\"f\">`)\n if (prop) {\n let found = false;\n let i = getPropValuesStartPosition(context);\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n const p = getProp(context, i);\n found = prop <= p;\n if (found) {\n // all style/class bindings are sorted by property name\n if (prop < p) {\n allocateNewContextEntry(context, i, prop, sanitizationRequired);\n }\n addBindingIntoContext(context, false, i, bindingValue, countId);\n break;\n }\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n\n if (!found) {\n allocateNewContextEntry(context, context.length, prop, sanitizationRequired);\n addBindingIntoContext(context, false, i, bindingValue, countId);\n }\n } else {\n // map-based bindings (e.g `<div [style]=\"s\" [class]=\"{className:true}\">`)\n // there is no need to allocate the map-based binding region into the context\n // since it is already there when the context is first created.\n addBindingIntoContext(\n context, true, TStylingContextIndex.MapBindingsPosition, bindingValue, countId);\n }\n}\n\nfunction allocateNewContextEntry(\n context: TStylingContext, index: number, prop: string, sanitizationRequired?: boolean) {\n // 1,2: splice index locations\n // 3: each entry gets a config value (guard mask + flags)\n // 4. each entry gets a size value (which is always one because there is always a default binding\n // value)\n // 5. the property that is getting allocated into the context\n // 6. the default binding value (usually `null`)\n const config = sanitizationRequired ? TStylingContextPropConfigFlags.SanitizationRequired :\n TStylingContextPropConfigFlags.Default;\n context.splice(index, 0, config, DEFAULT_SIZE_VALUE, prop, DEFAULT_BINDING_VALUE);\n setGuardMask(context, index, DEFAULT_GUARD_MASK_VALUE);\n}\n\n/**\n * Inserts a new binding value into a styling property tuple in the `TStylingContext`.\n *\n * A bindingValue is inserted into a context during the first update pass\n * of a template or host bindings function. When this occurs, two things\n * happen:\n *\n * - If the bindingValue value is a number then it is treated as a bindingIndex\n * value (a index in the `LView`) and it will be inserted next to the other\n * binding index entries.\n *\n * - Otherwise the binding value will update the default value for the property\n * and this will only happen if the default value is `null`.\n *\n * Note that this function also handles map-based bindings and will insert them\n * at the top of the context.\n */\nfunction addBindingIntoContext(\n context: TStylingContext, isMapBased: boolean, index: number,\n bindingValue: number | string | boolean | null, countId: number) {\n const valuesCount = getValuesCount(context, index);\n\n let lastValueIndex = index + TStylingContextIndex.BindingsStartOffset + valuesCount;\n if (!isMapBased) {\n // prop-based values all have default values, but map-based entries do not.\n // we want to access the index for the default value in this case and not just\n // the bindings...\n lastValueIndex--;\n }\n\n if (typeof bindingValue === 'number') {\n context.splice(lastValueIndex, 0, bindingValue);\n (context[index + TStylingContextIndex.ValuesCountOffset] as number)++;\n\n // now that a new binding index has been added to the property\n // the guard mask bit value (at the `countId` position) needs\n // to be included into the existing mask value.\n const guardMask = getGuardMask(context, index) | (1 << countId);\n setGuardMask(context, index, guardMask);\n } else if (typeof bindingValue === 'string' && context[lastValueIndex] == null) {\n context[lastValueIndex] = bindingValue;\n }\n}\n\n/**\n * Applies all class entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with class bindings.\n *\n * @returns whether or not the classes were flushed to the element.\n */\nexport function applyClasses(\n renderer: Renderer3 | ProceduralRenderer3 | null, data: LStylingData, context: TStylingContext,\n element: RElement, directiveIndex: number): boolean {\n let classesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n const isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (classesBitMask) {\n // there is no way to sanitize a class value therefore `sanitizer=null`\n applyStyling(context, renderer, element, data, classesBitMask, setClass, null);\n classesBitMask = 0;\n classesFlushed = true;\n }\n currentClassIndex = STYLING_INDEX_START_VALUE;\n }\n return classesFlushed;\n}\n\n/**\n * Applies all style entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with style bindings.\n *\n * @returns whether or not the styles were flushed to the element.\n */\nexport function applyStyles(\n renderer: Renderer3 | ProceduralRenderer3 | null, data: LStylingData, context: TStylingContext,\n element: RElement, directiveIndex: number, sanitizer: StyleSanitizeFn | null): boolean {\n let stylesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n const isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (stylesBitMask) {\n applyStyling(context, renderer, element, data, stylesBitMask, setStyle, sanitizer);\n stylesBitMask = 0;\n stylesFlushed = true;\n }\n currentStyleIndex = STYLING_INDEX_START_VALUE;\n return true;\n }\n return stylesFlushed;\n}\n\n/**\n * Runs through the provided styling context and applies each value to\n * the provided element (via the renderer) if one or more values are present.\n *\n * This function will iterate over all entries present in the provided\n * `TStylingContext` array (both prop-based and map-based bindings).-\n *\n * Each entry, within the `TStylingContext` array, is stored alphabetically\n * and this means that each prop/value entry will be applied in order\n * (so long as it is marked dirty in the provided `bitMask` value).\n *\n * If there are any map-based entries present (which are applied to the\n * element via the `[style]` and `[class]` bindings) then those entries\n * will be applied as well. However, the code for that is not apart of\n * this function. Instead, each time a property is visited, then the\n * code below will call an external function called `stylingMapsSyncFn`\n * and, if present, it will keep the application of styling values in\n * map-based bindings up to sync with the application of prop-based\n * bindings.\n *\n * Visit `styling_next/map_based_bindings.ts` to learn more about how the\n * algorithm works for map-based styling bindings.\n *\n * Note that this function is not designed to be called in isolation (use\n * `applyClasses` and `applyStyles` to actually apply styling values).\n */\nexport function applyStyling(\n context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n bindingData: LStylingData, bitMaskValue: number | boolean, applyStylingFn: ApplyStylingFn,\n sanitizer: StyleSanitizeFn | null) {\n deferredBindingQueue.length && flushDeferredBindings();\n\n const bitMask = normalizeBitMaskValue(bitMaskValue);\n const stylingMapsSyncFn = getStylingMapsSyncFn();\n const mapsGuardMask = getGuardMask(context, TStylingContextIndex.MapBindingsPosition);\n const applyAllValues = (bitMask & mapsGuardMask) > 0;\n const mapsMode =\n applyAllValues ? StylingMapsSyncMode.ApplyAllValues : StylingMapsSyncMode.TraverseValues;\n\n let i = getPropValuesStartPosition(context);\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n const guardMask = getGuardMask(context, i);\n if (bitMask & guardMask) {\n let valueApplied = false;\n const prop = getProp(context, i);\n const valuesCountUpToDefault = valuesCount - 1;\n const defaultValue = getBindingValue(context, i, valuesCountUpToDefault) as string | null;\n\n // case 1: apply prop-based values\n // try to apply the binding values and see if a non-null\n // value gets set for the styling binding\n for (let j = 0; j < valuesCountUpToDefault; j++) {\n const bindingIndex = getBindingValue(context, i, j) as number;\n const value = bindingData[bindingIndex];\n if (isStylingValueDefined(value)) {\n const finalValue = sanitizer && isSanitizationRequired(context, i) ?\n sanitizer(prop, value, StyleSanitizeMode.SanitizeOnly) :\n value;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndex);\n valueApplied = true;\n break;\n }\n }\n\n // case 2: apply map-based values\n // traverse through each map-based styling binding and update all values up to\n // the provided `prop` value. If the property was not applied in the loop above\n // then it will be attempted to be applied in the maps sync code below.\n if (stylingMapsSyncFn) {\n // determine whether or not to apply the target property or to skip it\n const mode = mapsMode | (valueApplied ? StylingMapsSyncMode.SkipTargetProp :\n StylingMapsSyncMode.ApplyTargetProp);\n const valueAppliedWithinMap = stylingMapsSyncFn(\n context, renderer, element, bindingData, applyStylingFn, sanitizer, mode, prop,\n defaultValue);\n valueApplied = valueApplied || valueAppliedWithinMap;\n }\n\n // case 3: apply the default value\n // if the value has not yet been applied then a truthy value does not exist in the\n // prop-based or map-based bindings code. If and when this happens, just apply the\n // default value (even if the default value is `null`).\n if (!valueApplied) {\n applyStylingFn(renderer, element, prop, defaultValue);\n }\n }\n\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n\n // the map-based styling entries may have not applied all their\n // values. For this reason, one more call to the sync function\n // needs to be issued at the end.\n if (stylingMapsSyncFn) {\n stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mapsMode);\n }\n}\n\nfunction normalizeBitMaskValue(value: number | boolean): number {\n // if pass => apply all values (-1 implies that all bits are flipped to true)\n if (value === true) return -1;\n\n // if pass => skip all values\n if (value === false) return 0;\n\n // return the bit mask value as is\n return value;\n}\n\nlet _activeStylingMapApplyFn: SyncStylingMapsFn|null = null;\nexport function getStylingMapsSyncFn() {\n return _activeStylingMapApplyFn;\n}\n\nexport function setStylingMapsSyncFn(fn: SyncStylingMapsFn) {\n _activeStylingMapApplyFn = fn;\n}\n\n/**\n * Assigns a style value to a style property for the given element.\n */\nconst setStyle: ApplyStylingFn =\n (renderer: Renderer3 | null, native: any, prop: string, value: string | null) => {\n if (value) {\n // opacity, z-index and flexbox all have number values\n // and these need to be converted into strings so that\n // they can be assigned properly.\n value = value.toString();\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n } else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n };\n\n/**\n * Adds/removes the provided className value to the provided element.\n */\nconst setClass: ApplyStylingFn =\n (renderer: Renderer3 | null, native: any, className: string, value: any) => {\n if (className !== '') {\n if (value) {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native.classList.add(className);\n } else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native.classList.remove(className);\n }\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*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3} from '../interfaces/renderer';\n\nimport {setStylingMapsSyncFn} from './bindings';\nimport {ApplyStylingFn, LStylingData, LStylingMap, LStylingMapIndex, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {getBindingValue, getValuesCount, isStylingValueDefined} from './util';\n\n\n/**\n * --------\n *\n * This file contains the algorithm logic for applying map-based bindings\n * such as `[style]` and `[class]`.\n *\n * --------\n */\n\n/**\n * Used to apply styling values presently within any map-based bindings on an element.\n *\n * Angular supports map-based styling bindings which can be applied via the\n * `[style]` and `[class]` bindings which can be placed on any HTML element.\n * These bindings can work independently, together or alongside prop-based\n * styling bindings (e.g. `<div [style]=\"x\" [style.width]=\"w\">`).\n *\n * If a map-based styling binding is detected by the compiler, the following\n * AOT code is produced:\n *\n * ```typescript\n * styleMap(ctx.styles); // styles = {key:value}\n * classMap(ctx.classes); // classes = {key:value}|string\n * ```\n *\n * If and when either of the instructions above are evaluated, then the code\n * present in this file is included into the bundle. The mechanism used, to\n * activate support for map-based bindings at runtime is possible via the\n * `activeStylingMapFeature` function (which is also present in this file).\n *\n * # The Algorithm\n * Whenever a map-based binding updates (which is when the identity of the\n * map-value changes) then the map is iterated over and a `LStylingMap` array\n * is produced. The `LStylingMap` instance is stored in the binding location\n * where the `BINDING_INDEX` is situated when the `styleMap()` or `classMap()`\n * instruction were called. Once the binding changes, then the internal `bitMask`\n * value is marked as dirty.\n *\n * Styling values are applied once CD exits the element (which happens when\n * the `select(n)` instruction is called or the template function exits). When\n * this occurs, all prop-based bindings are applied. If a map-based binding is\n * present then a special flushing function (called a sync function) is made\n * available and it will be called each time a styling property is flushed.\n *\n * The flushing algorithm is designed to apply styling for a property (which is\n * a CSS property or a className value) one by one. If map-based bindings\n * are present, then the flushing algorithm will keep calling the maps styling\n * sync function each time a property is visited. This way, the flushing\n * behavior of map-based bindings will always be at the same property level\n * as the current prop-based property being iterated over (because everything\n * is alphabetically sorted).\n *\n * Let's imagine we have the following HTML template code:\n *\n * ```html\n * <div [style]=\"{width:'100px', height:'200px', 'z-index':'10'}\"\n * [style.width.px]=\"200\">...</div>\n * ```\n *\n * When CD occurs, both the `[style]` and `[style.width]` bindings\n * are evaluated. Then when the styles are flushed on screen, the\n * following operations happen:\n *\n * 1. `[style.width]` is attempted to be written to the element.\n *\n * 2. Once that happens, the algorithm instructs the map-based\n * entries (`[style]` in this case) to \"catch up\" and apply\n * all values up to the `width` value. When this happens the\n * `height` value is applied to the element (since it is\n * alphabetically situated before the `width` property).\n *\n * 3. Since there are no more prop-based entries anymore, the\n * loop exits and then, just before the flushing ends, it\n * instructs all map-based bindings to \"finish up\" applying\n * their values.\n *\n * 4. The only remaining value within the map-based entries is\n * the `z-index` value (`width` got skipped because it was\n * successfully applied via the prop-based `[style.width]`\n * binding). Since all map-based entries are told to \"finish up\",\n * the `z-index` value is iterated over and it is then applied\n * to the element.\n *\n * The most important thing to take note of here is that prop-based\n * bindings are evaluated in order alongside map-based bindings.\n * This allows all styling across an element to be applied in O(n)\n * time (a similar algorithm is that of the array merge algorithm\n * in merge sort).\n */\nexport const syncStylingMap: SyncStylingMapsFn =\n (context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n mode: StylingMapsSyncMode, targetProp?: string | null,\n defaultValue?: string | null): boolean => {\n let targetPropValueWasApplied = false;\n\n // once the map-based styling code is activate it is never deactivated. For this reason a\n // check to see if the current styling context has any map based bindings is required.\n const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n if (totalMaps) {\n let runTheSyncAlgorithm = true;\n const loopUntilEnd = !targetProp;\n\n // If the code is told to finish up (run until the end), but the mode\n // hasn't been flagged to apply values (it only traverses values) then\n // there is no point in iterating over the array because nothing will\n // be applied to the element.\n if (loopUntilEnd && (mode & ~StylingMapsSyncMode.ApplyAllValues)) {\n runTheSyncAlgorithm = false;\n targetPropValueWasApplied = true;\n }\n\n if (runTheSyncAlgorithm) {\n targetPropValueWasApplied = innerSyncStylingMap(\n context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp || null,\n 0, defaultValue || null);\n }\n\n if (loopUntilEnd) {\n resetSyncCursors();\n }\n }\n\n return targetPropValueWasApplied;\n };\n\n/**\n * Recursive function designed to apply map-based styling to an element one map at a time.\n *\n * This function is designed to be called from the `syncStylingMap` function and will\n * apply map-based styling data one map at a time to the provided `element`.\n *\n * This function is recursive and it will call itself if a follow-up map value is to be\n * processed. To learn more about how the algorithm works, see `syncStylingMap`.\n */\nfunction innerSyncStylingMap(\n context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n mode: StylingMapsSyncMode, targetProp: string | null, currentMapIndex: number,\n defaultValue: string | null): boolean {\n let targetPropValueWasApplied = false;\n\n const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n if (currentMapIndex < totalMaps) {\n const bindingIndex = getBindingValue(\n context, TStylingContextIndex.MapBindingsPosition, currentMapIndex) as number;\n const lStylingMap = data[bindingIndex] as LStylingMap;\n\n let cursor = getCurrentSyncCursor(currentMapIndex);\n while (cursor < lStylingMap.length) {\n const prop = getMapProp(lStylingMap, cursor);\n const iteratedTooFar = targetProp && prop > targetProp;\n const isTargetPropMatched = !iteratedTooFar && prop === targetProp;\n const value = getMapValue(lStylingMap, cursor);\n const valueIsDefined = isStylingValueDefined(value);\n\n // the recursive code is designed to keep applying until\n // it reaches or goes past the target prop. If and when\n // this happens then it will stop processing values, but\n // all other map values must also catch up to the same\n // point. This is why a recursive call is still issued\n // even if the code has iterated too far.\n const innerMode =\n iteratedTooFar ? mode : resolveInnerMapMode(mode, valueIsDefined, isTargetPropMatched);\n const innerProp = iteratedTooFar ? targetProp : prop;\n let valueApplied = innerSyncStylingMap(\n context, renderer, element, data, applyStylingFn, sanitizer, innerMode, innerProp,\n currentMapIndex + 1, defaultValue);\n\n if (iteratedTooFar) {\n break;\n }\n\n if (!valueApplied && isValueAllowedToBeApplied(mode, isTargetPropMatched)) {\n const useDefault = isTargetPropMatched && !valueIsDefined;\n const valueToApply = useDefault ? defaultValue : value;\n const bindingIndexToApply = useDefault ? bindingIndex : null;\n const finalValue = sanitizer ?\n sanitizer(prop, valueToApply, StyleSanitizeMode.ValidateAndSanitize) :\n valueToApply;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndexToApply);\n valueApplied = true;\n }\n\n targetPropValueWasApplied = valueApplied && isTargetPropMatched;\n cursor += LStylingMapIndex.TupleSize;\n }\n setCurrentSyncCursor(currentMapIndex, cursor);\n }\n\n return targetPropValueWasApplied;\n}\n\n\n/**\n * Enables support for map-based styling bindings (e.g. `[style]` and `[class]` bindings).\n */\nexport function activeStylingMapFeature() {\n setStylingMapsSyncFn(syncStylingMap);\n}\n\n/**\n * Used to determine the mode for the inner recursive call.\n *\n * If an inner map is iterated on then this is done so for one\n * of two reasons:\n *\n * - The target property was detected and the inner map\n * must now \"catch up\" (pointer-wise) up to where the current\n * map's cursor is situated.\n *\n * - The target property was not detected in the current map\n * and must be found in an inner map. This can only be allowed\n * if the current map iteration is not set to skip the target\n * property.\n */\nfunction resolveInnerMapMode(\n currentMode: number, valueIsDefined: boolean, isExactMatch: boolean): number {\n let innerMode = currentMode;\n if (!valueIsDefined && isExactMatch && !(currentMode & StylingMapsSyncMode.SkipTargetProp)) {\n // case 1: set the mode to apply the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= StylingMapsSyncMode.ApplyTargetProp;\n innerMode &= ~StylingMapsSyncMode.SkipTargetProp;\n } else {\n // case 2: set the mode to skip the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= StylingMapsSyncMode.SkipTargetProp;\n innerMode &= ~StylingMapsSyncMode.ApplyTargetProp;\n }\n return innerMode;\n}\n\n/**\n * Decides whether or not a prop/value entry will be applied to an element.\n *\n * To determine whether or not a value is to be applied,\n * the following procedure is evaluated:\n *\n * First check to see the current `mode` status:\n * 1. If the mode value permits all props to be applied then allow.\n * - But do not allow if the current prop is set to be skipped.\n * 2. Otherwise if the current prop is permitted then allow.\n */\nfunction isValueAllowedToBeApplied(mode: number, isTargetPropMatched: boolean) {\n let doApplyValue = (mode & StylingMapsSyncMode.ApplyAllValues) > 0;\n if (!doApplyValue) {\n if (mode & StylingMapsSyncMode.ApplyTargetProp) {\n doApplyValue = isTargetPropMatched;\n }\n } else if ((mode & StylingMapsSyncMode.SkipTargetProp) && isTargetPropMatched) {\n doApplyValue = false;\n }\n return doApplyValue;\n}\n\n/**\n * Used to keep track of concurrent cursor values for multiple map-based styling bindings present on\n * an element.\n */\nconst MAP_CURSORS: number[] = [];\n\n/**\n * Used to reset the state of each cursor value being used to iterate over map-based styling\n * bindings.\n */\nfunction resetSyncCursors() {\n for (let i = 0; i < MAP_CURSORS.length; i++) {\n MAP_CURSORS[i] = LStylingMapIndex.ValuesStartPosition;\n }\n}\n\n/**\n * Returns an active cursor value at a given mapIndex location.\n */\nfunction getCurrentSyncCursor(mapIndex: number) {\n if (mapIndex >= MAP_CURSORS.length) {\n MAP_CURSORS.push(LStylingMapIndex.ValuesStartPosition);\n }\n return MAP_CURSORS[mapIndex];\n}\n\n/**\n * Sets a cursor value at a given mapIndex location.\n */\nfunction setCurrentSyncCursor(mapIndex: number, indexValue: number) {\n MAP_CURSORS[mapIndex] = indexValue;\n}\n\n/**\n * Used to convert a {key:value} map into a `LStylingMap` array.\n *\n * This function will either generate a new `LStylingMap` instance\n * or it will patch the provided `newValues` map value into an\n * existing `LStylingMap` value (this only happens if `bindingValue`\n * is an instance of `LStylingMap`).\n *\n * If a new key/value map is provided with an old `LStylingMap`\n * value then all properties will be overwritten with their new\n * values or with `null`. This means that the array will never\n * shrink in size (but it will also not be created and thrown\n * away whenever the {key:value} map entries change).\n */\nexport function normalizeIntoStylingMap(\n bindingValue: null | LStylingMap,\n newValues: {[key: string]: any} | string | null | undefined): LStylingMap {\n const lStylingMap: LStylingMap = Array.isArray(bindingValue) ? bindingValue : [null];\n lStylingMap[LStylingMapIndex.RawValuePosition] = newValues || null;\n\n // because the new values may not include all the properties\n // that the old ones had, all values are set to `null` before\n // the new values are applied. This way, when flushed, the\n // styling algorithm knows exactly what style/class values\n // to remove from the element (since they are `null`).\n for (let j = LStylingMapIndex.ValuesStartPosition; j < lStylingMap.length;\n j += LStylingMapIndex.TupleSize) {\n setMapValue(lStylingMap, j, null);\n }\n\n let props: string[]|null = null;\n let map: {[key: string]: any}|undefined|null;\n let allValuesTrue = false;\n if (typeof newValues === 'string') { // [class] bindings allow string values\n if (newValues.length) {\n props = newValues.split(/\\s+/);\n allValuesTrue = true;\n }\n } else {\n props = newValues ? Object.keys(newValues) : null;\n map = newValues;\n }\n\n if (props) {\n outer: for (let i = 0; i < props.length; i++) {\n const prop = props[i] as string;\n const value = allValuesTrue ? true : map ![prop];\n for (let j = LStylingMapIndex.ValuesStartPosition; j < lStylingMap.length;\n j += LStylingMapIndex.TupleSize) {\n const propAtIndex = getMapProp(lStylingMap, j);\n if (prop <= propAtIndex) {\n if (propAtIndex === prop) {\n setMapValue(lStylingMap, j, value);\n } else {\n lStylingMap.splice(j, 0, prop, value);\n }\n continue outer;\n }\n }\n lStylingMap.push(prop, value);\n }\n }\n\n return lStylingMap;\n}\n\nexport function getMapProp(map: LStylingMap, index: number): string {\n return map[index + LStylingMapIndex.PropOffset] as string;\n}\n\nexport function setMapValue(map: LStylingMap, index: number, value: string | null): void {\n map[index + LStylingMapIndex.ValueOffset] = value;\n}\n\nexport function getMapValue(map: LStylingMap, index: number): string|null {\n return map[index + LStylingMapIndex.ValueOffset] as string | null;\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*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {RElement} from '../interfaces/renderer';\nimport {LView, SANITIZER} from '../interfaces/view';\nimport {attachDebugObject} from '../util/debug_utils';\n\nimport {applyStyling} from './bindings';\nimport {ApplyStylingFn, LStylingData, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {activeStylingMapFeature} from './map_based_bindings';\nimport {getCurrentStyleSanitizer} from './state';\nimport {getCurrentOrLViewSanitizer, getDefaultValue, getGuardMask, getProp, getValuesCount, isContextLocked, isMapBased, isSanitizationRequired} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core debug functionality for styling in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n\n/**\n * A debug/testing-oriented summary of a styling entry.\n *\n * A value such as this is generated as an artifact of the `DebugStyling`\n * summary.\n */\nexport interface LStylingSummary {\n /** The style/class property that the summary is attached to */\n prop: string;\n\n /** The last applied value for the style/class property */\n value: string|boolean|null;\n\n /** The binding index of the last applied style/class property */\n bindingIndex: number|null;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries for a `DebugNode` instance.\n */\nexport interface DebugStyling {\n /** The associated TStylingContext instance */\n context: TStylingContext;\n\n /**\n * A summarization of each style/class property\n * present in the context.\n */\n summary: {[key: string]: LStylingSummary};\n\n /**\n * A key/value map of all styling properties and their\n * runtime values.\n */\n values: {[key: string]: string | number | null | boolean};\n\n /**\n * Overrides the sanitizer used to process styles.\n */\n overrideSanitizer(sanitizer: StyleSanitizeFn|null): void;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries within a `TStylingContext`.\n */\nexport interface TStylingTupleSummary {\n /** The property (style or class property) that this tuple represents */\n prop: string;\n\n /** The total amount of styling entries apart of this tuple */\n valuesCount: number;\n\n /**\n * The bit guard mask that is used to compare and protect against\n * styling changes when and styling bindings update\n */\n guardMask: number;\n\n /**\n * Whether or not the entry requires sanitization\n */\n sanitizationRequired: boolean;\n\n /**\n * The default value that will be applied if any bindings are falsy.\n */\n defaultValue: string|boolean|null;\n\n /**\n * All bindingIndex sources that have been registered for this style.\n */\n sources: (number|null|string)[];\n}\n\n/**\n * Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.\n */\nexport function attachStylingDebugObject(context: TStylingContext) {\n const debug = new TStylingContextDebug(context);\n attachDebugObject(context, debug);\n return debug;\n}\n\n/**\n * A human-readable debug summary of the styling data present within `TStylingContext`.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nclass TStylingContextDebug {\n constructor(public readonly context: TStylingContext) {}\n\n get isLocked() { return isContextLocked(this.context); }\n\n /**\n * Returns a detailed summary of each styling entry in the context.\n *\n * See `TStylingTupleSummary`.\n */\n get entries(): {[prop: string]: TStylingTupleSummary} {\n const context = this.context;\n const entries: {[prop: string]: TStylingTupleSummary} = {};\n const start = TStylingContextIndex.MapBindingsPosition;\n let i = start;\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n // the context may contain placeholder values which are populated ahead of time,\n // but contain no actual binding values. In this situation there is no point in\n // classifying this as an \"entry\" since no real data is stored here yet.\n if (valuesCount) {\n const prop = getProp(context, i);\n const guardMask = getGuardMask(context, i);\n const defaultValue = getDefaultValue(context, i);\n const sanitizationRequired = isSanitizationRequired(context, i);\n const bindingsStartPosition = i + TStylingContextIndex.BindingsStartOffset;\n\n const sources: (number | string | null)[] = [];\n for (let j = 0; j < valuesCount; j++) {\n sources.push(context[bindingsStartPosition + j] as number | string | null);\n }\n\n entries[prop] = {prop, guardMask, sanitizationRequired, valuesCount, defaultValue, sources};\n }\n\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n return entries;\n }\n}\n\n/**\n * A human-readable debug summary of the styling data present for a `DebugNode` instance.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nexport class NodeStylingDebug implements DebugStyling {\n private _sanitizer: StyleSanitizeFn|null = null;\n\n constructor(\n public context: TStylingContext, private _data: LStylingData,\n private _isClassBased?: boolean) {}\n\n /**\n * Overrides the sanitizer used to process styles.\n */\n overrideSanitizer(sanitizer: StyleSanitizeFn|null) { this._sanitizer = sanitizer; }\n\n /**\n * Returns a detailed summary of each styling entry in the context and\n * what their runtime representation is.\n *\n * See `LStylingSummary`.\n */\n get summary(): {[key: string]: LStylingSummary} {\n const entries: {[key: string]: LStylingSummary} = {};\n this._mapValues((prop: string, value: any, bindingIndex: number | null) => {\n entries[prop] = {prop, value, bindingIndex};\n });\n return entries;\n }\n\n /**\n * Returns a key/value map of all the styles/classes that were last applied to the element.\n */\n get values(): {[key: string]: any} {\n const entries: {[key: string]: any} = {};\n this._mapValues((prop: string, value: any) => { entries[prop] = value; });\n return entries;\n }\n\n private _mapValues(fn: (prop: string, value: any, bindingIndex: number|null) => any) {\n // there is no need to store/track an element instance. The\n // element is only used when the styling algorithm attempts to\n // style the value (and we mock out the stylingApplyFn anyway).\n const mockElement = {} as any;\n const hasMaps = getValuesCount(this.context, TStylingContextIndex.MapBindingsPosition) > 0;\n if (hasMaps) {\n activeStylingMapFeature();\n }\n\n const mapFn: ApplyStylingFn =\n (renderer: any, element: RElement, prop: string, value: any, bindingIndex: number) => {\n fn(prop, value, bindingIndex || null);\n };\n\n const sanitizer = this._isClassBased ? null : (this._sanitizer ||\n getCurrentOrLViewSanitizer(this._data as LView));\n applyStyling(this.context, null, mockElement, this._data, true, mapFn, sanitizer);\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\nimport {ComponentTemplate} from '..';\nimport {SchemaMetadata} from '../../core';\nimport {assertDefined} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../interfaces/container';\nimport {DirectiveDefList, PipeDefList, ViewQueriesFunction} from '../interfaces/definition';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, TIcu} from '../interfaces/i18n';\nimport {TElementNode, TNode, TViewNode} from '../interfaces/node';\nimport {LQueries} from '../interfaces/query';\nimport {RComment, RElement} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTENT_QUERIES, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, T_HOST} from '../interfaces/view';\nimport {runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling_next/styling_debug';\nimport {attachDebugObject} from '../util/debug_utils';\nimport {getTNode, isStylingContext, unwrapRNode} from '../util/view_utils';\n\n\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n\n\nexport const LViewArray = ngDevMode && createNamedArrayType('LView');\nlet LVIEW_EMPTY: unknown[]; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nexport function cloneToLView(list: any[]): LView {\n if (LVIEW_EMPTY === undefined) LVIEW_EMPTY = new LViewArray !();\n return LVIEW_EMPTY.concat(list) as any;\n}\n\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up in\n * debug tools in ngDevMode.\n */\nexport const TViewConstructor = class TView implements ITView {\n constructor(\n public id: number, //\n public blueprint: LView, //\n public template: ComponentTemplate<{}>|null, //\n public viewQuery: ViewQueriesFunction<{}>|null, //\n public node: TViewNode|TElementNode|null, //\n public data: TData, //\n public bindingStartIndex: number, //\n public viewQueryStartIndex: number, //\n public expandoStartIndex: number, //\n public expandoInstructions: ExpandoInstructions|null, //\n public firstTemplatePass: boolean, //\n public staticViewQueries: boolean, //\n public staticContentQueries: boolean, //\n public preOrderHooks: HookData|null, //\n public preOrderCheckHooks: HookData|null, //\n public contentHooks: HookData|null, //\n public contentCheckHooks: HookData|null, //\n public viewHooks: HookData|null, //\n public viewCheckHooks: HookData|null, //\n public destroyHooks: HookData|null, //\n public cleanup: any[]|null, //\n public contentQueries: number[]|null, //\n public components: number[]|null, //\n public directiveRegistry: DirectiveDefList|null, //\n public pipeRegistry: PipeDefList|null, //\n public firstChild: TNode|null, //\n public schemas: SchemaMetadata[]|null, //\n ) {}\n};\n\nconst TViewData = ngDevMode && createNamedArrayType('TViewData');\nlet TVIEWDATA_EMPTY:\n unknown[]; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nexport function cloneToTViewData(list: any[]): TData {\n if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData !();\n return TVIEWDATA_EMPTY.concat(list) as any;\n}\n\nexport const LViewBlueprint = ngDevMode && createNamedArrayType('LViewBlueprint');\nexport const MatchesArray = ngDevMode && createNamedArrayType('MatchesArray');\nexport const TViewComponents = ngDevMode && createNamedArrayType('TViewComponents');\nexport const TNodeLocalNames = ngDevMode && createNamedArrayType('TNodeLocalNames');\nexport const TNodeInitialInputs = ngDevMode && createNamedArrayType('TNodeInitialInputs');\nexport const TNodeInitialData = ngDevMode && createNamedArrayType('TNodeInitialData');\nexport const LCleanup = ngDevMode && createNamedArrayType('LCleanup');\nexport const TCleanup = ngDevMode && createNamedArrayType('TCleanup');\n\n\n\nexport function attachLViewDebug(lView: LView) {\n attachDebugObject(lView, new LViewDebug(lView));\n}\n\nexport function attachLContainerDebug(lContainer: LContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nexport function toDebug(obj: LView): LViewDebug;\nexport function toDebug(obj: LView | null): LViewDebug|null;\nexport function toDebug(obj: LView | LContainer | null): LViewDebug|LContainerDebug|null;\nexport function toDebug(obj: any): any {\n if (obj) {\n const debug = (obj as any).debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n } else {\n return obj;\n }\n}\n\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element itself\n * (will not serialize child elements).\n */\nfunction toHtml(value: any, includeChildren: boolean = false): string|null {\n const node: HTMLElement|null = unwrapRNode(value) as any;\n if (node) {\n const isTextNode = node.nodeType === Node.TEXT_NODE;\n const outerHTML = (isTextNode ? node.textContent : node.outerHTML) || '';\n if (includeChildren || isTextNode) {\n return outerHTML;\n } else {\n const innerHTML = node.innerHTML;\n return outerHTML.split(innerHTML)[0] || null;\n }\n } else {\n return null;\n }\n}\n\nexport class LViewDebug {\n constructor(private readonly _raw_lView: LView) {}\n\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get flags() {\n const flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & LViewFlags.InitPhaseStateMask,\n creationMode: !!(flags & LViewFlags.CreationMode),\n firstViewPass: !!(flags & LViewFlags.FirstLViewPass),\n checkAlways: !!(flags & LViewFlags.CheckAlways),\n dirty: !!(flags & LViewFlags.Dirty),\n attached: !!(flags & LViewFlags.Attached),\n destroyed: !!(flags & LViewFlags.Destroyed),\n isRoot: !!(flags & LViewFlags.IsRoot),\n indexWithinInitPhase: flags >> LViewFlags.IndexWithinInitPhaseShift,\n };\n }\n get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lView[PARENT]); }\n get host(): string|null { return toHtml(this._raw_lView[HOST], true); }\n get context(): {}|null { return this._raw_lView[CONTEXT]; }\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into a\n * tree structure with relevant details pulled out for readability.\n */\n get nodes(): DebugNode[]|null {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }\n /**\n * Additional information which is hidden behind a property. The extra level of indirection is\n * done so that the debug view would not be cluttered with properties which are only rarely\n * relevant to the developer.\n */\n get __other__() {\n return {\n tView: this._raw_lView[TVIEW],\n cleanup: this._raw_lView[CLEANUP],\n injector: this._raw_lView[INJECTOR],\n rendererFactory: this._raw_lView[RENDERER_FACTORY],\n renderer: this._raw_lView[RENDERER],\n sanitizer: this._raw_lView[SANITIZER],\n childHead: toDebug(this._raw_lView[CHILD_HEAD]),\n next: toDebug(this._raw_lView[NEXT]),\n childTail: toDebug(this._raw_lView[CHILD_TAIL]),\n declarationView: toDebug(this._raw_lView[DECLARATION_VIEW]),\n contentQueries: this._raw_lView[CONTENT_QUERIES],\n queries: this._raw_lView[QUERIES],\n tHost: this._raw_lView[T_HOST],\n bindingIndex: this._raw_lView[BINDING_INDEX],\n };\n }\n\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get childViews(): Array<LViewDebug|LContainerDebug> {\n const childViews: Array<LViewDebug|LContainerDebug> = [];\n let child = this.__other__.childHead;\n while (child) {\n childViews.push(child);\n child = child.__other__.next;\n }\n return childViews;\n }\n}\n\nexport interface DebugNode {\n html: string|null;\n native: Node;\n styles: DebugNewStyling|null;\n classes: DebugNewStyling|null;\n nodes: DebugNode[]|null;\n component: LViewDebug|null;\n}\n\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nexport function toDebugNodes(tNode: TNode | null, lView: LView): DebugNode[]|null {\n if (tNode) {\n const debugNodes: DebugNode[] = [];\n let tNodeCursor: TNode|null = tNode;\n while (tNodeCursor) {\n const rawValue = lView[tNode.index];\n const native = unwrapRNode(rawValue);\n const componentLViewDebug =\n isStylingContext(rawValue) ? null : toDebug(readLViewValue(rawValue));\n\n let styles: DebugNewStyling|null = null;\n let classes: DebugNewStyling|null = null;\n if (runtimeIsNewStylingInUse()) {\n styles = tNode.newStyles ? new NodeStylingDebug(tNode.newStyles, lView, false) : null;\n classes = tNode.newClasses ? new NodeStylingDebug(tNode.newClasses, lView, true) : null;\n }\n\n debugNodes.push({\n html: toHtml(native),\n native: native as any, styles, classes,\n nodes: toDebugNodes(tNode.child, lView),\n component: componentLViewDebug,\n });\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n } else {\n return null;\n }\n}\n\nexport class LContainerDebug {\n constructor(private readonly _raw_lContainer: LContainer) {}\n\n get activeIndex(): number { return this._raw_lContainer[ACTIVE_INDEX]; }\n get views(): LViewDebug[] {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug as(l: LView) => LViewDebug);\n }\n get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lContainer[PARENT]); }\n get queries(): LQueries|null { return this._raw_lContainer[QUERIES]; }\n get host(): RElement|RComment|StylingContext|LView { return this._raw_lContainer[HOST]; }\n get native(): RComment { return this._raw_lContainer[NATIVE]; }\n get __other__() {\n return {\n next: toDebug(this._raw_lContainer[NEXT]),\n };\n }\n}\n\n/**\n * Return an `LView` value if found.\n *\n * @param value `LView` if any\n */\nexport function readLViewValue(value: any): LView|null {\n while (Array.isArray(value)) {\n // This check is not quite right, as it does not take into account `StylingContext`\n // This is why it is in debug, not in util.ts\n if (value.length >= HEADER_OFFSET - 1) return value as LView;\n value = value[HOST];\n }\n return null;\n}\n\nexport class I18NDebugItem {\n [key: string]: any;\n\n get tNode() { return getTNode(this.nodeIndex, this._lView); }\n\n constructor(\n public __raw_opCode: any, private _lView: LView, public nodeIndex: number,\n public type: string) {}\n}\n\n/**\n * Turns a list of \"Create\" & \"Update\" OpCodes into a human-readable list of operations for\n * debugging purposes.\n * @param mutateOpCodes mutation opCodes to read\n * @param updateOpCodes update opCodes to read\n * @param icus list of ICU expressions\n * @param lView The view the opCodes are acting on\n */\nexport function attachI18nOpCodesDebug(\n mutateOpCodes: I18nMutateOpCodes, updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null,\n lView: LView) {\n attachDebugObject(mutateOpCodes, new I18nMutateOpCodesDebug(mutateOpCodes, lView));\n attachDebugObject(updateOpCodes, new I18nUpdateOpCodesDebug(updateOpCodes, icus, lView));\n\n if (icus) {\n icus.forEach(icu => {\n icu.create.forEach(\n icuCase => { attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView)); });\n icu.update.forEach(icuCase => {\n attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));\n });\n });\n }\n}\n\nexport class I18nMutateOpCodesDebug implements I18nOpCodesDebug {\n constructor(private readonly __raw_opCodes: I18nMutateOpCodes, private readonly __lView: LView) {}\n\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get operations() {\n const {__lView, __raw_opCodes} = this;\n const results: any[] = [];\n\n for (let i = 0; i < __raw_opCodes.length; i++) {\n const opCode = __raw_opCodes[i];\n let result: any;\n if (typeof opCode === 'string') {\n result = {\n __raw_opCode: opCode,\n type: 'Create Text Node',\n nodeIndex: __raw_opCodes[++i],\n text: opCode,\n };\n }\n\n if (typeof opCode === 'number') {\n switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.AppendChild:\n const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n result = new I18NDebugItem(opCode, __lView, destinationNodeIndex, 'AppendChild');\n break;\n case I18nMutateOpCode.Select:\n const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'Select');\n break;\n case I18nMutateOpCode.ElementEnd:\n let elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'ElementEnd');\n break;\n case I18nMutateOpCode.Attr:\n elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'Attr');\n result['attrName'] = __raw_opCodes[++i];\n result['attrValue'] = __raw_opCodes[++i];\n break;\n }\n }\n\n if (!result) {\n switch (opCode) {\n case COMMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'COMMENT_MARKER',\n commentValue: __raw_opCodes[++i],\n nodeIndex: __raw_opCodes[++i],\n };\n break;\n case ELEMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'ELEMENT_MARKER',\n };\n break;\n }\n }\n\n if (!result) {\n result = {\n __raw_opCode: opCode,\n type: 'Unknown Op Code',\n code: opCode,\n };\n }\n\n results.push(result);\n }\n\n return results;\n }\n}\n\nexport class I18nUpdateOpCodesDebug implements I18nOpCodesDebug {\n constructor(\n private readonly __raw_opCodes: I18nUpdateOpCodes, private readonly icus: TIcu[]|null,\n private readonly __lView: LView) {}\n\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get operations() {\n const {__lView, __raw_opCodes, icus} = this;\n const results: any[] = [];\n\n for (let i = 0; i < __raw_opCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = __raw_opCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = __raw_opCodes[++i] as number;\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = __raw_opCodes[j];\n if (typeof opCode === 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n // We cannot know the value of the binding so we only show the index\n value += `�${-opCode - 1}�`;\n } else {\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n let tIcuIndex: number;\n let tIcu: TIcu;\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const attrName = __raw_opCodes[++j] as string;\n const sanitizeFn = __raw_opCodes[++j];\n results.push({\n __raw_opCode: opCode,\n checkBit,\n type: 'Attr',\n attrValue: value, attrName, sanitizeFn,\n });\n break;\n case I18nUpdateOpCode.Text:\n results.push({\n __raw_opCode: opCode,\n checkBit,\n type: 'Text', nodeIndex,\n text: value,\n });\n break;\n case I18nUpdateOpCode.IcuSwitch:\n tIcuIndex = __raw_opCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n let result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuSwitch');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['mainBinding'] = value;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n tIcuIndex = __raw_opCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuUpdate');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n }\n }\n }\n }\n i += skipCodes;\n }\n return results;\n }\n}\n\nexport interface I18nOpCodesDebug { operations: any[]; }\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 */\nimport {assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {executePreOrderHooks} from '../hooks';\nimport {HEADER_OFFSET, LView, TVIEW} from '../interfaces/view';\nimport {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state';\n\n\n/**\n * Selects an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * element(0, 'div');\n * }\n * if (rf & 2) {\n * select(0); // Select the <div/> created above.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param index the index of the item to act on with the following instructions\n *\n * @codeGenApi\n */\nexport function ɵɵselect(index: number): void {\n ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n ngDevMode &&\n assertLessThan(\n index, getLView().length - HEADER_OFFSET, 'Should be within range for the view data');\n const lView = getLView();\n selectInternal(lView, index);\n}\n\n\nexport function selectInternal(lView: LView, index: number) {\n // Flush the initial hooks for elements in the view that have been added up to this point.\n executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), index);\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵselect` instruction.\n setSelectedIndex(index);\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 */\nimport {Injector} from '../../di';\nimport {ErrorHandler} from '../../error_handler';\nimport {Type} from '../../interface/type';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/security';\nimport {assertDataInRange, assertDefined, assertDomNode, assertEqual, assertLessThan, assertNotEqual, assertNotSame} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {assertLView, assertPreviousIsParent} from '../assert';\nimport {attachPatchData, getComponentViewByInstance} from '../context_discovery';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeHooks, executePreOrderHooks, registerPreOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {INJECTOR_BLOOM_PARENT_SIZE, NodeInjectorFactory} from '../interfaces/injector';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliasValue, PropertyAliases, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType, TProjectionNode, TViewNode} from '../interfaces/node';\nimport {LQueries} from '../interfaces/query';\nimport {RComment, RElement, RText, Renderer3, RendererFactory3, isProceduralRenderer} from '../interfaces/renderer';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';\nimport {isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, getSelectedIndex, incrementActiveDirectiveId, isCreationMode, leaveView, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ɵɵnamespaceHTML} from '../state';\nimport {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings';\nimport {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util';\nimport {NO_CHANGE} from '../tokens';\nimport {attrsStylingIndexOf} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER, renderStringify, stringifyForError} from '../util/misc_utils';\nimport {getLViewParent, getRootContext} from '../util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByIndex, getNativeByTNode, getTNode, isComponent, isComponentDef, isContentQueryHost, isLContainer, isRootView, readPatchedLView, resetPreOrderHookFlags, unwrapRNode, viewAttachedToChangeDetector} from '../util/view_utils';\nimport {LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeInitialData, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor, attachLContainerDebug, attachLViewDebug, cloneToLView, cloneToTViewData} from './lview_debug';\nimport {selectInternal} from './select';\n\n\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\n\nexport const enum BindingDirection {\n Input,\n Output,\n}\n\n/**\n * Refreshes the view, executing the following steps in that order:\n * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host\n * bindings, refreshes child components.\n * Note: view hooks are triggered later when leaving the view.\n */\nexport function refreshDescendantViews(lView: LView) {\n const tView = lView[TVIEW];\n const creationMode = isCreationMode(lView);\n\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = false;\n\n // Resetting the bindingIndex of the current LView as the next steps may trigger change detection.\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n\n // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.\n // This will be done in the update pass.\n if (!creationMode) {\n const checkNoChangesMode = getCheckNoChangesMode();\n\n executePreOrderHooks(lView, tView, checkNoChangesMode, undefined);\n\n refreshDynamicEmbeddedViews(lView);\n\n // Content query results must be refreshed before content hooks are called.\n refreshContentQueries(tView, lView);\n\n resetPreOrderHookFlags(lView);\n executeHooks(\n lView, tView.contentHooks, tView.contentCheckHooks, checkNoChangesMode,\n InitPhaseState.AfterContentInitHooksToBeRun, undefined);\n\n setHostBindings(tView, lView);\n }\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (creationMode && tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n refreshChildComponents(tView.components);\n}\n\n\n/** Sets the host bindings for the current view. */\nexport function setHostBindings(tView: TView, viewData: LView): void {\n const selectedIndex = getSelectedIndex();\n try {\n if (tView.expandoInstructions) {\n let bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;\n setBindingRoot(bindingRootIndex);\n let currentDirectiveIndex = -1;\n let currentElementIndex = -1;\n for (let i = 0; i < tView.expandoInstructions.length; i++) {\n const instruction = tView.expandoInstructions[i];\n if (typeof instruction === 'number') {\n if (instruction <= 0) {\n // Negative numbers mean that we are starting new EXPANDO block and need to update\n // the current element and directive index.\n currentElementIndex = -instruction;\n setActiveHostElement(currentElementIndex);\n\n // Injector block and providers are taken into account.\n const providerCount = (tView.expandoInstructions[++i] as number);\n bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;\n\n currentDirectiveIndex = bindingRootIndex;\n } else {\n // This is either the injector size (so the binding root can skip over directives\n // and get to the first set of host bindings on this node) or the host var count\n // (to get to the next set of host bindings on this node).\n bindingRootIndex += instruction;\n }\n setBindingRoot(bindingRootIndex);\n } else {\n // If it's not a number, it's a host binding function that needs to be executed.\n if (instruction !== null) {\n viewData[BINDING_INDEX] = bindingRootIndex;\n const hostCtx = unwrapRNode(viewData[currentDirectiveIndex]);\n instruction(RenderFlags.Update, hostCtx, currentElementIndex);\n\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n }\n currentDirectiveIndex++;\n }\n }\n }\n } finally {\n setActiveHostElement(selectedIndex);\n }\n}\n\n/** Refreshes content queries for all directives in the given view. */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n if (tView.contentQueries != null) {\n setCurrentQueryIndex(0);\n for (let i = 0; i < tView.contentQueries.length; i++) {\n const directiveDefIdx = tView.contentQueries[i];\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n directiveDef.contentQueries !(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n}\n\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(components: number[] | null): void {\n if (components != null) {\n for (let i = 0; i < components.length; i++) {\n componentRefresh(components[i]);\n }\n }\n}\n\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param overriddenRenderer Optional A renderer to override the default one\n * @returns the element created\n */\nexport function elementCreate(name: string, overriddenRenderer?: Renderer3): RElement {\n let native: RElement;\n const rendererToUse = overriddenRenderer || getLView()[RENDERER];\n\n const namespace = getNamespace();\n\n if (isProceduralRenderer(rendererToUse)) {\n native = rendererToUse.createElement(name, namespace);\n } else {\n if (namespace === null) {\n native = rendererToUse.createElement(name);\n } else {\n native = rendererToUse.createElementNS(namespace, name);\n }\n }\n return native;\n}\nexport function createLView<T>(\n parentLView: LView | null, tView: TView, context: T | null, flags: LViewFlags,\n host: RElement | null, tHostNode: TViewNode | TElementNode | null,\n rendererFactory?: RendererFactory3 | null, renderer?: Renderer3 | null,\n sanitizer?: Sanitizer | null, injector?: Injector | null): LView {\n const lView = ngDevMode ? cloneToLView(tView.blueprint) : tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n resetPreOrderHookFlags(lView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]) !;\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]) !;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null !;\n lView[INJECTOR as any] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param tHostNode This is a hack and we should not have to pass this value in. It is only used to\n * determine if the parent belongs to a different tView. Instead we should not have parentTView\n * point to TView other the current one.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Element,\n name: string | null, attrs: TAttributes | null): TElementNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Container,\n name: string | null, attrs: TAttributes | null): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Projection, name: null,\n attrs: TAttributes | null): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.ElementContainer,\n name: string | null, attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.IcuContainer, name: null,\n attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType, name: string | null,\n attrs: TAttributes | null): TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&\n TIcuContainerNode {\n // Keep this function short, so that the VM will inline it.\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = tView.data[adjustedIndex] as TNode ||\n createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index);\n setPreviousOrParentTNode(tNode, true);\n return tNode as TElementNode & TViewNode & TContainerNode & TElementContainerNode &\n TProjectionNode & TIcuContainerNode;\n}\n\nfunction createTNodeAtIndex(\n tView: TView, tHostNode: TNode | null, adjustedIndex: number, type: TNodeType,\n name: string | null, attrs: TAttributes | null, index: number) {\n const previousOrParentTNode = getPreviousOrParentTNode();\n const isParent = getIsParent();\n const parent =\n isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places,\n // so it's only set if the view is the same.\n const parentInSameView = parent && parent !== tHostNode;\n const tParentNode = parentInSameView ? parent as TElementNode | TContainerNode : null;\n const tNode = tView.data[adjustedIndex] =\n createTNode(tParentNode, type, adjustedIndex, name, attrs);\n // The first node is not always the one at index 0, in case of i18n, index 0 can be the\n // instruction `i18nStart` and the first node has the index 1 or more\n if (index === 0 || !tView.firstChild) {\n tView.firstChild = tNode;\n }\n // Now link ourselves into the tree.\n if (previousOrParentTNode) {\n if (isParent && previousOrParentTNode.child == null &&\n (tNode.parent !== null || previousOrParentTNode.type === TNodeType.View)) {\n // We are in the same view, which means we are adding content node to the parent view.\n previousOrParentTNode.child = tNode;\n } else if (!isParent) {\n previousOrParentTNode.next = tNode;\n }\n }\n return tNode;\n}\n\nexport function assignTViewNodeToLView(\n tView: TView, tParentNode: TNode | null, index: number, lView: LView): TViewNode {\n // View nodes are not stored in data because they can be added / removed at runtime (which\n // would cause indices to change). Their TNodes are instead stored in tView.node.\n let tNode = tView.node;\n if (tNode == null) {\n ngDevMode && tParentNode &&\n assertNodeOfPossibleTypes(tParentNode, TNodeType.Element, TNodeType.Container);\n tView.node = tNode = createTNode(\n tParentNode as TElementNode | TContainerNode | null, //\n TNodeType.View, index, null, null) as TViewNode;\n }\n\n return lView[T_HOST] = tNode as TViewNode;\n}\n\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future\n * template passes.\n */\nexport function allocExpando(view: LView, numSlotsToAlloc: number) {\n const tView = view[TVIEW];\n if (tView.firstTemplatePass) {\n for (let i = 0; i < numSlotsToAlloc; i++) {\n tView.blueprint.push(null);\n tView.data.push(null);\n view.push(null);\n }\n\n // We should only increment the expando start index if there aren't already directives\n // and injectors saved in the \"expando\" section\n if (!tView.expandoInstructions) {\n tView.expandoStartIndex += numSlotsToAlloc;\n } else {\n // Since we're adding the dynamic nodes into the expando section, we need to let the host\n // bindings know that they should skip x slots\n tView.expandoInstructions.push(numSlotsToAlloc);\n }\n }\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Used for creating the LViewNode of a dynamic embedded view,\n * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().\n * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).\n */\nexport function createEmbeddedViewAndNode<T>(\n tView: TView, context: T, declarationView: LView, queries: LQueries | null,\n injectorIndex: number): LView {\n const _isParent = getIsParent();\n const _previousOrParentTNode = getPreviousOrParentTNode();\n setPreviousOrParentTNode(null !, true);\n\n const lView = createLView(declarationView, tView, context, LViewFlags.CheckAlways, null, null);\n lView[DECLARATION_VIEW] = declarationView;\n\n if (queries) {\n lView[QUERIES] = queries.createView();\n }\n assignTViewNodeToLView(tView, null, -1, lView);\n\n if (tView.firstTemplatePass) {\n tView.node !.injectorIndex = injectorIndex;\n }\n\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n return lView;\n}\n\n/**\n * Used for rendering embedded views (e.g. dynamically created views)\n *\n * Dynamically created views must store/retrieve their TViews differently from component views\n * because their template functions are nested in the template functions of their hosts, creating\n * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor\n * inside\n * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we\n * can't store TViews in the template function itself (as we do for comps). Instead, we store the\n * TView for dynamically created views on their host TNode, which only has one instance.\n */\nexport function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, context: T) {\n const _isParent = getIsParent();\n const _previousOrParentTNode = getPreviousOrParentTNode();\n let oldView: LView;\n if (viewToRender[FLAGS] & LViewFlags.IsRoot) {\n // This is a root view inside the view tree\n tickRootContext(getRootContext(viewToRender));\n } else {\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n setPreviousOrParentTNode(null !, true);\n\n oldView = enterView(viewToRender, viewToRender[T_HOST]);\n resetPreOrderHookFlags(viewToRender);\n executeTemplate(viewToRender, tView.template !, getRenderFlags(viewToRender), context);\n\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstTemplatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n viewToRender[TVIEW].firstTemplatePass = false;\n\n refreshDescendantViews(viewToRender);\n safeToRunHooks = true;\n } finally {\n leaveView(oldView !, safeToRunHooks);\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n }\n }\n}\n\nexport function renderComponentOrTemplate<T>(\n hostView: LView, context: T, templateFn?: ComponentTemplate<T>) {\n const rendererFactory = hostView[RENDERER_FACTORY];\n const oldView = enterView(hostView, hostView[T_HOST]);\n const normalExecutionPath = !getCheckNoChangesMode();\n const creationModeIsActive = isCreationMode(hostView);\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n\n if (creationModeIsActive) {\n // creation mode pass\n templateFn && executeTemplate(hostView, templateFn, RenderFlags.Create, context);\n\n refreshDescendantViews(hostView);\n hostView[FLAGS] &= ~LViewFlags.CreationMode;\n }\n\n // update mode pass\n resetPreOrderHookFlags(hostView);\n templateFn && executeTemplate(hostView, templateFn, RenderFlags.Update, context);\n refreshDescendantViews(hostView);\n safeToRunHooks = true;\n } finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView, safeToRunHooks);\n }\n}\n\nfunction executeTemplate<T>(\n lView: LView, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n ɵɵnamespaceHTML();\n const prevSelectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(null);\n if (rf & RenderFlags.Update) {\n // When we're updating, have an inherent ɵɵselect(0) so we don't have to generate that\n // instruction for most update blocks\n selectInternal(lView, 0);\n }\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n }\n}\n\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. Update block and create block are\n * always run separately.\n */\nfunction getRenderFlags(view: LView): RenderFlags {\n return isCreationMode(view) ? RenderFlags.Create : RenderFlags.Update;\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\n/**\n * Appropriately sets `stylingTemplate` on a TNode\n *\n * Does not apply styles to DOM nodes\n *\n * @param tNode The node whose `stylingTemplate` to set\n * @param attrs The attribute array source to set the attributes from\n * @param attrsStartIndex Optional start index to start processing the `attrs` from\n */\nexport function setNodeStylingTemplate(\n tView: TView, tNode: TNode, attrs: TAttributes, attrsStartIndex: number) {\n if (tView.firstTemplatePass && !tNode.stylingTemplate) {\n const stylingAttrsStartIndex = attrsStylingIndexOf(attrs, attrsStartIndex);\n if (stylingAttrsStartIndex >= 0) {\n tNode.stylingTemplate = initializeStaticStylingContext(attrs, stylingAttrsStartIndex);\n }\n }\n}\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n def.contentQueries(RenderFlags.Create, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n\n\n/**\n * Creates directive instances and populates local refs.\n *\n * @param localRefs Local refs of the node in question\n * @param localRefExtractor mapping function that extracts local ref value from TNode\n */\nexport function createDirectivesAndLocals(\n tView: TView, lView: LView, localRefs: string[] | null | undefined,\n localRefExtractor: LocalRefExtractor = getNativeByTNode) {\n if (!getBindingsEnabled()) return;\n const previousOrParentTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n ngDevMode && ngDevMode.firstTemplatePass++;\n resolveDirectives(\n tView, lView, findDirectiveMatches(tView, lView, previousOrParentTNode),\n previousOrParentTNode, localRefs || null);\n }\n instantiateAllDirectives(tView, lView, previousOrParentTNode);\n invokeDirectivesHostBindings(tView, lView, previousOrParentTNode);\n saveResolvedLocalsInData(lView, previousOrParentTNode, localRefExtractor);\n setActiveHostElement(null);\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(\n viewData: LView, tNode: TNode, localRefExtractor: LocalRefExtractor): void {\n const localNames = tNode.localNames;\n if (localNames) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value = index === -1 ?\n localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateTView(def: ComponentDef<any>): TView {\n return def.tView || (def.tView = createTView(\n -1, def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs,\n def.viewQuery, def.schemas));\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param templateFn Template function\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n */\nexport function createTView(\n viewIndex: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null,\n viewQuery: ViewQueriesFunction<any>| null, schemas: SchemaMetadata[] | null): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + consts;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n return blueprint[TVIEW as any] = ngDevMode ?\n new TViewConstructor(\n viewIndex, // id: number,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n null !, // node: TViewNode|TElementNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // viewQueryStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // expandoInstructions: ExpandoInstructions|null,\n true, // firstTemplatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: HookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ?\n directives() :\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas, // schemas: SchemaMetadata[]|null,\n ) :\n {\n id: viewIndex,\n blueprint: blueprint,\n template: templateFn,\n viewQuery: viewQuery,\n node: null !,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n viewQueryStartIndex: initialViewLength,\n expandoStartIndex: initialViewLength,\n expandoInstructions: null,\n firstTemplatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n };\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = new (ngDevMode ? LViewBlueprint ! : Array)(initialViewLength)\n .fill(null, 0, bindingStartIndex)\n .fill(NO_CHANGE, bindingStartIndex) as LView;\n blueprint[BINDING_INDEX] = bindingStartIndex;\n return blueprint;\n}\n\nexport function createError(text: string, token: any) {\n return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\n\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nexport function locateHostElement(\n factory: RendererFactory3, elementOrSelector: RElement | string): RElement|null {\n const defaultRenderer = factory.createRenderer(null, null);\n const rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n } else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n return rNode;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nexport function storeCleanupWithContext(lView: LView, context: any, cleanupFn: Function): void {\n const lCleanup = getCleanup(lView);\n lCleanup.push(context);\n\n if (lView[TVIEW].firstTemplatePass) {\n getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);\n }\n}\n\n/**\n * Saves the cleanup function itself in LView.cleanupInstances.\n *\n * This is necessary for functions that are wrapped with their contexts, like in renderer2\n * listeners.\n *\n * On the first template pass, the index of the cleanup function is saved in TView.\n */\nexport function storeCleanupFn(view: LView, cleanupFn: Function): void {\n getCleanup(view).push(cleanupFn);\n\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(view[CLEANUP] !.length - 1, null);\n }\n}\n\n// TODO: Remove this when the issue is resolved.\n/**\n * Tsickle has a bug where it creates an infinite loop for a function returning itself.\n * This is a temporary type that will be removed when the issue is resolved.\n * https://github.com/angular/tsickle/issues/1009)\n */\nexport type TsickleIssue1009 = any;\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nexport function createTNode(\n tParent: TElementNode | TContainerNode | null, type: TNodeType, adjustedIndex: number,\n tagName: string | null, attrs: TAttributes | null): TNode {\n ngDevMode && ngDevMode.tNode++;\n return {\n type: type,\n index: adjustedIndex,\n injectorIndex: tParent ? tParent.injectorIndex : -1,\n directiveStart: -1,\n directiveEnd: -1,\n propertyMetadataStartIndex: -1,\n propertyMetadataEndIndex: -1,\n flags: 0,\n providerIndexes: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n stylingTemplate: null,\n projection: null,\n onElementCreationFns: null,\n // TODO (matsko): rename this to `styles` once the old styling impl is gone\n newStyles: null,\n // TODO (matsko): rename this to `classes` once the old styling impl is gone\n newClasses: null,\n };\n}\n\n\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param tNode\n * @param direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nexport function generatePropertyAliases(tNode: TNode, direction: BindingDirection): PropertyAliases|\n null {\n const tView = getLView()[TVIEW];\n let propStore: PropertyAliases|null = null;\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n\n if (end > start) {\n const isInput = direction === BindingDirection.Input;\n const defs = tView.data;\n\n for (let i = start; i < end; i++) {\n const directiveDef = defs[i] as DirectiveDef<any>;\n const propertyAliasMap: {[publicName: string]: string} =\n isInput ? directiveDef.inputs : directiveDef.outputs;\n for (let publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n const internalName = propertyAliasMap[publicName];\n const hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, publicName, internalName) :\n (propStore[publicName] = [i, publicName, internalName]);\n }\n }\n }\n }\n return propStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nconst ATTR_TO_PROP: {[name: string]: string} = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\n\nexport function elementPropertyInternal<T>(\n index: number, propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean,\n loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const lView = getLView();\n const element = getNativeByIndex(index, lView) as RElement | RComment;\n const tNode = getTNode(index, lView);\n let inputData: PropertyAliases|null|undefined;\n let dataValue: PropertyAliasValue|undefined;\n if (!nativeOnly && (inputData = initializeTNodeInputs(tNode)) &&\n (dataValue = inputData[propName])) {\n setInputsForProperty(lView, dataValue, value);\n if (isComponent(tNode)) markDirtyIfOnPush(lView, index + HEADER_OFFSET);\n if (ngDevMode) {\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.Container) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: publicName\n * i+2: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+2]\n */\n for (let i = 0; i < dataValue.length; i += 3) {\n setNgReflectProperty(lView, element, tNode.type, dataValue[i + 2] as string, value);\n }\n }\n }\n } else if (tNode.type === TNodeType.Element) {\n propName = ATTR_TO_PROP[propName] || propName;\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n validateAgainstUnknownProperties(lView, element, propName, tNode);\n ngDevMode.rendererSetProperty++;\n }\n\n savePropertyDebugData(tNode, lView, propName, lView[TVIEW].data, nativeOnly);\n\n const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.tagName || '', propName) as any) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element as RElement, propName, value);\n } else if (!isAnimationProp(propName)) {\n (element as RElement).setProperty ? (element as any).setProperty(propName, value) :\n (element as any)[propName] = value;\n }\n } else if (tNode.type === TNodeType.Container) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(lView, tNode.tagName)) {\n throw createUnknownPropertyError(propName, tNode);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nexport function setNgReflectProperty(\n lView: LView, element: RElement | RComment, type: TNodeType, attrName: string, value: any) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type === TNodeType.Element) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute((element as RElement), attrName) :\n (element as RElement).removeAttribute(attrName);\n } else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute((element as RElement), attrName, debugValue) :\n (element as RElement).setAttribute(attrName, debugValue);\n }\n } else {\n const textContent = `bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`;\n if (isProceduralRenderer(renderer)) {\n renderer.setValue((element as RComment), textContent);\n } else {\n (element as RComment).textContent = textContent;\n }\n }\n}\n\nfunction validateAgainstUnknownProperties(\n hostView: LView, element: RElement | RComment, propName: string, tNode: TNode) {\n // If the tag matches any of the schemas we shouldn't throw.\n if (matchingSchemas(hostView, tNode.tagName)) {\n return;\n }\n\n // If prop is not a known property of the HTML element...\n if (!(propName in element) &&\n // and we are in a browser context... (web worker nodes should be skipped)\n typeof Node === 'function' && element instanceof Node &&\n // and isn't a synthetic animation property...\n propName[0] !== ANIMATION_PROP_PREFIX) {\n // ... it is probably a user error and we should throw.\n throw createUnknownPropertyError(propName, tNode);\n }\n}\n\nfunction matchingSchemas(hostView: LView, tagName: string | null): boolean {\n const schemas = hostView[TVIEW].schemas;\n\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n* Stores debugging data for this property binding on first template pass.\n* This enables features like DebugElement.properties.\n*/\nfunction savePropertyDebugData(\n tNode: TNode, lView: LView, propName: string, tData: TData,\n nativeOnly: boolean | undefined): void {\n const lastBindingIndex = lView[BINDING_INDEX] - 1;\n\n // Bind/interpolation functions save binding metadata in the last binding index,\n // but leave the property name blank. If the interpolation delimiter is at the 0\n // index, we know that this is our first pass and the property name still needs to\n // be set.\n const bindingMetadata = tData[lastBindingIndex] as string;\n if (bindingMetadata[0] == INTERPOLATION_DELIMITER) {\n tData[lastBindingIndex] = propName + bindingMetadata;\n\n // We don't want to store indices for host bindings because they are stored in a\n // different part of LView (the expando section).\n if (!nativeOnly) {\n if (tNode.propertyMetadataStartIndex == -1) {\n tNode.propertyMetadataStartIndex = lastBindingIndex;\n }\n tNode.propertyMetadataEndIndex = lastBindingIndex + 1;\n }\n }\n}\n\n/**\n* Creates an error that should be thrown when encountering an unknown property on an element.\n* @param propName Name of the invalid property.\n* @param tNode Node on which we encountered the error.\n*/\nfunction createUnknownPropertyError(propName: string, tNode: TNode): Error {\n return new Error(\n `Template error: Can't bind to '${propName}' since it isn't a known property of '${tNode.tagName}'.`);\n}\n\n/**\n * Instantiate a root component.\n */\nexport function instantiateRootComponent<T>(\n tView: TView, viewData: LView, def: ComponentDef<T>): T {\n const rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n if (def.providersResolver) def.providersResolver(def);\n generateExpandoInstructionBlock(tView, rootTNode, 1);\n baseResolveDirective(tView, viewData, def, def.factory);\n }\n const directive =\n getNodeInjectable(tView.data, viewData, viewData.length - 1, rootTNode as TElementNode);\n postProcessBaseDirective(viewData, rootTNode, directive);\n return directive;\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(\n tView: TView, viewData: LView, directives: DirectiveDef<any>[] | null, tNode: TNode,\n localRefs: string[] | null): void {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n const exportsMap: ({[key: string]: number} | null) = localRefs ? {'': -1} : null;\n if (directives) {\n initNodeFlags(tNode, tView.data.length, directives.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i] as DirectiveDef<any>;\n if (def.providersResolver) def.providersResolver(def);\n }\n generateExpandoInstructionBlock(tView, tNode, directives.length);\n const initialPreOrderHooksLength = (tView.preOrderHooks && tView.preOrderHooks.length) || 0;\n const initialPreOrderCheckHooksLength =\n (tView.preOrderCheckHooks && tView.preOrderCheckHooks.length) || 0;\n const nodeIndex = tNode.index - HEADER_OFFSET;\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i] as DirectiveDef<any>;\n\n const directiveDefIdx = tView.data.length;\n baseResolveDirective(tView, viewData, def, def.factory);\n\n saveNameToExportMap(tView.data !.length - 1, def, exportsMap);\n\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n registerPreOrderHooks(\n directiveDefIdx, def, tView, nodeIndex, initialPreOrderHooksLength,\n initialPreOrderCheckHooksLength);\n }\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n if (!tView.firstTemplatePass && start < end) {\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n }\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n if (isComponentDef(def)) {\n addComponentLogic(lView, tNode, def as ComponentDef<any>);\n }\n const directive = getNodeInjectable(tView.data, lView !, i, tNode as TElementNode);\n postProcessDirective(lView, directive, def, i);\n }\n}\n\nfunction invokeDirectivesHostBindings(tView: TView, viewData: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const expando = tView.expandoInstructions !;\n const firstTemplatePass = tView.firstTemplatePass;\n const elementIndex = tNode.index - HEADER_OFFSET;\n const selectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(elementIndex);\n\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const directive = viewData[i];\n if (def.hostBindings) {\n invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass);\n\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n } else if (firstTemplatePass) {\n expando.push(null);\n }\n }\n } finally {\n setActiveHostElement(selectedIndex);\n }\n}\n\nexport function invokeHostBindingsInCreationMode(\n def: DirectiveDef<any>, expando: ExpandoInstructions, directive: any, tNode: TNode,\n firstTemplatePass: boolean) {\n const previousExpandoLength = expando.length;\n setCurrentDirectiveDef(def);\n const elementIndex = tNode.index - HEADER_OFFSET;\n def.hostBindings !(RenderFlags.Create, directive, elementIndex);\n setCurrentDirectiveDef(null);\n // `hostBindings` function may or may not contain `allocHostVars` call\n // (e.g. it may not if it only contains host listeners), so we need to check whether\n // `expandoInstructions` has changed and if not - we still push `hostBindings` to\n // expando block, to make sure we execute it for DI cycle\n if (previousExpandoLength === expando.length && firstTemplatePass) {\n expando.push(def.hostBindings);\n }\n}\n\n/**\n* Generates a new block in TView.expandoInstructions for this node.\n*\n* Each expando block starts with the element index (turned negative so we can distinguish\n* it from the hostVar count) and the directive count. See more in VIEW_DATA.md.\n*/\nexport function generateExpandoInstructionBlock(\n tView: TView, tNode: TNode, directiveCount: number): void {\n ngDevMode && assertEqual(\n tView.firstTemplatePass, true,\n 'Expando block should only be generated on first template pass.');\n\n const elementIndex = -(tNode.index - HEADER_OFFSET);\n const providerStartIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const providerCount = tView.data.length - providerStartIndex;\n (tView.expandoInstructions || (tView.expandoInstructions = [\n ])).push(elementIndex, providerCount, directiveCount);\n}\n\n/**\n * Process a directive on the current node after its creation.\n */\nfunction postProcessDirective<T>(\n viewData: LView, directive: T, def: DirectiveDef<T>, directiveDefIdx: number): void {\n const previousOrParentTNode = getPreviousOrParentTNode();\n postProcessBaseDirective(viewData, previousOrParentTNode, directive);\n ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');\n if (previousOrParentTNode && previousOrParentTNode.attrs) {\n setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);\n }\n\n if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {\n previousOrParentTNode.flags |= TNodeFlags.hasContentQuery;\n }\n\n if (isComponentDef(def)) {\n const componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);\n componentView[CONTEXT] = directive;\n }\n}\n\n/**\n * A lighter version of postProcessDirective() that is used for the root component.\n */\nfunction postProcessBaseDirective<T>(\n lView: LView, previousOrParentTNode: TNode, directive: T): void {\n const native = getNativeByTNode(previousOrParentTNode, lView);\n\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent(getIsParent());\n\n attachPatchData(directive, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n}\n\n\n/**\n* Matches the current node against all available selectors.\n* If a component is matched (at most one), it is returned in first position in the array.\n*/\nfunction findDirectiveMatches(tView: TView, viewData: LView, tNode: TNode): DirectiveDef<any>[]|\n null {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n const registry = tView.directiveRegistry;\n let matches: any[]|null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any>| DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors !, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray !() : []);\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode,\n viewData),\n viewData, def.type);\n\n if (isComponentDef(def)) {\n if (tNode.flags & TNodeFlags.isComponent) throwMultipleComponentError(tNode);\n tNode.flags = TNodeFlags.isComponent;\n\n // The component is always stored first with directives after.\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n}\n\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nexport function queueComponentIndexForCheck(previousOrParentTNode: TNode): void {\n const tView = getLView()[TVIEW];\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n (tView.components || (tView.components = ngDevMode ? new TViewComponents !() : [\n ])).push(previousOrParentTNode.index);\n}\n\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode, localRefs: string[] | null, exportsMap: {[key: string]: number}): void {\n if (localRefs) {\n const localNames: (string | number)[] = tNode.localNames =\n ngDevMode ? new TNodeLocalNames !() : [];\n\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null) throw new Error(`Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n\n/**\n* Builds up an export map as directives are created, so local refs can be quickly mapped\n* to their directive instances.\n*/\nfunction saveNameToExportMap(\n index: number, def: DirectiveDef<any>| ComponentDef<any>,\n exportsMap: {[key: string]: number} | null) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = index;\n }\n }\n if ((def as ComponentDef<any>).template) exportsMap[''] = index;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n const flags = tNode.flags;\n ngDevMode && assertEqual(\n flags === 0 || flags === TNodeFlags.isComponent, true,\n 'expected node flags to not be initialized');\n\n ngDevMode && assertNotEqual(\n numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives');\n // When the first directive is created on a node, save the index\n tNode.flags = flags & TNodeFlags.isComponent;\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\nfunction baseResolveDirective<T>(\n tView: TView, viewData: LView, def: DirectiveDef<T>,\n directiveFactory: (t: Type<T>| null) => any) {\n tView.data.push(def);\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint.push(nodeInjectorFactory);\n viewData.push(nodeInjectorFactory);\n}\n\nfunction addComponentLogic<T>(\n lView: LView, previousOrParentTNode: TNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(previousOrParentTNode, lView);\n\n const tView = getOrCreateTView(def);\n\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(\n lView, createLView(\n lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n lView[previousOrParentTNode.index], previousOrParentTNode as TElementNode,\n rendererFactory, rendererFactory.createRenderer(native as RElement, def)));\n\n componentView[T_HOST] = previousOrParentTNode as TElementNode;\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[previousOrParentTNode.index] = componentView;\n\n if (lView[TVIEW].firstTemplatePass) {\n queueComponentIndexForCheck(previousOrParentTNode);\n }\n}\n\nexport function elementAttributeInternal(\n index: number, name: string, value: any, lView: LView, sanitizer?: SanitizerFn | null,\n namespace?: string) {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n ngDevMode && validateAgainstEventAttributes(name);\n const element = getNativeByIndex(index, lView) as RElement;\n const renderer = lView[RENDERER];\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const tNode = getTNode(index, lView);\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.tagName || '', name);\n\n\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n } else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode): void {\n let initialInputData = tNode.initialInputs as InitialInputData | undefined;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, def.inputs, tNode);\n }\n\n const initialInputs: InitialInputs|null = initialInputData[directiveIndex];\n if (initialInputs) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput) {\n def.setInput !(instance, value, publicName, privateName);\n } else {\n (instance as any)[privateName] = value;\n }\n if (ngDevMode) {\n const lView = getLView();\n const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(\n directiveIndex: number, inputs: {[key: string]: string}, tNode: TNode): InitialInputData {\n const initialInputData: InitialInputData =\n tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new TNodeInitialInputs !() : []);\n // Ensure that we don't create sparse arrays\n for (let i = initialInputData.length; i <= directiveIndex; i++) {\n initialInputData.push(null);\n }\n\n const attrs = tNode.attrs !;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number') break;\n\n const minifiedInputName = inputs[attrName as string];\n const attrValue = attrs[i + 1];\n\n if (minifiedInputName !== undefined) {\n const inputsToStore: InitialInputs = initialInputData[directiveIndex] ||\n (initialInputData[directiveIndex] = ngDevMode ? new TNodeInitialData !() : []);\n inputsToStore.push(attrName as string, minifiedInputName, attrValue as string);\n }\n\n i += 2;\n }\n return initialInputData;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray: any = ngDevMode && createNamedArrayType('LContainer');\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement | RComment | StylingContext | LView, currentView: LView, native: RComment,\n tNode: TNode, isForViewContainerRef?: boolean): LContainer {\n ngDevMode && assertDomNode(native);\n ngDevMode && assertLView(currentView);\n // https://jsperf.com/array-literal-vs-new-array-really\n const lContainer: LContainer = new (ngDevMode ? LContainerArray : Array)(\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n isForViewContainerRef ? -1 : 0, // active index\n currentView, // parent\n null, // next\n null, // queries\n tNode, // t_host\n native, // native,\n null, // view refs\n );\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n}\n\n\n/**\n * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them\n * by executing an associated template function.\n */\nfunction refreshDynamicEmbeddedViews(lView: LView) {\n for (let current = lView[CHILD_HEAD]; current !== null; current = current[NEXT]) {\n // Note: current can be an LView or an LContainer instance, but here we are only interested\n // in LContainer. We can tell it's an LContainer because its length is less than the LView\n // header.\n if (current[ACTIVE_INDEX] === -1 && isLContainer(current)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {\n const dynamicViewData = current[i];\n // The directives and pipes are not needed here as an existing view is only being\n // refreshed.\n ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');\n renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT] !);\n }\n }\n }\n}\n\n\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param adjustedElementIndex Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nexport function componentRefresh(adjustedElementIndex: number): void {\n const lView = getLView();\n ngDevMode && assertDataInRange(lView, adjustedElementIndex);\n const hostView = getComponentViewByIndex(adjustedElementIndex, lView);\n ngDevMode && assertNodeType(lView[TVIEW].data[adjustedElementIndex] as TNode, TNodeType.Element);\n\n // Only components in creation mode, attached CheckAlways\n // components or attached, dirty OnPush components should be checked\n if ((viewAttachedToChangeDetector(hostView) || isCreationMode(lView)) &&\n hostView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n syncViewWithBlueprint(hostView);\n checkView(hostView, hostView[CONTEXT]);\n }\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param componentView The view to sync\n */\nfunction syncViewWithBlueprint(componentView: LView) {\n const componentTView = componentView[TVIEW];\n for (let i = componentView.length; i < componentTView.blueprint.length; i++) {\n componentView[i] = componentTView.blueprint[i];\n }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to\n // the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of\n // order, the change detection will run out of order, as the act of retrieving the the\n // LContainer\n // from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL] ![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView): LView|null {\n while (lView) {\n lView[FLAGS] |= LViewFlags.Dirty;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent !;\n }\n return null;\n}\n\n\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nexport function scheduleTick(rootContext: RootContext, flags: RootContextFlags) {\n const nothingScheduled = rootContext.flags === RootContextFlags.Empty;\n rootContext.flags |= flags;\n\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n let res: null|((val: null) => void);\n rootContext.clean = new Promise<null>((r) => res = r);\n rootContext.scheduler(() => {\n if (rootContext.flags & RootContextFlags.DetectChanges) {\n rootContext.flags &= ~RootContextFlags.DetectChanges;\n tickRootContext(rootContext);\n }\n\n if (rootContext.flags & RootContextFlags.FlushPlayers) {\n rootContext.flags &= ~RootContextFlags.FlushPlayers;\n const playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n\n rootContext.clean = _CLEAN_PROMISE;\n res !(null);\n });\n }\n}\n\nexport function tickRootContext(rootContext: RootContext) {\n for (let i = 0; i < rootContext.components.length; i++) {\n const rootComponent = rootContext.components[i];\n renderComponentOrTemplate(readPatchedLView(rootComponent) !, rootComponent);\n }\n}\n\nexport function detectChangesInternal<T>(view: LView, context: T) {\n const rendererFactory = view[RENDERER_FACTORY];\n\n if (rendererFactory.begin) rendererFactory.begin();\n\n try {\n if (isCreationMode(view)) {\n checkView(view, context); // creation mode pass\n }\n checkView(view, context); // update mode pass\n } catch (error) {\n handleError(view, error);\n throw error;\n } finally {\n if (rendererFactory.end) rendererFactory.end();\n }\n}\n\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nexport function detectChangesInRootView(lView: LView): void {\n tickRootContext(lView[CONTEXT] as RootContext);\n}\n\n\n/**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\nexport function checkNoChanges<T>(component: T): void {\n const view = getComponentViewByInstance(component);\n checkNoChangesInternal<T>(view, component);\n}\n\nexport function checkNoChangesInternal<T>(view: LView, context: T) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInternal(view, context);\n } finally {\n setCheckNoChangesMode(false);\n }\n}\n\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nexport function checkNoChangesInRootView(lView: LView): void {\n setCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n } finally {\n setCheckNoChangesMode(false);\n }\n}\n\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.\n */\nexport function checkView<T>(hostView: LView, component: T) {\n const hostTView = hostView[TVIEW];\n const oldView = enterView(hostView, hostView[T_HOST]);\n const templateFn = hostTView.template !;\n const creationMode = isCreationMode(hostView);\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n resetPreOrderHookFlags(hostView);\n creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);\n executeTemplate(hostView, templateFn, getRenderFlags(hostView), component);\n refreshDescendantViews(hostView);\n // Only check view queries again in creation mode if there are static view queries\n if (!creationMode || hostTView.staticViewQueries) {\n executeViewQueryFn(RenderFlags.Update, hostTView, component);\n }\n safeToRunHooks = true;\n } finally {\n leaveView(oldView, safeToRunHooks);\n }\n}\n\nfunction executeViewQueryFn<T>(flags: RenderFlags, tView: TView, component: T): void {\n const viewQuery = tView.viewQuery;\n if (viewQuery) {\n setCurrentQueryIndex(tView.viewQueryStartIndex);\n viewQuery(flags, component);\n }\n}\n\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Creates binding metadata for a particular binding and stores it in\n * TView.data. These are generated in order to support DebugElement.properties.\n *\n * Each binding / interpolation will have one (including attribute bindings)\n * because at the time of binding, we don't know to which instruction the binding\n * belongs. It is always stored in TView.data at the index of the last binding\n * value in LView (e.g. for interpolation8, it would be stored at the index of\n * the 8th value).\n *\n * @param lView The LView that contains the current binding index.\n * @param prefix The static prefix string\n * @param suffix The static suffix string\n *\n * @returns Newly created binding metadata string for this binding or null\n */\nexport function storeBindingMetadata(lView: LView, prefix = '', suffix = ''): string|null {\n const tData = lView[TVIEW].data;\n const lastBindingIndex = lView[BINDING_INDEX] - 1;\n const value = INTERPOLATION_DELIMITER + prefix + INTERPOLATION_DELIMITER + suffix;\n\n return tData[lastBindingIndex] == null ? (tData[lastBindingIndex] = value) : null;\n}\n\nexport const CLEAN_PROMISE = _CLEAN_PROMISE;\n\nexport function initializeTNodeInputs(tNode: TNode): PropertyAliases|null {\n // If tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked.\n if (tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(tNode, BindingDirection.Input);\n }\n return tNode.inputs;\n}\n\nexport function getCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup !() : []);\n}\n\nfunction getTViewCleanup(view: LView): any[] {\n return view[TVIEW].cleanup || (view[TVIEW].cleanup = ngDevMode ? new TCleanup !() : []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(tNode: TNode, lView: LView): Renderer3 {\n const componentLView = lView[tNode.index] as LView;\n return componentLView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(lView: LView, inputs: PropertyAliasValue, value: any): void {\n const tView = lView[TVIEW];\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++] as number;\n const publicName = inputs[i++] as string;\n const privateName = inputs[i++] as string;\n const instance = lView[index];\n ngDevMode && assertDataInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n const setInput = def.setInput;\n if (setInput) {\n def.setInput !(instance, value, publicName, privateName);\n } else {\n instance[privateName] = value;\n }\n }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n ngDevMode && ngDevMode.rendererSetText++;\n const renderer = lView[RENDERER];\n isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;\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\nimport {RelativeInjectorLocation} from './interfaces/injector';\nimport {TContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {DECLARATION_VIEW, LView, T_HOST} from './interfaces/view';\nimport {getParentInjectorViewOffset} from './util/injector_utils';\n\nexport function applyOnCreateInstructions(tNode: TNode) {\n // there may be some instructions that need to run in a specific\n // order because the CREATE block in a directive runs before the\n // CREATE block in a template. To work around this instructions\n // can get access to the function array below and defer any code\n // to run after the element is created.\n let fns: Function[]|null;\n if (fns = tNode.onElementCreationFns) {\n for (let i = 0; i < fns.length; i++) {\n fns[i]();\n }\n tNode.onElementCreationFns = null;\n }\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the TNode of the parent injector is found.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @param startTNode The TNode instance of the starting element\n * @returns The TNode of the parent injector\n */\nexport function getParentInjectorTNode(\n location: RelativeInjectorLocation, startView: LView, startTNode: TNode): TElementNode|\n TContainerNode|null {\n if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n // view offset is 0\n const injectorIndex = startTNode.parent.injectorIndex;\n let parentTNode = startTNode.parent;\n while (parentTNode.parent != null && injectorIndex == parentTNode.injectorIndex) {\n parentTNode = parentTNode.parent;\n }\n return parentTNode;\n }\n let viewOffset = getParentInjectorViewOffset(location);\n // view offset is 1\n let parentView = startView;\n let parentTNode = startView[T_HOST] as TElementNode;\n // view offset is superior to 1\n while (viewOffset > 1) {\n parentView = parentView[DECLARATION_VIEW] !;\n parentTNode = parentView[T_HOST] as TElementNode;\n viewOffset--;\n }\n return parentTNode;\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\nimport {assertEqual} from '../../util/assert';\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {LView, TVIEW, TView} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Allocates the necessary amount of slots for host vars.\n *\n * @param count Amount of vars to be allocated\n *\n * @codeGenApi\n */\nexport function ɵɵallocHostVars(count: number): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n if (!tView.firstTemplatePass) return;\n queueHostBindingForCheck(tView, getCurrentDirectiveDef() !, count);\n prefillHostVars(tView, lView, count);\n}\n\n/**\n * Stores host binding fn and number of host vars so it will be queued for binding refresh during\n * CD.\n */\nfunction queueHostBindingForCheck(\n tView: TView, def: DirectiveDef<any>| ComponentDef<any>, hostVars: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n const expando = tView.expandoInstructions !;\n const length = expando.length;\n // Check whether a given `hostBindings` function already exists in expandoInstructions,\n // which can happen in case directive definition was extended from base definition (as a part of\n // the `InheritDefinitionFeature` logic). If we found the same `hostBindings` function in the\n // list, we just increase the number of host vars associated with that function, but do not add it\n // into the list again.\n if (length >= 2 && expando[length - 2] === def.hostBindings) {\n expando[length - 1] = (expando[length - 1] as number) + hostVars;\n } else {\n expando.push(def.hostBindings !, hostVars);\n }\n}\n\n/**\n * On the first template pass, we need to reserve space for host binding values\n * after directives are matched (so all directives are saved, then bindings).\n * Because we are updating the blueprint, we only need to do this once.\n */\nfunction prefillHostVars(tView: TView, lView: LView, totalHostVars: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n for (let i = 0; i < totalHostVars; i++) {\n lView.push(NO_CHANGE);\n tView.blueprint.push(NO_CHANGE);\n tView.data.push(null);\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\nimport {global as _global} from './global';\n\n// When Symbol.iterator doesn't exist, retrieves the key used in es6-shim\ndeclare const Symbol: any;\nlet _symbolIterator: any = null;\nexport function getSymbolIterator(): string|symbol {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n } else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n (Map as any).prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\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\nimport {getSymbolIterator} from './symbol';\n\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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\nimport {areIterablesEqual, isListLikeIterable} from './iterable';\n\n\n// JS has NaN !== NaN\nexport function looseIdentical(a: any, b: any): boolean {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return looseIdentical(a, b);\n }\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\nimport {looseIdentical} from '../util/comparison';\nimport {getSymbolIterator} from '../util/symbol';\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return looseIdentical(a, b);\n }\n }\n}\n\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n */\nexport class WrappedValue {\n /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */\n wrapped: any;\n\n constructor(value: any) { this.wrapped = value; }\n\n /** Creates a wrapped value. */\n static wrap(value: any): WrappedValue { return new WrappedValue(value); }\n\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n static unwrap(value: any): any { return WrappedValue.isWrapped(value) ? value.wrapped : value; }\n\n /** Returns true if `value` is a wrapped value. */\n static isWrapped(value: any): value is WrappedValue { return value instanceof WrappedValue; }\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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\nimport {devModeEqual} from '../change_detection/change_detection_util';\nimport {assertDataInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {getCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {isDifferent} from './util/misc_utils';\n\n\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return lView[bindingIndex] = value;\n}\n\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertDataInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/** Updates binding if changed, then returns whether it was updated. */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n\n const oldValue = lView[bindingIndex];\n if (isDifferent(oldValue, value)) {\n if (ngDevMode && getCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, oldValueToCompare, value);\n }\n }\n lView[bindingIndex] = value;\n return true;\n }\n\n return false;\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\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 */\nimport {assertNotEqual} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {BINDING_INDEX, LView} from '../interfaces/view';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer, storeBindingMetadata} from './shared';\n\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn | null,\n nativeOnly?: boolean): TsickleIssue1009 {\n const index = getSelectedIndex();\n ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');\n const lView = getLView();\n const bindReconciledValue = bind(lView, value);\n if (bindReconciledValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);\n }\n return ɵɵproperty;\n}\n\n/**\n * Creates a single value binding.\n *\n * @param lView Current view\n * @param value Value to diff\n */\nexport function bind<T>(lView: LView, value: T): T|NO_CHANGE {\n const bindingIndex = lView[BINDING_INDEX]++;\n storeBindingMetadata(lView);\n return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;\n}\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n *\n * @codeGenApi\n */\nexport function ɵɵupdateSyntheticHostBinding<T>(\n propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean) {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(benlesh): remove bind call here.\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bound, sanitizer, nativeOnly, loadComponentRenderer);\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {bind} from './property';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string, value: any, sanitizer?: SanitizerFn | null,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);\n }\n return ɵɵattribute;\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\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {BINDING_INDEX, TVIEW} from '../interfaces/view';\nimport {getLView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\n\nimport {storeBindingMetadata} from './shared';\n\n\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolationV(values: any[]): string|NO_CHANGE {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n const lView = getLView();\n const tData = lView[TVIEW].data;\n let bindingIndex = lView[BINDING_INDEX];\n\n if (tData[bindingIndex] == null) {\n // 2 is the index of the first static interstitial value (ie. not prefix)\n for (let i = 2; i < values.length; i += 2) {\n tData[bindingIndex++] = values[i];\n }\n bindingIndex = lView[BINDING_INDEX];\n }\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n lView[BINDING_INDEX] = bindingIndex;\n storeBindingMetadata(lView, values[0], values[values.length - 1]);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);\n storeBindingMetadata(lView, prefix, suffix);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n lView[BINDING_INDEX] += 2;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n lView[TVIEW].data[bindingIndex] = i0;\n }\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string|\n NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n lView[BINDING_INDEX] += 3;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n lView[BINDING_INDEX] += 4;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n lView[BINDING_INDEX] += 5;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n lView[BINDING_INDEX] += 6;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|\n NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n lView[BINDING_INDEX] += 7;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n lView[BINDING_INDEX] += 8;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n tData[bindingIndex + 6] = i6;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate1(\n attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate2(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate3(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate4(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate5(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate6(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate7(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate8(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolateV(\n attrName: string, values: any[], sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolated, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolateV;\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\nimport {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {CONTEXT, RootContext, RootContextFlags} from '../interfaces/view';\nimport {getRootView} from '../util/view_traversal_utils';\nimport {detectChangesInternal, markViewDirty, scheduleTick, tickRootContext} from './shared';\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges<T>(component: T): void {\n const view = getComponentViewByInstance(component);\n detectChangesInternal<T>(view, component);\n}\n\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n *\n * @publicApi\n */\nexport function markDirty<T>(component: T) {\n ngDevMode && assertDefined(component, 'component');\n const rootView = markViewDirty(getComponentViewByInstance(component)) !;\n\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT] as RootContext, RootContextFlags.DetectChanges);\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nexport function tick<T>(component: T): void {\n const rootView = getRootView(component);\n const rootContext = rootView[CONTEXT] as RootContext;\n tickRootContext(rootContext);\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\nimport {ViewEncapsulation} from '../metadata/view';\nimport {assertDefined, assertDomNode} from '../util/assert';\n\nimport {assertLContainer, assertLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE, unusedValueExportToPlacateAjd as unused1} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeType, TProjectionNode, TViewNode, unusedValueExportToPlacateAjd as unused2} from './interfaces/node';\nimport {unusedValueExportToPlacateAjd as unused3} from './interfaces/projection';\nimport {ProceduralRenderer3, RElement, RNode, RText, Renderer3, isProceduralRenderer, unusedValueExportToPlacateAjd as unused4} from './interfaces/renderer';\nimport {StylingContext} from './interfaces/styling';\nimport {CHILD_HEAD, CLEANUP, FLAGS, HOST, HookData, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, TVIEW, T_HOST, unusedValueExportToPlacateAjd as unused5} from './interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from './node_assert';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, isLContainer, isLView, isRootView, unwrapRNode, viewAttachedToContainer} from './util/view_utils';\n\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4 + unused5;\n\nexport function getLContainer(tNode: TViewNode, embeddedView: LView): LContainer|null {\n ngDevMode && assertLView(embeddedView);\n const container = embeddedView[PARENT] as LContainer;\n if (tNode.index === -1) {\n // This is a dynamically created view inside a dynamic container.\n // The parent isn't an LContainer if the embedded view hasn't been attached yet.\n return isLContainer(container) ? container : null;\n } else {\n ngDevMode && assertLContainer(container);\n // This is a inline view node (e.g. embeddedViewStart)\n return container;\n }\n}\n\n\n/**\n * Retrieves render parent for a given view.\n * Might be null if a view is not yet attached to any container.\n */\nfunction getContainerRenderParent(tViewNode: TViewNode, view: LView): RElement|null {\n const container = getLContainer(tViewNode, view);\n return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;\n}\n\nconst enum WalkTNodeTreeAction {\n /** node insert in the native environment */\n Insert = 0,\n\n /** node detach from the native environment */\n Detach = 1,\n\n /** node destruction using the renderer's API */\n Destroy = 2,\n}\n\n\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction executeActionOnElementOrContainer(\n action: WalkTNodeTreeAction, renderer: Renderer3, parent: RElement | null,\n lNodeToHandle: RNode | LContainer | LView | StylingContext, beforeNode?: RNode | null) {\n ngDevMode && assertDefined(lNodeToHandle, '\\'lNodeToHandle\\' is undefined');\n let lContainer: LContainer|undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is wrapped\n // in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST] !;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n ngDevMode && assertDomNode(rNode);\n\n if (action === WalkTNodeTreeAction.Insert) {\n nativeInsertBefore(renderer, parent !, rNode, beforeNode || null);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n (renderer as ProceduralRenderer3).destroyNode !(rNode);\n }\n if (lContainer != null) {\n executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);\n }\n}\n\nexport function createTextNode(value: any, renderer: Renderer3): RText {\n return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) :\n renderer.createTextNode(renderStringify(value));\n}\n\n/**\n * Adds or removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param lView The view from which elements should be added or removed\n * @param insertMode Whether or not elements should be added (if false, removing)\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addRemoveViewFromContainer(\n lView: LView, insertMode: true, beforeNode: RNode | null): void;\nexport function addRemoveViewFromContainer(lView: LView, insertMode: false): void;\nexport function addRemoveViewFromContainer(\n lView: LView, insertMode: boolean, beforeNode?: RNode | null): void {\n const renderParent = getContainerRenderParent(lView[TVIEW].node as TViewNode, lView);\n ngDevMode && assertNodeType(lView[TVIEW].node as TNode, TNodeType.View);\n if (renderParent) {\n const renderer = lView[RENDERER];\n const action = insertMode ? WalkTNodeTreeAction.Insert : WalkTNodeTreeAction.Detach;\n executeActionOnView(renderer, action, lView, renderParent, beforeNode);\n }\n}\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(lView: LView) {\n executeActionOnView(lView[RENDERER], WalkTNodeTreeAction.Detach, lView, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView|LContainer|null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView|undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer ![NEXT] && lViewOrLContainer !== rootView) {\n cleanUpView(lViewOrLContainer);\n lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n }\n cleanUpView(lViewOrLContainer || rootView);\n next = lViewOrLContainer && lViewOrLContainer ![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n lContainer.splice(CONTAINER_HEADER_OFFSET + index, 0, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // Notify query that a new view has been added\n if (lView[QUERIES]) {\n lView[QUERIES] !.insertView(index);\n }\n\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView|undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n lContainer.splice(CONTAINER_HEADER_OFFSET + removeIndex, 1);\n addRemoveViewFromContainer(viewToDetach, false);\n\n if ((viewToDetach[FLAGS] & LViewFlags.Attached) &&\n !(viewToDetach[FLAGS] & LViewFlags.Destroyed) && viewToDetach[QUERIES]) {\n viewToDetach[QUERIES] !.removeView();\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.\n *\n * @param lContainer The container from which to remove a view\n * @param removeIndex The index of the view to remove\n */\nexport function removeView(lContainer: LContainer, removeIndex: number) {\n const detachedView = detachView(lContainer, removeIndex);\n detachedView && destroyLView(detachedView);\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting cleanup (e.g. removing listeners, calling onDestroys).\n *\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n executeActionOnView(renderer, WalkTNodeTreeAction.Destroy, lView, null, null);\n }\n\n destroyViewTree(lView);\n }\n}\n\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param lViewOrLContainer The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nexport function getParentState(lViewOrLContainer: LView | LContainer, rootView: LView): LView|\n LContainer|null {\n let tNode;\n if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n tNode.type === TNodeType.View) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return getLContainer(tNode as TViewNode, lViewOrLContainer);\n } else {\n // otherwise, use parent view for containers or component views\n return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];\n }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view: LView | LContainer): void {\n if (isLView(view) && !(view[FLAGS] & LViewFlags.Destroyed)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n view[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n view[FLAGS] |= LViewFlags.Destroyed;\n\n executeOnDestroys(view);\n removeListeners(view);\n const hostTNode = view[T_HOST];\n // For component views only, the local renderer is destroyed as clean up time.\n if (hostTNode && hostTNode.type === TNodeType.Element && isProceduralRenderer(view[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n (view[RENDERER] as ProceduralRenderer3).destroy();\n }\n // For embedded views still attached to a container: remove query result from this view.\n if (viewAttachedToContainer(view) && view[QUERIES]) {\n view[QUERIES] !.removeView();\n }\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(lView: LView): void {\n const tCleanup = lView[TVIEW].cleanup;\n if (tCleanup !== null) {\n const lCleanup = lView[CLEANUP] !;\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n const idxOrTargetGetter = tCleanup[i + 1];\n const target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n const listener = lCleanup[tCleanup[i + 2]];\n const useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n } else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[useCaptureOrSubIdx]();\n } else {\n // Subscription\n lCleanup[-useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n lView[CLEANUP] = null;\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view: LView): void {\n const tView = view[TVIEW];\n let destroyHooks: HookData|null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = view[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n (destroyHooks[i + 1] as() => void).call(context);\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n */\nfunction getRenderParent(tNode: TNode, currentView: LView): RElement|null {\n // Nodes of the top-most view can be inserted eagerly.\n if (isRootView(currentView)) {\n return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView));\n }\n\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n const parent = getHighestElementOrICUContainer(tNode);\n const renderParent = parent.parent;\n\n // If the parent is null, then we are inserting across views: either into an embedded view or a\n // component view.\n if (renderParent == null) {\n const hostTNode = currentView[T_HOST] !;\n if (hostTNode.type === TNodeType.View) {\n // We are inserting a root element of an embedded view We might delay insertion of children\n // for a given view if it is disconnected. This might happen for 2 main reasons:\n // - view is not inserted into any container(view was created but not inserted yet)\n // - view is inserted into a container but the container itself is not inserted into the DOM\n // (container might be part of projection or child of a view that is not inserted yet).\n // In other words we can insert children of a given view if this view was inserted into a\n // container and the container itself has its render parent determined.\n return getContainerRenderParent(hostTNode as TViewNode, currentView);\n } else {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return getHostNative(currentView);\n }\n } else {\n const isIcuCase = parent && parent.type === TNodeType.IcuContainer;\n // If the parent of this node is an ICU container, then it is represented by comment node and we\n // need to use it as an anchor. If it is projected then its direct parent node is the renderer.\n if (isIcuCase && parent.flags & TNodeFlags.isProjected) {\n return getNativeByTNode(parent, currentView).parentNode as RElement;\n }\n\n ngDevMode && assertNodeType(renderParent, TNodeType.Element);\n if (renderParent.flags & TNodeFlags.isComponent && !isIcuCase) {\n const tData = currentView[TVIEW].data;\n const tNode = tData[renderParent.index] as TNode;\n const encapsulation = (tData[tNode.directiveStart] as ComponentDef<any>).encapsulation;\n\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation !== ViewEncapsulation.ShadowDom &&\n encapsulation !== ViewEncapsulation.Native) {\n return null;\n }\n }\n\n return getNativeByTNode(renderParent, currentView) as RElement;\n }\n}\n\n/**\n * Gets the native host element for a given view. Will return null if the current view does not have\n * a host element.\n */\nfunction getHostNative(currentView: LView): RElement|null {\n ngDevMode && assertLView(currentView);\n const hostTNode = currentView[T_HOST];\n return hostTNode && hostTNode.type === TNodeType.Element ?\n (getNativeByTNode(hostTNode, getLViewParent(currentView) !) as RElement) :\n null;\n}\n\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nexport function nativeInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode);\n } else {\n parent.insertBefore(child, beforeNode, true);\n }\n}\n\nfunction nativeAppendChild(renderer: Renderer3, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n } else {\n parent.appendChild(child);\n }\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(\n renderer: Renderer3, parent: RElement, child: RNode, isHostElement?: boolean): void {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n } else {\n parent.removeChild(child);\n }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer3, node: RNode): RElement|null {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode) as RElement;\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer3, node: RNode): RNode|null {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n\n/**\n * Finds a native \"anchor\" node for cases where we can't append a native child directly\n * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.\n * @param parentTNode\n * @param lView\n */\nfunction getNativeAnchorNode(parentTNode: TNode, lView: LView): RNode|null {\n if (parentTNode.type === TNodeType.View) {\n const lContainer = getLContainer(parentTNode as TViewNode, lView) !;\n const index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;\n return getBeforeNodeForView(index, lContainer);\n } else if (\n parentTNode.type === TNodeType.ElementContainer ||\n parentTNode.type === TNodeType.IcuContainer) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}.\n *\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nexport function appendChild(childEl: RNode | RNode[], childTNode: TNode, currentView: LView): void {\n const renderParent = getRenderParent(childTNode, currentView);\n if (renderParent != null) {\n const renderer = currentView[RENDERER];\n const parentTNode: TNode = childTNode.parent || currentView[T_HOST] !;\n const anchorNode = getNativeAnchorNode(parentTNode, currentView);\n if (Array.isArray(childEl)) {\n for (let nativeNode of childEl) {\n nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n }\n }\n}\n\n/**\n * Gets the top-level element or an ICU container if those containers are nested.\n *\n * @param tNode The starting TNode for which we should skip element and ICU containers\n * @returns The TNode of the highest level ICU container or element container\n */\nfunction getHighestElementOrICUContainer(tNode: TNode): TNode {\n while (tNode.parent != null && (tNode.parent.type === TNodeType.ElementContainer ||\n tNode.parent.type === TNodeType.IcuContainer)) {\n tNode = tNode.parent;\n }\n return tNode;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');\n const tViewNodeChild = (lView[T_HOST] as TViewNode).child;\n return tViewNodeChild !== null ? getNativeByTNode(tViewNodeChild, lView) : lContainer[NATIVE];\n } else {\n return lContainer[NATIVE];\n }\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer3, rNode: RNode, isHostElement?: boolean): void {\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n\n/**\n * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and\n * stored on a component host level.\n * @param lView A LView where nodes are inserted (target LView)\n * @param tProjectionNode A projection node where previously re-distribution should be appended\n * (target insertion place)\n * @param selectorIndex A bucket from where nodes to project should be taken\n * @param componentView A where projectable nodes were initially created (source view)\n */\nexport function appendProjectedNodes(\n lView: LView, tProjectionNode: TProjectionNode, selectorIndex: number,\n componentView: LView): void {\n const projectedView = componentView[PARENT] !as LView;\n const componentNode = componentView[T_HOST] as TElementNode;\n let nodeToProject = (componentNode.projection as(TNode | null)[])[selectorIndex];\n\n if (Array.isArray(nodeToProject)) {\n appendChild(nodeToProject, tProjectionNode, lView);\n } else {\n while (nodeToProject) {\n if (!(nodeToProject.flags & TNodeFlags.isDetached)) {\n if (nodeToProject.type === TNodeType.Projection) {\n appendProjectedNodes(\n lView, tProjectionNode, (nodeToProject as TProjectionNode).projection,\n findComponentView(projectedView));\n } else {\n // This flag must be set now or we won't know that this node is projected\n // if the nodes are inserted into a container later.\n nodeToProject.flags |= TNodeFlags.isProjected;\n appendProjectedNode(nodeToProject, tProjectionNode, lView, projectedView);\n }\n }\n nodeToProject = nodeToProject.projectionNext;\n }\n }\n}\n\n/**\n * Loops over all children of a TNode container and appends them to the DOM\n *\n * @param ngContainerChildTNode The first child of the TNode container\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedChildren(\n ngContainerChildTNode: TNode | null, tProjectionNode: TNode, currentView: LView,\n projectionView: LView) {\n while (ngContainerChildTNode) {\n appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);\n ngContainerChildTNode = ngContainerChildTNode.next;\n }\n}\n\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param projectedTNode The TNode to be projected\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedNode(\n projectedTNode: TNode, tProjectionNode: TNode, currentView: LView,\n projectionView: LView): void {\n const native = getNativeByTNode(projectedTNode, projectionView);\n appendChild(native, tProjectionNode, currentView);\n\n // the projected contents are processed while in the shadow view (which is the currentView)\n // therefore we need to extract the view where the host element lives since it's the\n // logical container of the content projected views\n attachPatchData(native, projectionView);\n\n const nodeOrContainer = projectionView[projectedTNode.index];\n if (projectedTNode.type === TNodeType.Container) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n for (let i = CONTAINER_HEADER_OFFSET; i < nodeOrContainer.length; i++) {\n addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);\n }\n } else if (projectedTNode.type === TNodeType.IcuContainer) {\n // The node we are adding is an ICU container which is why we also need to project all the\n // children nodes that might have been created previously and are linked to this anchor\n let ngContainerChildTNode: TNode|null = projectedTNode.child as TNode;\n appendProjectedChildren(\n ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);\n } else {\n if (projectedTNode.type === TNodeType.ElementContainer) {\n appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);\n }\n\n if (isLContainer(nodeOrContainer)) {\n appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);\n }\n }\n}\n\n\n/**\n * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,\n * destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. While the recursive implementation is not the\n * most efficient one, trying to unroll the nodes non-recursively results in very complex code that\n * is very hard (to maintain). We are sacrificing a bit of performance for readability using a\n * recursive implementation.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnView(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const tView = lView[TVIEW];\n ngDevMode && assertNodeType(tView.node !, TNodeType.View);\n let viewRootTNode: TNode|null = tView.node !.child;\n while (viewRootTNode !== null) {\n executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);\n viewRootTNode = viewRootTNode.next;\n }\n}\n\n/**\n * `executeActionOnProjection` performs an operation on the projection specified by `action`\n * (insert, detach, destroy).\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnProjection(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tProjectionNode: TProjectionNode, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const componentLView = findComponentView(lView);\n const componentNode = componentLView[T_HOST] as TElementNode;\n const nodeToProject = componentNode.projection ![tProjectionNode.projection] !;\n if (Array.isArray(nodeToProject)) {\n for (let i = 0; i < nodeToProject.length; i++) {\n const rNode = nodeToProject[i];\n ngDevMode && assertDomNode(rNode);\n executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n }\n } else {\n let projectionTNode: TNode|null = nodeToProject;\n const projectedComponentLView = componentLView[PARENT] as LView;\n while (projectionTNode !== null) {\n executeActionOnNode(\n renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);\n projectionTNode = projectionTNode.projectionNext;\n }\n }\n}\n\n\n/**\n * `executeActionOnContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lContainer: LContainer,\n renderParent: RElement | null, beforeNode: RNode | null | undefined) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node\n // (comment in the DOM) that will be different from the LContainer's host node. In this particular\n // case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeNodeAction)\n // - container's host node (this is done here)\n if (anchor !== native) {\n executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n executeActionOnView(renderer, action, lView, renderParent, anchor);\n }\n}\n\n\n/**\n * `executeActionOnElementContainer` performs an operation on the ng-container node and its child\n * nodes as specified by the `action` (insert, detach, destroy).\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tElementContainerNode The TNode associated with the ElementContainer.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnElementContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tElementContainerNode: TElementContainerNode, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const node = lView[tElementContainerNode.index];\n executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);\n let childTNode: TNode|null = tElementContainerNode.child;\n while (childTNode) {\n executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);\n childTNode = childTNode.next;\n }\n}\n\nfunction executeActionOnNode(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, tNode: TNode,\n renderParent: RElement | null, beforeNode: RNode | null | undefined): void {\n const elementContainerRootTNodeType = tNode.type;\n if (elementContainerRootTNodeType === TNodeType.ElementContainer) {\n executeActionOnElementContainer(\n renderer, action, lView, tNode as TElementContainerNode, renderParent, beforeNode);\n } else if (elementContainerRootTNodeType === TNodeType.Projection) {\n executeActionOnProjection(\n renderer, action, lView, tNode as TProjectionNode, renderParent, beforeNode);\n } else {\n ngDevMode && assertNodeOfPossibleTypes(tNode, TNodeType.Element, TNodeType.Container);\n executeActionOnElementOrContainer(\n action, renderer, renderParent, lView[tNode.index], beforeNode);\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 */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {executePreOrderHooks, registerPostOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild, removeView} from '../node_manipulation';\nimport {getCheckNoChangesMode, getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {getNativeByTNode, loadInternal} from '../util/view_utils';\n\nimport {addToViewTree, createDirectivesAndLocals, createLContainer, createTView, getOrCreateTNode} from './shared';\n\n\n/**\n * Creates an LContainer for inline views, e.g.\n *\n * % if (showing) {\n * <div></div>\n * % }\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ɵɵcontainer(index: number): void {\n const tNode = containerInternal(index, null, null);\n const lView = getLView();\n if (lView[TVIEW].firstTemplatePass) {\n tNode.tViews = [];\n }\n addTContainerToQueries(lView, tNode);\n setIsNotParent();\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param consts The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,\n localRefExtractor?: LocalRefExtractor) {\n const lView = getLView();\n const tView = lView[TVIEW];\n\n // TODO: consider a separate node type for templates\n const tContainerNode = containerInternal(index, tagName || null, attrs || null);\n if (tView.firstTemplatePass) {\n tContainerNode.tViews = createTView(\n -1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n\n createDirectivesAndLocals(tView, lView, localRefs, localRefExtractor);\n addTContainerToQueries(lView, tContainerNode);\n attachPatchData(getNativeByTNode(tContainerNode, lView), lView);\n registerPostOrderHooks(tView, tContainerNode);\n setIsNotParent();\n}\n\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ɵɵcontainerRefreshStart(index: number): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n let previousOrParentTNode = loadInternal(tView.data, index) as TNode;\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n setPreviousOrParentTNode(previousOrParentTNode, true);\n\n lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;\n\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executePreOrderHooks(lView, tView, getCheckNoChangesMode(), undefined);\n}\n\n/**\n * Marks the end of the LContainer.\n *\n * Marking the end of LContainer is the time when to child views get inserted or removed.\n *\n * @codeGenApi\n */\nexport function ɵɵcontainerRefreshEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.View);\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n\n const lContainer: LContainer = getLView()[previousOrParentTNode.index];\n const nextIndex = lContainer[ACTIVE_INDEX];\n\n // remove extra views at the end of the container\n while (nextIndex < lContainer.length - CONTAINER_HEADER_OFFSET) {\n removeView(lContainer, nextIndex);\n }\n}\n\n/**\n* Reporting a TContainer node queries is a 2-step process as we need to:\n* - check if the container node itself is matching (query might match a <ng-template> node);\n* - prepare room for nodes from views that might be created based on the TemplateRef linked to this\n* container.\n*\n* Those 2 operations need to happen in the specific order (match the container node itself, then\n* prepare space for nodes from views).\n*/\nfunction addTContainerToQueries(lView: LView, tContainerNode: TContainerNode): void {\n const queries = lView[QUERIES];\n if (queries) {\n const lContainer = lView[tContainerNode.index];\n if (lContainer[QUERIES]) {\n // Query container should only exist if it was created through a dynamic view\n // in a directive constructor. In this case, we must splice the template\n // matches in before the view matches to ensure query results in embedded views\n // don't clobber query results on the template node itself.\n queries.insertNodeBeforeViews(tContainerNode);\n } else {\n queries.addNode(tContainerNode);\n lContainer[QUERIES] = queries.container();\n }\n }\n}\n\nfunction containerInternal(\n index: number, tagName: string | null, attrs: TAttributes | null): TContainerNode {\n const lView = getLView();\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'container nodes should be created before any bindings');\n\n const adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n ngDevMode && ngDevMode.rendererCreateComment++;\n const comment = lView[index + HEADER_OFFSET] =\n lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n const tNode =\n getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, TNodeType.Container, tagName, attrs);\n const lContainer = lView[adjustedIndex] =\n createLContainer(lView[adjustedIndex], lView, comment, tNode);\n\n appendChild(comment, tNode, lView);\n\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(lView, lContainer);\n\n ngDevMode && assertNodeType(getPreviousOrParentTNode(), TNodeType.Container);\n return tNode;\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 */\nimport {HEADER_OFFSET, TVIEW} from '../interfaces/view';\nimport {getContextLView, getLView} from '../state';\nimport {loadInternal} from '../util/view_utils';\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(index: number, value: T): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n const adjustedIndex = index + HEADER_OFFSET;\n if (adjustedIndex >= tView.data.length) {\n tView.data[adjustedIndex] = null;\n tView.blueprint[adjustedIndex] = null;\n }\n lView[adjustedIndex] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return loadInternal<T>(contextLView, index);\n}\n\n/**\n * Retrieves a value from current `viewData`.\n *\n * @codeGenApi\n */\nexport function ɵɵload<T>(index: number): T {\n return loadInternal<T>(getLView(), index);\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 */\nimport {InjectFlags, InjectionToken, resolveForwardRef} from '../../di';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {Type} from '../../interface/type';\nimport {getOrCreateInjectable, injectAttributeImpl} from '../di';\nimport {TContainerNode, TElementContainerNode, TElementNode} from '../interfaces/node';\nimport {getLView, getPreviousOrParentTNode} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ngDirectiveDef = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(\n token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n token = resolveForwardRef(token);\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView == null) return ɵɵinject(token, flags);\n\n return getOrCreateInjectable<T>(\n getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode, lView,\n token, flags);\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string|null {\n return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\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*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {LContainer} from '../interfaces/container';\nimport {AttributeMarker, TAttributes, TNode, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {StylingContext as OldStylingContext, StylingIndex as OldStylingIndex} from '../interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, HOST, LView, RENDERER, SANITIZER} from '../interfaces/view';\nimport {getActiveDirectiveId, getActiveDirectiveSuperClassDepth, getActiveDirectiveSuperClassHeight, getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getTNode, isStylingContext as isOldStylingContext} from '../util/view_utils';\n\nimport {applyClasses, applyStyles, registerBinding, updateClassBinding, updateStyleBinding} from './bindings';\nimport {TStylingContext} from './interfaces';\nimport {activeStylingMapFeature, normalizeIntoStylingMap} from './map_based_bindings';\nimport {getCurrentStyleSanitizer, setCurrentStyleSanitizer} from './state';\nimport {attachStylingDebugObject} from './styling_debug';\nimport {allocTStylingContext, getCurrentOrLViewSanitizer, hasValueChanged, updateContextDirectiveIndex} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core logic for how styling instructions are processed in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * This function is executed during the creation block of an element.\n * Because the existing styling implementation issues a call to the\n * `styling()` instruction, this instruction will also get run. The\n * central idea here is that the directive index values are bound\n * into the context. The directive index is temporary and is only\n * required until the `select(n)` instruction is fully functional.\n */\nexport function stylingInit() {\n const lView = getLView();\n const index = getSelectedIndex();\n const tNode = getTNode(index, lView);\n updateLastDirectiveIndex(tNode, getActiveDirectiveStylingIndex());\n}\n\n/**\n * Sets the current style sanitizer function which will then be used\n * within all follow-up prop and map-based style binding instructions\n * for the given element.\n *\n * Note that once styling has been applied to the element (i.e. once\n * `select(n)` is executed or the hostBindings/template function exits)\n * then the active `sanitizerFn` will be set to `null`. This means that\n * once styling is applied to another element then a another call to\n * `styleSanitizer` will need to be made.\n *\n * @param sanitizerFn The sanitization function that will be used to\n * process style prop/value entries.\n *\n * @codeGenApi\n */\nexport function styleSanitizer(sanitizer: Sanitizer | StyleSanitizeFn | null): void {\n setCurrentStyleSanitizer(sanitizer);\n}\n\n/**\n * Mirror implementation of the `styleProp()` instruction (found in `instructions/styling.ts`).\n */\nexport function styleProp(\n prop: string, value: string | number | String | null, suffix?: string | null): void {\n _stylingProp(prop, resolveStylePropValue(value, suffix), false);\n}\n\n/**\n * Mirror implementation of the `classProp()` instruction (found in `instructions/styling.ts`).\n */\nexport function classProp(className: string, value: boolean | null): void {\n _stylingProp(className, value, true);\n}\n\n/**\n * Shared function used to update a prop-based styling binding for an element.\n */\nfunction _stylingProp(\n prop: string, value: boolean | number | String | string | null, isClassBased: boolean) {\n const index = getSelectedIndex();\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX]++;\n const tNode = getTNode(index, lView);\n const defer = getActiveDirectiveSuperClassHeight() > 0;\n if (isClassBased) {\n updateClassBinding(\n getClassesContext(tNode), lView, prop, bindingIndex, value as string | boolean | null,\n defer, false);\n } else {\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(\n getStylesContext(tNode), lView, prop, bindingIndex, value as string | null, sanitizer,\n defer, false);\n }\n}\n\n/**\n * Mirror implementation of the `styleMap()` instruction (found in `instructions/styling.ts`).\n */\nexport function styleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void {\n _stylingMap(styles, false);\n}\n\n/**\n * Mirror implementation of the `classMap()` instruction (found in `instructions/styling.ts`).\n */\nexport function classMap(classes: {[className: string]: any} | NO_CHANGE | string | null): void {\n _stylingMap(classes, true);\n}\n\n/**\n * Shared function used to update a map-based styling binding for an element.\n *\n * When this function is called it will activate support for `[style]` and\n * `[class]` bindings in Angular.\n */\nfunction _stylingMap(value: {[key: string]: any} | string | null, isClassBased: boolean) {\n activeStylingMapFeature();\n const index = getSelectedIndex();\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX]++;\n\n if (value !== NO_CHANGE) {\n const tNode = getTNode(index, lView);\n const defer = getActiveDirectiveSuperClassHeight() > 0;\n const oldValue = lView[bindingIndex];\n const valueHasChanged = hasValueChanged(oldValue, value);\n const lStylingMap = normalizeIntoStylingMap(oldValue, value);\n if (isClassBased) {\n updateClassBinding(\n getClassesContext(tNode), lView, null, bindingIndex, lStylingMap, defer, valueHasChanged);\n } else {\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(\n getStylesContext(tNode), lView, null, bindingIndex, lStylingMap, sanitizer, defer,\n valueHasChanged);\n }\n }\n}\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The new styling refactor ensures that styling flushing is called\n * automatically when a template function exits or a follow-up element\n * is visited (i.e. when `select(n)` is called). Because the `select(n)`\n * instruction is not fully implemented yet (it doesn't actually execute\n * host binding instruction code at the right time), this means that a\n * styling apply function is still needed.\n *\n * This function is a mirror implementation of the `stylingApply()`\n * instruction (found in `instructions/styling.ts`).\n */\nexport function stylingApply() {\n const index = getSelectedIndex();\n const lView = getLView();\n const tNode = getTNode(index, lView);\n const renderer = getRenderer(tNode, lView);\n const native = getNativeFromLView(index, lView);\n const directiveIndex = getActiveDirectiveStylingIndex();\n applyClasses(renderer, lView, getClassesContext(tNode), native, directiveIndex);\n\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n applyStyles(renderer, lView, getStylesContext(tNode), native, directiveIndex, sanitizer);\n\n setCurrentStyleSanitizer(null);\n}\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The purpose of this function is to traverse through the LView data\n * for a specific element index and return the native node. Because the\n * current implementation relies on there being a styling context array,\n * the code below will need to loop through these array values until it\n * gets a native element node.\n *\n * Note that this code is temporary and will disappear once the new\n * styling refactor lands in its entirety.\n */\nfunction getNativeFromLView(index: number, viewData: LView): RElement {\n let storageIndex = index + HEADER_OFFSET;\n let slotValue: LContainer|LView|OldStylingContext|RElement = viewData[storageIndex];\n let wrapper: LContainer|LView|OldStylingContext = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST] as LView | OldStylingContext | RElement;\n }\n if (isOldStylingContext(wrapper)) {\n return wrapper[OldStylingIndex.ElementPosition] as RElement;\n } else {\n return slotValue;\n }\n}\n\nfunction getRenderer(tNode: TNode, lView: LView) {\n return tNode.type === TNodeType.Element ? lView[RENDERER] : null;\n}\n\n/**\n * Searches and assigns provided all static style/class entries (found in the `attrs` value)\n * and registers them in their respective styling contexts.\n */\nexport function registerInitialStylingIntoContext(\n tNode: TNode, attrs: TAttributes, startIndex: number) {\n let classesContext !: TStylingContext;\n let stylesContext !: TStylingContext;\n let mode = -1;\n for (let i = startIndex; i < attrs.length; i++) {\n const attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n } else if (mode == AttributeMarker.Classes) {\n classesContext = classesContext || getClassesContext(tNode);\n registerBinding(classesContext, -1, attr as string, true, false);\n } else if (mode == AttributeMarker.Styles) {\n stylesContext = stylesContext || getStylesContext(tNode);\n registerBinding(stylesContext, -1, attr as string, attrs[++i] as string, false);\n }\n }\n}\n\n/**\n * Mirror implementation of the same function found in `instructions/styling.ts`.\n */\nexport function getActiveDirectiveStylingIndex(): number {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n}\n\n/**\n * Temporary function that will update the max directive index value in\n * both the classes and styles contexts present on the provided `tNode`.\n *\n * This code is only used because the `select(n)` code functionality is not\n * yet 100% functional. The `select(n)` instruction cannot yet evaluate host\n * bindings function code in sync with the associated template function code.\n * For this reason the styling algorithm needs to track the last directive index\n * value so that it knows exactly when to render styling to the element since\n * `stylingApply()` is called multiple times per CD (`stylingApply` will be\n * removed once `select(n)` is fixed).\n */\nfunction updateLastDirectiveIndex(tNode: TNode, directiveIndex: number) {\n updateContextDirectiveIndex(getClassesContext(tNode), directiveIndex);\n updateContextDirectiveIndex(getStylesContext(tNode), directiveIndex);\n}\n\nfunction getStylesContext(tNode: TNode): TStylingContext {\n return getContext(tNode, false);\n}\n\nfunction getClassesContext(tNode: TNode): TStylingContext {\n return getContext(tNode, true);\n}\n\n/**\n * Returns/instantiates a styling context from/to a `tNode` instance.\n */\nfunction getContext(tNode: TNode, isClassBased: boolean) {\n let context = isClassBased ? tNode.newClasses : tNode.newStyles;\n if (!context) {\n context = allocTStylingContext();\n if (ngDevMode) {\n attachStylingDebugObject(context);\n }\n if (isClassBased) {\n tNode.newClasses = context;\n } else {\n tNode.newStyles = context;\n }\n }\n return context;\n}\n\nfunction resolveStylePropValue(\n value: string | number | String | null, suffix: string | null | undefined) {\n let resolvedValue: string|null = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n resolvedValue = renderStringify(value) + suffix;\n } else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n resolvedValue = value as any as string;\n }\n }\n return resolvedValue;\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 */\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {PlayerFactory} from '../interfaces/player';\nimport {FLAGS, HEADER_OFFSET, LView, LViewFlags, RENDERER, RootContextFlags} from '../interfaces/view';\nimport {getActiveDirectiveId, getActiveDirectiveSuperClassDepth, getLView, getPreviousOrParentTNode, getSelectedIndex} from '../state';\nimport {getInitialClassNameValue, renderStyling, updateClassMap, updateClassProp as updateclassProp, updateContextWithBindings, updateStyleMap, updateStyleProp as updatestyleProp} from '../styling/class_and_style_bindings';\nimport {ParamsOf, enqueueHostInstruction, registerHostDirective} from '../styling/host_instructions_queue';\nimport {BoundPlayerFactory} from '../styling/player_factory';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from '../styling/shared';\nimport {getCachedStylingContext, setCachedStylingContext} from '../styling/state';\nimport {allocateOrUpdateDirectiveIntoContext, createEmptyStylingContext, forceClassesAsString, forceStylesAsString, getStylingContextFromLView, hasClassInput, hasStyleInput} from '../styling/util';\nimport {classMap as newClassMap, classProp as newClassProp, styleMap as newStyleMap, styleProp as newStyleProp, stylingApply as newStylingApply, stylingInit as newStylingInit} from '../styling_next/instructions';\nimport {runtimeAllowOldStyling, runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {getBindingNameFromIndex} from '../styling_next/util';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getRootContext} from '../util/view_traversal_utils';\nimport {getTNode} from '../util/view_utils';\n\nimport {scheduleTick, setInputsForProperty} from './shared';\n\n\n\n/*\n * The contents of this file include the instructions for all styling-related\n * operations in Angular.\n *\n * The instructions present in this file are:\n *\n * Template level styling instructions:\n * - styling\n * - styleMap\n * - classMap\n * - styleProp\n * - classProp\n * - stylingApply\n */\n\n/**\n * Allocates style and class binding properties on the element during creation mode.\n *\n * This instruction is meant to be called during creation mode to register all\n * dynamic style and class bindings on the element. Note that this is only used\n * for binding values (see `elementStart` to learn how to assign static styling\n * values to an element).\n *\n * @param classBindingNames An array containing bindable class names.\n * The `classProp` instruction refers to the class name by index in\n * this array (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).\n * @param styleBindingNames An array containing bindable style properties.\n * The `styleProp` instruction refers to the class name by index in\n * this array (i.e. `['width', 'height']` means `width=0` and `height=1`).\n * @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS\n * style values that are applied to the element (during rendering).\n *\n * Note that this will allocate the provided style/class bindings to the host element if\n * this function is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyling(\n classBindingNames?: string[] | null, styleBindingNames?: string[] | null,\n styleSanitizer?: StyleSanitizeFn | null): void {\n const tNode = getPreviousOrParentTNode();\n if (!tNode.stylingTemplate) {\n tNode.stylingTemplate = createEmptyStylingContext();\n }\n\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n // this is temporary hack to get the existing styling instructions to\n // play ball with the new refactored implementation.\n // TODO (matsko): remove this once the old implementation is not needed.\n if (runtimeIsNewStylingInUse()) {\n newStylingInit();\n }\n\n // despite the binding being applied in a queue (below), the allocation\n // of the directive into the context happens right away. The reason for\n // this is to retain the ordering of the directives (which is important\n // for the prioritization of bindings).\n allocateOrUpdateDirectiveIntoContext(tNode.stylingTemplate, directiveStylingIndex);\n\n const fns = tNode.onElementCreationFns = tNode.onElementCreationFns || [];\n fns.push(() => {\n initStyling(\n tNode, classBindingNames, styleBindingNames, styleSanitizer, directiveStylingIndex);\n registerHostDirective(tNode.stylingTemplate !, directiveStylingIndex);\n });\n } else {\n // calling the function below ensures that the template's binding values\n // are applied as the first set of bindings into the context. If any other\n // styling bindings are set on the same element (by directives and/or\n // components) then they will be applied at the end of the `elementEnd`\n // instruction (because directives are created first before styling is\n // executed for a new element).\n initStyling(\n tNode, classBindingNames, styleBindingNames, styleSanitizer,\n DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n }\n}\n\nfunction initStyling(\n tNode: TNode, classBindingNames: string[] | null | undefined,\n styleBindingNames: string[] | null | undefined,\n styleSanitizer: StyleSanitizeFn | null | undefined, directiveStylingIndex: number): void {\n updateContextWithBindings(\n tNode.stylingTemplate !, directiveStylingIndex, classBindingNames, styleBindingNames,\n styleSanitizer);\n}\n\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param value New value to write (falsy to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n * Note that when a suffix is provided then the underlying sanitizer will\n * be ignored.\n * @param forceOverride Whether or not to update the styling value immediately\n * (despite the other bindings possibly having priority)\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n styleIndex: number, value: string | number | String | PlayerFactory | null,\n suffix?: string | null, forceOverride?: boolean): void {\n const index = getSelectedIndex();\n const valueToAdd = resolveStylePropValue(value, suffix);\n const stylingContext = getStylingContext(index, getLView());\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updatestyleProp> =\n [stylingContext, styleIndex, valueToAdd, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updatestyleProp, args);\n } else {\n updatestyleProp(\n stylingContext, styleIndex, valueToAdd, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n\n if (runtimeIsNewStylingInUse()) {\n const prop = getBindingNameFromIndex(stylingContext, styleIndex, directiveStylingIndex, false);\n\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n newStyleProp(prop, value as string | number, suffix);\n }\n}\n\nfunction resolveStylePropValue(\n value: string | number | String | PlayerFactory | null, suffix: string | null | undefined) {\n let valueToAdd: string|null = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n valueToAdd = renderStringify(value) + suffix;\n } else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n valueToAdd = value as any as string;\n }\n }\n return valueToAdd;\n}\n\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param classIndex Index of class to toggle. This index value refers to the\n * index of the class in the class bindings array that was passed into\n * `styling` (which is meant to be called before this\n * function is).\n * @param value A true/false value which will turn the class on or off.\n * @param forceOverride Whether or not this value will be applied regardless\n * of where it is being set within the styling priority structure.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(\n classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void {\n const index = getSelectedIndex();\n const input = (value instanceof BoundPlayerFactory) ?\n (value as BoundPlayerFactory<boolean|null>) :\n booleanOrNull(value);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n const stylingContext = getStylingContext(index, getLView());\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateclassProp> =\n [stylingContext, classIndex, input, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateclassProp, args);\n } else {\n updateclassProp(\n stylingContext, classIndex, input, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n\n if (runtimeIsNewStylingInUse()) {\n const prop = getBindingNameFromIndex(stylingContext, classIndex, directiveStylingIndex, true);\n\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n newClassProp(prop, input as boolean);\n }\n}\n\n\nfunction booleanOrNull(value: any): boolean|null {\n if (typeof value === 'boolean') return value;\n return value ? true : null;\n}\n\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void {\n const index = getSelectedIndex();\n const lView = getLView();\n const stylingContext = getStylingContext(index, lView);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateStyleMap> = [stylingContext, styles, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateStyleMap, args);\n } else {\n const tNode = getTNode(index, lView);\n\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasStyleInput(tNode) && styles !== NO_CHANGE) {\n const initialStyles = getInitialClassNameValue(stylingContext);\n const styleInputVal =\n (initialStyles.length ? (initialStyles + ' ') : '') + forceStylesAsString(styles);\n setInputsForProperty(lView, tNode.inputs !['style'] !, styleInputVal);\n styles = NO_CHANGE;\n }\n updateStyleMap(stylingContext, styles);\n }\n\n if (runtimeIsNewStylingInUse()) {\n newStyleMap(styles);\n }\n}\n\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(classes: {[styleName: string]: any} | NO_CHANGE | string | null): void {\n const index = getSelectedIndex();\n const lView = getLView();\n const stylingContext = getStylingContext(index, lView);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateClassMap> = [stylingContext, classes, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateClassMap, args);\n } else {\n const tNode = getTNode(index, lView);\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasClassInput(tNode) && classes !== NO_CHANGE) {\n const initialClasses = getInitialClassNameValue(stylingContext);\n const classInputVal =\n (initialClasses.length ? (initialClasses + ' ') : '') + forceClassesAsString(classes);\n setInputsForProperty(lView, tNode.inputs !['class'] !, classInputVal);\n classes = NO_CHANGE;\n }\n updateClassMap(stylingContext, classes);\n }\n\n if (runtimeIsNewStylingInUse()) {\n newClassMap(classes);\n }\n}\n\n/**\n * Apply all style and class binding values to the element.\n *\n * This instruction is meant to be run after `styleMap`, `classMap`,\n * `styleProp` or `classProp` instructions have been run and will\n * only apply styling to the element if any styling bindings have been updated.\n *\n * @codeGenApi\n */\nexport function ɵɵstylingApply(): void {\n const index = getSelectedIndex();\n const directiveStylingIndex =\n getActiveDirectiveStylingIndex() || DEFAULT_TEMPLATE_DIRECTIVE_INDEX;\n const lView = getLView();\n const tNode = getTNode(index, lView);\n\n // if a non-element value is being processed then we can't render values\n // on the element at all therefore by setting the renderer to null then\n // the styling apply code knows not to actually apply the values...\n const renderer = tNode.type === TNodeType.Element ? lView[RENDERER] : null;\n const isFirstRender = (lView[FLAGS] & LViewFlags.FirstLViewPass) !== 0;\n const stylingContext = getStylingContext(index, lView);\n\n if (runtimeAllowOldStyling()) {\n const totalPlayersQueued = renderStyling(\n stylingContext, renderer, lView, isFirstRender, null, null, directiveStylingIndex);\n if (totalPlayersQueued > 0) {\n const rootContext = getRootContext(lView);\n scheduleTick(rootContext, RootContextFlags.FlushPlayers);\n }\n }\n\n // because select(n) may not run between every instruction, the cached styling\n // context may not get cleared between elements. The reason for this is because\n // styling bindings (like `[style]` and `[class]`) are not recognized as property\n // bindings by default so a select(n) instruction is not generated. To ensure the\n // context is loaded correctly for the next element the cache below is pre-emptively\n // cleared because there is no code in Angular that applies more styling code after a\n // styling flush has occurred. Note that this will be fixed once FW-1254 lands.\n setCachedStylingContext(null);\n\n if (runtimeIsNewStylingInUse()) {\n newStylingApply();\n }\n}\n\nexport function getActiveDirectiveStylingIndex() {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n}\n\nfunction getStylingContext(index: number, lView: LView) {\n let context = getCachedStylingContext();\n if (!context) {\n context = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n setCachedStylingContext(context);\n } else if (ngDevMode) {\n const actualContext = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n assertEqual(context, actualContext, 'The cached styling context is invalid');\n }\n return context;\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 */\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {applyOnCreateInstructions} from '../node_util';\nimport {decreaseElementDepthCount, getElementDepthCount, getIsParent, getLView, getPreviousOrParentTNode, getSelectedIndex, increaseElementDepthCount, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {getInitialClassNameValue, getInitialStyleStringValue, initializeStaticContext, patchContextWithStaticAttrs, renderInitialClasses, renderInitialStyles} from '../styling/class_and_style_bindings';\nimport {getStylingContextFromLView, hasClassInput, hasStyleInput} from '../styling/util';\nimport {registerInitialStylingIntoContext} from '../styling_next/instructions';\nimport {runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {attrsStylingIndexOf, setUpAttributes} from '../util/attrs_utils';\nimport {getNativeByTNode, getTNode} from '../util/view_utils';\n\nimport {createDirectivesAndLocals, elementCreate, executeContentQueries, getOrCreateTNode, initializeTNodeInputs, setInputsForProperty, setNodeStylingTemplate} from './shared';\nimport {getActiveDirectiveStylingIndex} from './styling';\n\n\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], tView.bindingStartIndex,\n 'elements should be created before any bindings ');\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const native = lView[index + HEADER_OFFSET] = elementCreate(name);\n const renderer = lView[RENDERER];\n const tNode =\n getOrCreateTNode(tView, lView[T_HOST], index, TNodeType.Element, name, attrs || null);\n let initialStylesIndex = 0;\n let initialClassesIndex = 0;\n\n let lastAttrIndex = -1;\n if (attrs) {\n lastAttrIndex = setUpAttributes(native, attrs);\n\n // it's important to only prepare styling-related datastructures once for a given\n // tNode and not each time an element is created. Also, the styling code is designed\n // to be patched and constructed at various points, but only up until the styling\n // template is first allocated (which happens when the very first style/class binding\n // value is evaluated). When the template is allocated (when it turns into a context)\n // then the styling template is locked and cannot be further extended (it can only be\n // instantiated into a context per element)\n setNodeStylingTemplate(tView, tNode, attrs, lastAttrIndex);\n\n const stylingTemplate = tNode.stylingTemplate;\n if (stylingTemplate) {\n // the initial style/class values are rendered immediately after having been\n // initialized into the context so the element styling is ready when directives\n // are initialized (since they may read style/class values in their constructor)\n initialStylesIndex = renderInitialStyles(native, stylingTemplate, renderer);\n initialClassesIndex = renderInitialClasses(native, stylingTemplate, renderer);\n }\n }\n\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n // if a directive contains a host binding for \"class\" then all class-based data will\n // flow through that (except for `[class.prop]` bindings). This also includes initial\n // static class values as well. (Note that this will be fixed once map-based `[style]`\n // and `[class]` bindings work for multiple directives.)\n if (tView.firstTemplatePass) {\n const inputData = initializeTNodeInputs(tNode);\n if (inputData && inputData.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputData && inputData.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n // we render the styling again below in case any directives have set any `style` and/or\n // `class` host attribute values...\n if (tNode.stylingTemplate) {\n renderInitialClasses(native, tNode.stylingTemplate, renderer, initialClassesIndex);\n renderInitialStyles(native, tNode.stylingTemplate, renderer, initialStylesIndex);\n }\n\n if (runtimeIsNewStylingInUse() && lastAttrIndex >= 0) {\n registerInitialStylingIntoContext(tNode, attrs as TAttributes, lastAttrIndex);\n }\n\n const currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertHasParent(getPreviousOrParentTNode());\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Element);\n const lView = getLView();\n const currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n\n registerPostOrderHooks(lView[TVIEW], previousOrParentTNode);\n decreaseElementDepthCount();\n\n // this is fired at the end of elementEnd because ALL of the stylingBindings code\n // (for directives and the template) have now executed which means the styling\n // context can be instantiated properly.\n let stylingContext: StylingContext|null = null;\n if (hasClassInput(previousOrParentTNode)) {\n stylingContext = getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(\n lView, previousOrParentTNode.inputs !['class'] !, getInitialClassNameValue(stylingContext));\n }\n if (hasStyleInput(previousOrParentTNode)) {\n stylingContext =\n stylingContext || getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(\n lView, previousOrParentTNode.inputs !['style'] !,\n getInitialStyleStringValue(stylingContext));\n }\n}\n\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n ɵɵelementStart(index, name, attrs, localRefs);\n ɵɵelementEnd();\n}\n\n/**\n * Assign static attribute values to a host element.\n *\n * This instruction will assign static attribute values as well as class and style\n * values to an element within the host bindings function. Since attribute values\n * can consist of different types of values, the `attrs` array must include the values in\n * the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n *\n * NOTE: This instruction is meant to used from `hostBindings` function only.\n *\n * @param directive A directive instance the styling is associated with.\n * @param attrs An array of static values (attributes, classes and styles) with the correct marker\n * values.\n *\n * @codeGenApi\n */\nexport function ɵɵelementHostAttrs(attrs: TAttributes) {\n const hostElementIndex = getSelectedIndex();\n const lView = getLView();\n const tNode = getTNode(hostElementIndex, lView);\n\n // non-element nodes (e.g. `<ng-container>`) are not rendered as actual\n // element nodes and adding styles/classes on to them will cause runtime\n // errors...\n if (tNode.type === TNodeType.Element) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const lastAttrIndex = setUpAttributes(native, attrs);\n const stylingAttrsStartIndex = attrsStylingIndexOf(attrs, lastAttrIndex);\n if (stylingAttrsStartIndex >= 0) {\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (tNode.stylingTemplate) {\n patchContextWithStaticAttrs(\n tNode.stylingTemplate, attrs, stylingAttrsStartIndex, directiveStylingIndex);\n } else {\n tNode.stylingTemplate =\n initializeStaticContext(attrs, stylingAttrsStartIndex, directiveStylingIndex);\n }\n }\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 */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeType} from '../interfaces/node';\nimport {BINDING_INDEX, HEADER_OFFSET, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {applyOnCreateInstructions} from '../node_util';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\n\nimport {createDirectivesAndLocals, executeContentQueries, getOrCreateTNode, setNodeStylingTemplate} from './shared';\n\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrs Set of attributes to be used when matching directives.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n const renderer = lView[RENDERER];\n const tagName = 'ng-container';\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], tView.bindingStartIndex,\n 'element containers should be created before any bindings');\n\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const native = lView[index + HEADER_OFFSET] = renderer.createComment(ngDevMode ? tagName : '');\n\n ngDevMode && assertDataInRange(lView, index - 1);\n const tNode = getOrCreateTNode(\n tView, lView[T_HOST], index, TNodeType.ElementContainer, tagName, attrs || null);\n\n\n if (attrs) {\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n setNodeStylingTemplate(tView, tNode, attrs, 0);\n }\n\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n attachPatchData(native, lView);\n\n const currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n const lView = getLView();\n const tView = lView[TVIEW];\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.ElementContainer);\n const currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n\n registerPostOrderHooks(tView, previousOrParentTNode);\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\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {assertLContainerOrUndefined} from '../assert';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {RenderFlags} from '../interfaces/definition';\nimport {TContainerNode, TNodeType} from '../interfaces/node';\nimport {FLAGS, LView, LViewFlags, PARENT, QUERIES, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {insertView, removeView} from '../node_manipulation';\nimport {enterView, getIsParent, getLView, getPreviousOrParentTNode, isCreationMode, leaveView, setIsParent, setPreviousOrParentTNode} from '../state';\nimport {resetPreOrderHookFlags} from '../util/view_utils';\nimport {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews} from './shared';\n\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n *\n * @codeGenApi\n */\nexport function ɵɵembeddedViewStart(\n viewBlockId: number, consts: number, vars: number): RenderFlags {\n const lView = getLView();\n const previousOrParentTNode = getPreviousOrParentTNode();\n // The previous node can be a view node if we are processing an inline for loop\n const containerTNode = previousOrParentTNode.type === TNodeType.View ?\n previousOrParentTNode.parent ! :\n previousOrParentTNode;\n const lContainer = lView[containerTNode.index] as LContainer;\n\n ngDevMode && assertNodeType(containerTNode, TNodeType.Container);\n let viewToRender = scanForView(lContainer, lContainer[ACTIVE_INDEX] !, viewBlockId);\n\n if (viewToRender) {\n setIsParent();\n enterView(viewToRender, viewToRender[TVIEW].node);\n } else {\n // When we create a new LView, we always reset the state of the instructions.\n viewToRender = createLView(\n lView,\n getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode as TContainerNode), null,\n LViewFlags.CheckAlways, null, null);\n\n if (lContainer[QUERIES]) {\n viewToRender[QUERIES] = lContainer[QUERIES] !.createView();\n }\n\n const tParentNode = getIsParent() ? previousOrParentTNode :\n previousOrParentTNode && previousOrParentTNode.parent;\n assignTViewNodeToLView(viewToRender[TVIEW], tParentNode, viewBlockId, viewToRender);\n enterView(viewToRender, viewToRender[TVIEW].node);\n }\n if (lContainer) {\n if (isCreationMode(viewToRender)) {\n // it is a new view, insert it into collection of views for a given container\n insertView(viewToRender, lContainer, lContainer[ACTIVE_INDEX] !);\n }\n lContainer[ACTIVE_INDEX] !++;\n }\n return isCreationMode(viewToRender) ? RenderFlags.Create | RenderFlags.Update :\n RenderFlags.Update;\n}\n\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view block must create or retrieve its own TView. Otherwise, the embedded view's\n * static data for a particular node would overwrite the static data for a node in the view above\n * it with the same index (since it's in the same template).\n *\n * @param viewIndex The index of the TView in TNode.tViews\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param vars The number of bindings and pure function bindings in this template\n * @param container The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(\n viewIndex: number, consts: number, vars: number, parent: TContainerNode): TView {\n const tView = getLView()[TVIEW];\n ngDevMode && assertNodeType(parent, TNodeType.Container);\n const containerTViews = parent.tViews as TView[];\n ngDevMode && assertDefined(containerTViews, 'TView expected');\n ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');\n if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {\n containerTViews[viewIndex] = createTView(\n viewIndex, null, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n return containerTViews[viewIndex];\n}\n\n\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param lContainer to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n */\nfunction scanForView(lContainer: LContainer, startIdx: number, viewBlockId: number): LView|null {\n for (let i = startIdx + CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const viewAtPositionId = lContainer[i][TVIEW].id;\n if (viewAtPositionId === viewBlockId) {\n return lContainer[i];\n } else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(lContainer, i - CONTAINER_HEADER_OFFSET);\n } else {\n // found a view with id greater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the searchdef.cont here\n break;\n }\n }\n return null;\n}\n\n/**\n * Marks the end of an embedded view.\n *\n * @codeGenApi\n */\nexport function ɵɵembeddedViewEnd(): void {\n const lView = getLView();\n const viewHost = lView[T_HOST];\n\n if (isCreationMode(lView)) {\n refreshDescendantViews(lView); // creation mode pass\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n }\n resetPreOrderHookFlags(lView);\n refreshDescendantViews(lView); // update mode pass\n const lContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainerOrUndefined(lContainer);\n // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block\n // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to\n // an error being thrown.\n leaveView(lContainer[PARENT] !, /* safeToRunHooks */ true);\n setPreviousOrParentTNode(viewHost !, false);\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 */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\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\nimport {Observable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise(obj: any): obj is Promise<any> {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n */\nexport function isObservable(obj: any | Observable<any>): obj is Observable<any> {\n // TODO: use isObservable once we update pass rxjs 6.1\n // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03\n return !!obj && typeof obj.subscribe === 'function';\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\nimport {assertDataInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {EMPTY_OBJ} from '../empty';\nimport {PropertyAliasValue, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, RElement, Renderer3, isProceduralRenderer} from '../interfaces/renderer';\nimport {CLEANUP, FLAGS, LView, LViewFlags, RENDERER, TVIEW} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes} from '../node_assert';\nimport {getLView, getPreviousOrParentTNode} from '../state';\nimport {getComponentViewByIndex, getNativeByTNode, hasDirectives, unwrapRNode} from '../util/view_utils';\nimport {BindingDirection, generatePropertyAliases, getCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver): void {\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);\n}\n\n/**\n* Registers a synthetic host listener (e.g. `(@foo.start)`) on a component.\n*\n* This instruction is for compatibility purposes and is designed to ensure that a\n* synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n* in the component's renderer. Normally all host listeners are evaluated with the\n* parent component's renderer, but, in the case of animation @triggers, they need\n* to be evaluated with the sub component's renderer (because that's where the\n* animation triggers are defined).\n*\n* Do not use this instruction as a replacement for `listener`. This instruction\n* only exists to ensure compatibility with the ViewEngine's host binding behavior.\n*\n* @param eventName Name of the event\n* @param listenerFn The function to be called when event emits\n* @param useCapture Whether or not to use capture in event listener\n* @param eventTargetResolver Function that returns global target information in case this listener\n* should be attached to a global object like window, document or body\n *\n * @codeGenApi\n*/\nexport function ɵɵcomponentHostSyntheticListener<T>(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver): void {\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\n const tView = lView[TVIEW];\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP] !;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nfunction listenerInternal(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver,\n loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n const lView = getLView();\n const tNode = getPreviousOrParentTNode();\n const tView = lView[TVIEW];\n const firstTemplatePass = tView.firstTemplatePass;\n const tCleanup: false|any[] = firstTemplatePass && (tView.cleanup || (tView.cleanup = []));\n\n ngDevMode && assertNodeOfPossibleTypes(\n tNode, TNodeType.Element, TNodeType.Container, TNodeType.ElementContainer);\n\n let processOutputs = true;\n\n // add native event listener - applicable to elements only\n if (tNode.type === TNodeType.Element) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ as any;\n const target = resolved.target || native;\n const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n const lCleanup = getCleanup(lView);\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target :\n tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && hasDirectives(tNode)) {\n existingListener = findExistingListener(lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener at the head of the coalesced listeners list.\n (<any>listenerFn).__ngNextListenerFn__ = (<any>existingListener).__ngNextListenerFn__;\n (<any>existingListener).__ngNextListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n // The first argument of `listen` function in Procedural Renderer is:\n // - either a target name (as a string) in case of global target (window, document, body)\n // - or element reference (in all other cases)\n listenerFn = wrapListener(tNode, lView, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n\n } else {\n listenerFn = wrapListener(tNode, lView, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n }\n\n // subscribe to directive outputs\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(tNode, BindingDirection.Output);\n }\n\n const outputs = tNode.outputs;\n let props: PropertyAliasValue|undefined;\n if (processOutputs && outputs && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n const lCleanup = getCleanup(lView);\n for (let i = 0; i < propsLength; i += 3) {\n const index = props[i] as number;\n ngDevMode && assertDataInRange(lView, index);\n const minifiedName = props[i + 2];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isObservable(output)) {\n throw new Error(\n `@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n }\n\n const subscription = output.subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView, listenerFn: (e?: any) => any, e: any): boolean {\n try {\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n handleError(lView, error);\n return false;\n }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n tNode: TNode, lView: LView, listenerFn: (e?: any) => any,\n wrapWithPreventDefault: boolean): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: Event) {\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView =\n tNode.flags & TNodeFlags.isComponent ? getComponentViewByIndex(tNode.index, lView) : lView;\n\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & LViewFlags.ManualOnPush) === 0) {\n markViewDirty(startView);\n }\n\n let result = executeListenerWithErrorHandling(lView, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n\n return result;\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 */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\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 */\nimport {TAttributes, TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {TVIEW, T_HOST} from '../interfaces/view';\nimport {appendProjectedNodes} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, setIsNotParent} from '../state';\nimport {findComponentView} from '../util/view_traversal_utils';\nimport {getOrCreateTNode} from './shared';\n\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(tNode: TNode, projectionSlots: ProjectionSlots): number|\n null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode | null)[] = componentNode.projection =\n new Array(numProjectionSlots).fill(null);\n const tails: (TNode | null)[] = projectionHeads.slice();\n\n let componentChild: TNode|null = componentNode.child;\n\n while (componentChild !== null) {\n const slotIndex =\n projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex] !.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\nlet delayProjection = false;\nexport function setDelayProjection(value: boolean) {\n delayProjection = value;\n}\n\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n*/\nexport function ɵɵprojection(\n nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {\n const lView = getLView();\n const tProjectionNode = getOrCreateTNode(\n lView[TVIEW], lView[T_HOST], nodeIndex, TNodeType.Projection, null, attrs || null);\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n\n // `<ng-content>` has no content\n setIsNotParent();\n\n // We might need to delay the projection of nodes if they are in the middle of an i18n block\n if (!delayProjection) {\n // re-distribution of projectable nodes is stored on a component's view level\n appendProjectedNodes(lView, tProjectionNode, selectorIndex, findComponentView(lView));\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, elementPropertyInternal} from './shared';\n\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009 {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string, prefix: string, v0: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The a collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n\n const interpolatedValue = ɵɵinterpolationV(values);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolateV;\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 */\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {TNodeType} from '../interfaces/node';\nimport {RText, isProceduralRenderer} from '../interfaces/renderer';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getLView, getSelectedIndex, setIsNotParent} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {bind} from './property';\nimport {getOrCreateTNode, textBindingInternal} from './shared';\n\n\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Value to write. This value will be stringified.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value?: any): void {\n const lView = getLView();\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'text nodes should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);\n ngDevMode && ngDevMode.rendererSetText++;\n const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, TNodeType.Element, null, null);\n\n // Text nodes are self closing.\n setIsNotParent();\n appendChild(textNative, tNode, lView);\n}\n\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper interpolation(1-8) method\n *\n * @param value Stringified value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtextBinding<T>(value: T | NO_CHANGE): void {\n const lView = getLView();\n const index = getSelectedIndex();\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n textBindingInternal(lView, index, renderStringify(bound));\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 */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, textBindingInternal} from './shared';\n\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): TsickleIssue1009 {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The a collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolateV;\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 */\nimport '../util/ng_dev_mode';\n\nimport {getLContext} from './context_discovery';\nimport {scheduleTick} from './instructions/shared';\nimport {ComponentInstance, DirectiveInstance, Player} from './interfaces/player';\nimport {RootContextFlags} from './interfaces/view';\nimport {addPlayerInternal, getOrCreatePlayerContext, getPlayerContext, getPlayersInternal, getStylingContextFromLView, throwInvalidRefError} from './styling/util';\nimport {getRootContext} from './util/view_traversal_utils';\n\n\n/**\n * Adds a player to an element, directive or component instance that will later be\n * animated once change detection has passed.\n *\n * When a player is added to a reference it will stay active until `player.destroy()`\n * is called. Once called then the player will be removed from the active players\n * present on the associated ref instance.\n *\n * To get a list of all the active players on an element see [getPlayers].\n *\n * @param ref The element, directive or component that the player will be placed on.\n * @param player The player that will be triggered to play once change detection has run.\n */\nexport function addPlayer(\n ref: ComponentInstance | DirectiveInstance | HTMLElement, player: Player): void {\n const context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return;\n }\n\n const element = context.native as HTMLElement;\n const lView = context.lView;\n const playerContext = getOrCreatePlayerContext(element, context) !;\n const rootContext = getRootContext(lView);\n addPlayerInternal(playerContext, rootContext, element, player, 0, ref);\n scheduleTick(rootContext, RootContextFlags.FlushPlayers);\n}\n\n/**\n * Returns a list of all the active players present on the provided ref instance (which can\n * be an instance of a directive, component or element).\n *\n * This function will only return players that have been added to the ref instance using\n * `addPlayer` or any players that are active through any template styling bindings\n * (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).\n *\n * @publicApi\n */\nexport function getPlayers(ref: ComponentInstance | DirectiveInstance | HTMLElement): Player[] {\n const context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return [];\n }\n\n const stylingContext = getStylingContextFromLView(context.nodeIndex, context.lView);\n const playerContext = stylingContext ? getPlayerContext(stylingContext) : null;\n return playerContext ? getPlayersInternal(playerContext) : [];\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\nimport {Injector} from '../../di/injector';\n\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext} from '../context_discovery';\nimport {NodeInjector} from '../di';\nimport {LContext} from '../interfaces/context';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {CLEANUP, CONTEXT, FLAGS, HOST, LView, LViewFlags, TVIEW} from '../interfaces/view';\nimport {stringifyForError} from './misc_utils';\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {unwrapRNode} from './view_utils';\n\n\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getComponent<T = {}>(element: Element): T|null {\n const context = loadLContextFromNode(element);\n\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n\n return context.component as T;\n}\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getContext<T = {}>(element: Element): T|null {\n const context = loadLContextFromNode(element) !;\n return context.lView[CONTEXT] as T;\n}\n\n/**\n * Returns the component instance associated with view which owns the DOM element (`null`\n * otherwise).\n *\n * @param element DOM element which is owned by an existing component's view.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getViewComponent(<child-comp>) instanceof MyApp).toBeTruthy();\n * expect(getViewComponent(<my-app>)).toEqual(null);\n * ```\n *\n * @publicApi\n */\nexport function getViewComponent<T = {}>(element: Element | {}): T|null {\n const context = loadLContext(element) !;\n let lView = context.lView;\n let parent: LView|null;\n ngDevMode && assertLView(lView);\n while (lView[HOST] === null && (parent = getLViewParent(lView) !)) {\n // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`\n lView = parent;\n }\n return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieve all root components.\n *\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getRootComponents(target: {}): any[] {\n return [...getRootContext(target).components];\n}\n\n/**\n * Retrieves an `Injector` associated with the element, component or directive.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getInjector(target: {}): Injector {\n const context = loadLContext(target);\n const tNode = context.lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, context.lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n * @publicApi\n */\nexport function getInjectionTokens(element: Element): any[] {\n const context = loadLContext(element, false);\n if (!context) return [];\n const lView = context.lView;\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex] as TNode;\n const providerTokens: any[] = [];\n const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n\n/**\n * Retrieves directives associated with a given DOM host element.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getDirectives(target: {}): Array<{}> {\n const context = loadLContext(target) !;\n\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n }\n\n return context.directives || [];\n}\n\n/**\n * Returns LContext associated with a target passed as an argument.\n * Throws if a given target doesn't have associated LContext.\n *\n */\nexport function loadLContext(target: {}): LContext;\nexport function loadLContext(target: {}, throwOnNotFound: false): LContext|null;\nexport function loadLContext(target: {}, throwOnNotFound: boolean = true): LContext|null {\n const context = getLContext(target);\n if (!context && throwOnNotFound) {\n throw new Error(\n ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` :\n 'Invalid ng target');\n }\n return context;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = loadLContext(target) !;\n\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param directive Component or Directive for which the host element should be retrieved.\n *\n * @publicApi\n */\nexport function getHostElement<T>(directive: T): Element {\n return getLContext(directive) !.native as never as Element;\n}\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nexport function getRenderedText(component: any): string {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n\nexport function loadLContextFromNode(node: Node): LContext {\n if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Node');\n return loadLContext(node) !;\n}\n\nexport interface Listener {\n name: string;\n element: Element;\n callback: (value: any) => any;\n useCapture: boolean|null;\n}\n\nexport function isBrowserEvents(listener: Listener): boolean {\n // Browser events are those which don't have `useCapture` as boolean.\n return typeof listener.useCapture === 'boolean';\n}\n\n\n/**\n * Retrieves a list of DOM listeners.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div (click)=\"doSomething()\">\n * </div>\n * </mp-app>\n *\n * expect(getListeners(<div>)).toEqual({\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * });\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @publicApi\n */\nexport function getListeners(element: Element): Listener[] {\n const lContext = loadLContextFromNode(element);\n const lView = lContext.lView;\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners: Listener[] = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name: string = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const useCapture = typeof useCaptureOrIndx === 'boolean' ?\n useCaptureOrIndx :\n (useCaptureOrIndx >= 0 ? false : null);\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture});\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\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 */\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\n\nimport {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getPlayers, getRootComponents, getViewComponent, markDirty} from '../global_utils_api';\n\n\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --define=compile=aot\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getViewComponent', getViewComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('getPlayers', getPlayers);\n publishGlobalUtil('markDirty', markDirty);\n }\n}\n\nexport declare type GlobalDevModeContainer = {\n [GLOBAL_PUBLISH_EXPANDO_KEY]: {[fnName: string]: Function};\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil(name: string, fn: Function): void {\n const w = global as any as GlobalDevModeContainer;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\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// We are temporarily importing the existing viewEngine from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\nimport {Type} from '../core';\nimport {Injector} from '../di/injector';\nimport {Sanitizer} from '../sanitization/security';\nimport {assertDataInRange, assertEqual} from '../util/assert';\n\nimport {assertComponentType} from './assert';\nimport {getComponentDef} from './definition';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';\nimport {registerPostOrderHooks, registerPreOrderHooks} from './hooks';\nimport {CLEAN_PROMISE, addToViewTree, createLView, createTView, getOrCreateTNode, getOrCreateTView, initNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, queueComponentIndexForCheck, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {PlayerHandler} from './interfaces/player';\nimport {RElement, Renderer3, RendererFactory3, domRendererFactory3} from './interfaces/renderer';\nimport {CONTEXT, FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, RENDERER, RootContext, RootContextFlags, TVIEW} from './interfaces/view';\nimport {applyOnCreateInstructions} from './node_util';\nimport {enterView, getPreviousOrParentTNode, leaveView, resetComponentState, setActiveHostElement} from './state';\nimport {renderInitialClasses, renderInitialStyles} from './styling/class_and_style_bindings';\nimport {publishDefaultGlobalUtils} from './util/global_utils';\nimport {defaultScheduler, stringifyForError} from './util/misc_utils';\nimport {getRootContext} from './util/view_traversal_utils';\nimport {readPatchedLView, resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/** Options that control how the component should be bootstrapped. */\nexport interface CreateComponentOptions {\n /** Which renderer factory to use. */\n rendererFactory?: RendererFactory3;\n\n /** A custom sanitizer instance */\n sanitizer?: Sanitizer;\n\n /** A custom animation player handler */\n playerHandler?: PlayerHandler;\n\n /**\n * Host element on which the component will be bootstrapped. If not specified,\n * the component definition's `tag` is used to query the existing DOM for the\n * element to bootstrap.\n */\n host?: RElement|string;\n\n /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */\n injector?: Injector;\n\n /**\n * List of features to be applied to the created component. Features are simply\n * functions that decorate a component with a certain behavior.\n *\n * Typically, the features in this list are features that cannot be added to the\n * other features list in the component definition because they rely on other factors.\n *\n * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities\n * to root components in a tree-shakable way. It cannot be added to the component\n * features list because there's no way of knowing when the component will be used as\n * a root component.\n */\n hostFeatures?: HostFeature[];\n\n /**\n * A function which is used to schedule change detection work in the future.\n *\n * When marking components as dirty, it is necessary to schedule the work of\n * change detection in the future. This is done to coalesce multiple\n * {@link markDirty} calls into a single changed detection processing.\n *\n * The default value of the scheduler is the `requestAnimationFrame` function.\n *\n * It is also useful to override this function for testing purposes.\n */\n scheduler?: (work: () => void) => void;\n}\n\n/** See CreateComponentOptions.hostFeatures */\ntype HostFeature = (<T>(component: T, componentDef: ComponentDef<T>) => void);\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nexport const NULL_INJECTOR: Injector = {\n get: (token: any, notFoundValue?: any) => {\n throw new Error('NullInjector: Not found: ' + stringifyForError(token));\n }\n};\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nexport function renderComponent<T>(\n componentType: ComponentType<T>|\n Type<T>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n ,\n opts: CreateComponentOptions = {}): T {\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n\n // this is preemptively set to avoid having test and debug code accidentally\n // read data from a previous application state...\n setActiveHostElement(null);\n\n const rendererFactory = opts.rendererFactory || domRendererFactory3;\n const sanitizer = opts.sanitizer || null;\n const componentDef = getComponentDef<T>(componentType) !;\n if (componentDef.type != componentType) componentDef.type = componentType;\n\n // The first index of the first selector is the tag name.\n const componentTag = componentDef.selectors ![0] ![0] as string;\n const hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);\n const rootFlags = componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n\n const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n const rootView: LView = createLView(\n null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null,\n rendererFactory, renderer, undefined, opts.injector || null);\n\n const oldView = enterView(rootView, null);\n let component: T;\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n if (rendererFactory.begin) rendererFactory.begin();\n const componentView = createRootComponentView(\n hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(\n componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n\n addToViewTree(rootView, componentView);\n\n refreshDescendantViews(rootView); // creation mode pass\n rootView[FLAGS] &= ~LViewFlags.CreationMode;\n resetPreOrderHookFlags(rootView);\n refreshDescendantViews(rootView); // update mode pass\n safeToRunHooks = true;\n } finally {\n leaveView(oldView, safeToRunHooks);\n if (rendererFactory.end) rendererFactory.end();\n }\n\n return component;\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param renderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nexport function createRootComponentView(\n rNode: RElement | null, def: ComponentDef<any>, rootView: LView,\n rendererFactory: RendererFactory3, renderer: Renderer3, sanitizer?: Sanitizer | null): LView {\n resetComponentState();\n const tView = rootView[TVIEW];\n ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);\n rootView[0 + HEADER_OFFSET] = rNode;\n const tNode: TElementNode = getOrCreateTNode(tView, null, 0, TNodeType.Element, null, null);\n const componentView = createLView(\n rootView, getOrCreateTView(def), null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);\n\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = TNodeFlags.isComponent;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n\n // Store component view at node index, with node as the HOST\n return rootView[HEADER_OFFSET] = componentView;\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nexport function createRootComponent<T>(\n componentView: LView, componentDef: ComponentDef<T>, rootView: LView, rootContext: RootContext,\n hostFeatures: HostFeature[] | null): any {\n const tView = rootView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n const component = instantiateRootComponent(tView, rootView, componentDef);\n\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n\n hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n componentDef.contentQueries(RenderFlags.Create, component, rootView.length - 1);\n }\n\n const rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass && componentDef.hostBindings) {\n const elementIndex = rootTNode.index - HEADER_OFFSET;\n setActiveHostElement(elementIndex);\n\n const expando = tView.expandoInstructions !;\n invokeHostBindingsInCreationMode(\n componentDef, expando, component, rootTNode, tView.firstTemplatePass);\n rootTNode.onElementCreationFns && applyOnCreateInstructions(rootTNode);\n\n setActiveHostElement(null);\n }\n\n if (rootTNode.stylingTemplate) {\n const native = componentView[HOST] !as RElement;\n renderInitialClasses(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n renderInitialStyles(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n }\n\n return component;\n}\n\n\nexport function createRootContext(\n scheduler?: (workFn: () => void) => void, playerHandler?: PlayerHandler|null): RootContext {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: RootContextFlags.Empty\n };\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\nexport function LifecycleHooksFeature(component: any, def: ComponentDef<any>): void {\n const rootTView = readPatchedLView(component) ![TVIEW];\n const dirIndex = rootTView.data.length - 1;\n\n registerPreOrderHooks(dirIndex, def, rootTView, -1, -1, -1);\n // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on\n // LNode).\n registerPostOrderHooks(\n rootTView, { directiveStart: dirIndex, directiveEnd: dirIndex + 1 } as TNode);\n}\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nexport function whenRendered(component: any): Promise<null> {\n return getRootContext(component).clean;\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 * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean { return this.firstChange; }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport interface SimpleChanges { [propName: string]: SimpleChange; }\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\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {EMPTY_OBJ} from '../empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\nconst PRIVATE_PREFIX = '__ngOnChanges_';\n\ntype OnChangesExpando = OnChanges & {\n __ngOnChanges_: SimpleChanges|null|undefined;\n // tslint:disable-next-line:no-any Can hold any value\n [key: string]: any;\n};\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature()]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n // This option ensures that the ngOnChanges lifecycle hook will be inherited\n // from superclasses (in InheritDefinitionFeature).\n (NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;\n return NgOnChangesFeatureImpl;\n}\n\nfunction NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>): void {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n definition.onChanges = wrapOnChanges();\n }\n}\n\nfunction wrapOnChanges() {\n return function wrapOnChangesHook_inPreviousChangesStorage(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore && simpleChangesStore.current;\n\n if (current) {\n const previous = simpleChangesStore !.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore !.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore !.current = null;\n this.ngOnChanges(current);\n }\n };\n}\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>, instance: T, value: any, publicName: string, privateName: string): void {\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n\n const declaredName = (this.declaredInputs as{[key: string]: string})[publicName];\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n\n (instance as any)[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null|NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges|null;\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\nimport {Type} from '../../interface/type';\nimport {fillProperties} from '../../util/property';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {adjustActiveDirectiveSuperClassDepthPosition} from '../state';\nimport {isComponentDef} from '../util/view_utils';\n\nimport {ɵɵNgOnChangesFeature} from './ng_onchanges_feature';\n\nfunction getSuperType(type: Type<any>): Type<any>&\n {ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {\n let superType = getSuperType(definition.type);\n\n while (superType) {\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngComponentDef || superType.ngDirectiveDef;\n } else {\n if (superType.ngComponentDef) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngDirectiveDef;\n }\n\n const baseDef = (superType as any).ngBaseDef;\n\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n if (baseDef || superDef) {\n const writeableDef = definition as any;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n }\n\n if (baseDef) {\n const baseViewQuery = baseDef.viewQuery;\n const baseContentQueries = baseDef.contentQueries;\n const baseHostBindings = baseDef.hostBindings;\n baseHostBindings && inheritHostBindings(definition, baseHostBindings);\n baseViewQuery && inheritViewQuery(definition, baseViewQuery);\n baseContentQueries && inheritContentQueries(definition, baseContentQueries);\n fillProperties(definition.inputs, baseDef.inputs);\n fillProperties(definition.declaredInputs, baseDef.declaredInputs);\n fillProperties(definition.outputs, baseDef.outputs);\n }\n\n if (superDef) {\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Inherit hooks\n // Assume super class inheritance feature has already run.\n definition.afterContentChecked =\n definition.afterContentChecked || superDef.afterContentChecked;\n definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n definition.doCheck = definition.doCheck || superDef.doCheck;\n definition.onDestroy = definition.onDestroy || superDef.onDestroy;\n definition.onInit = definition.onInit || superDef.onInit;\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (const feature of features) {\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n }\n }\n } else {\n // Even if we don't have a definition, check the type for the hooks and use those if need be\n const superPrototype = superType.prototype;\n if (superPrototype) {\n definition.afterContentChecked =\n definition.afterContentChecked || superPrototype.ngAfterContentChecked;\n definition.afterContentInit =\n definition.afterContentInit || superPrototype.ngAfterContentInit;\n definition.afterViewChecked =\n definition.afterViewChecked || superPrototype.ngAfterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superPrototype.ngAfterViewInit;\n definition.doCheck = definition.doCheck || superPrototype.ngDoCheck;\n definition.onDestroy = definition.onDestroy || superPrototype.ngOnDestroy;\n definition.onInit = definition.onInit || superPrototype.ngOnInit;\n\n if (superPrototype.ngOnChanges) {\n ɵɵNgOnChangesFeature()(definition);\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(\n definition: DirectiveDef<any>| ComponentDef<any>, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: DirectiveDef<any>| ComponentDef<any>,\n superContentQueries: ContentQueriesFunction<any>) {\n const prevContentQueries = definition.contentQueries;\n\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: DirectiveDef<any>| ComponentDef<any>,\n superHostBindings: HostBindingsFunction<any>) {\n const prevHostBindings = definition.hostBindings;\n // If the subclass does not have a host bindings function, we set the subclass host binding\n // function to be the superclass's (in this feature). We should check if they're the same here\n // to ensure we don't inherit it twice.\n if (superHostBindings !== prevHostBindings) {\n if (prevHostBindings) {\n // because inheritance is unknown during compile time, the runtime code\n // needs to be informed of the super-class depth so that instruction code\n // can distinguish one host bindings function from another. The reason why\n // relying on the directive uniqueId exclusively is not enough is because the\n // uniqueId value and the directive instance stay the same between hostBindings\n // calls throughout the directive inheritance chain. This means that without\n // a super-class depth value, there is no way to know whether a parent or\n // sub-class host bindings function is currently being executed.\n definition.hostBindings = (rf: RenderFlags, ctx: any, elementIndex: number) => {\n // The reason why we increment first and then decrement is so that parent\n // hostBindings calls have a higher id value compared to sub-class hostBindings\n // calls (this way the leaf directive is always at a super-class depth of 0).\n adjustActiveDirectiveSuperClassDepthPosition(1);\n try {\n superHostBindings(rf, ctx, elementIndex);\n } finally {\n adjustActiveDirectiveSuperClassDepthPosition(-1);\n }\n prevHostBindings(rf, ctx, elementIndex);\n };\n } else {\n definition.hostBindings = superHostBindings;\n }\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\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getLView, getPreviousOrParentTNode} from './state';\nimport {isComponentDef} from './util/view_utils';\n\n\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>, providers: Provider[], viewProviders: Provider[]): void {\n const lView = getLView();\n const tView: TView = lView[TVIEW];\n if (tView.firstTemplatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider, tInjectables: TData, lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean, isViewProvider: boolean): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const lView = getLView();\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory: () => any = providerToFactory(provider);\n\n const tNode = getPreviousOrParentTNode();\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isClassProvider(provider) || isTypeProvider(provider)) {\n const prototype = ((provider as ClassProvider).useClass || provider).prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n\n if (ngOnDestroy) {\n const tView = lView[TVIEW];\n (tView.destroyHooks || (tView.destroyHooks = [])).push(tInjectables.length, ngOnDestroy);\n }\n }\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex);\n if (existingFactoryIndex == -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n lView, token);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n lView, token);\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n multiFactoryAdd(\n lInjectablesBlueprint ![isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex],\n providerFactory, !isViewProvider && isComponent);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders !++;\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): void {\n multiFactory.multi !.push(factory);\n if (isComponentProvider) {\n multiFactory.componentProviders !++;\n }\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode): any[] {\n return multiResolve(this.multi !, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode): any[] {\n const factories = this.multi !;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders !;\n const multiProviders = getNodeInjectable(tData, lData, this.providerFactory !.index !, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i] !as() => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any,\n index: number, isViewProvider: boolean, isComponent: boolean,\n f: () => any): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\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 */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ngComponentDef = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * consts: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵselect(0);\n * ɵɵtextBinding(ctx.greeter.greet());\n * }\n * },\n * features: [ProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver =\n (def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\n };\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\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * The host or anchor [element](guide/glossary#element) for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The [host view](guide/glossary#view-tree) defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {propName: string, templateName: string}[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string, templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C>;\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\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {NgModuleRef} from './ng_module_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(\n `No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n (error as any)[ERROR_COMPONENT] = component;\n return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n return (error as any)[ERROR_COMPONENT];\n}\n\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n throw noComponentFactoryError(component);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver();\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n\nexport class CodegenComponentFactoryResolver implements ComponentFactoryResolver {\n private _factories = new Map<any, ComponentFactory<any>>();\n\n constructor(\n factories: ComponentFactory<any>[], private _parent: ComponentFactoryResolver,\n private _ngModule: NgModuleRef<any>) {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n let factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n }\n}\n\nexport class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {\n readonly selector: string;\n readonly componentType: Type<any>;\n readonly ngContentSelectors: string[];\n readonly inputs: {propName: string, templateName: string}[];\n readonly outputs: {propName: string, templateName: string}[];\n\n constructor(private factory: ComponentFactory<C>, private ngModule: NgModuleRef<any>) {\n super();\n this.selector = factory.selector;\n this.componentType = factory.componentType;\n this.ngContentSelectors = factory.ngContentSelectors;\n this.inputs = factory.inputs;\n this.outputs = factory.outputs;\n }\n\n create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C> {\n return this.factory.create(\n injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\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\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the NgModule.\n */\n abstract get injector(): Injector;\n\n /**\n * The ComponentFactoryResolver to get hold of the ComponentFactories\n * declared in the `entryComponents` property of the module.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The NgModule instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Allows to register a callback that will be called when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n}\n\n/**\n * @publicApi\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector|null): NgModuleRef<T>;\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\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {ViewContainerRef as viewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef} from '../linker/view_ref';\n\nimport {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn} from './instructions/shared';\nimport {TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {FLAGS, HOST, LView, LViewFlags, T_HOST} from './interfaces/view';\nimport {destroyLView, renderDetachView} from './node_manipulation';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode} from './util/view_utils';\n\n\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\nexport interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {}\n\nexport class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_InternalViewRef,\n viewEngine_ChangeDetectorRef_interface {\n private _appRef: ApplicationRef|null = null;\n private _viewContainerRef: viewEngine_ViewContainerRef|null = null;\n\n /**\n * @internal\n */\n public _tViewNode: TViewNode|null = null;\n\n /**\n * @internal\n */\n public _lView: LView;\n\n get rootNodes(): any[] {\n if (this._lView[HOST] == null) {\n const tView = this._lView[T_HOST] as TViewNode;\n return collectNativeNodes(this._lView, tView, []);\n }\n return [];\n }\n\n constructor(_lView: LView, private _context: T|null, private _componentIndex: number) {\n this._lView = _lView;\n }\n\n get context(): T { return this._context ? this._context : this._lookUpContext(); }\n\n get destroyed(): boolean {\n return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n const index = this._viewContainerRef.indexOf(this);\n\n if (index > -1) {\n this._viewContainerRef.detach(index);\n }\n\n this._viewContainerRef = null;\n }\n destroyLView(this._lView);\n }\n\n onDestroy(callback: Function) { storeCleanupFn(this._lView, callback); }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck(): void { markViewDirty(this._lView); }\n\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach(): void { this._lView[FLAGS] &= ~LViewFlags.Attached; }\n\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach(): void { this._lView[FLAGS] |= LViewFlags.Attached; }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n detectChanges(): void { detectChangesInternal(this._lView, this.context); }\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges(): void { checkNoChangesInternal(this._lView, this.context); }\n\n attachToViewContainerRef(vcRef: viewEngine_ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n private _lookUpContext(): T {\n return this._context = getLViewParent(this._lView) ![this._componentIndex] as T;\n }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n constructor(public _view: LView) { super(_view, null, -1); }\n\n detectChanges(): void { detectChangesInRootView(this._view); }\n\n checkNoChanges(): void { checkNoChangesInRootView(this._view); }\n\n get context(): T { return null !; }\n}\n\nfunction collectNativeNodes(lView: LView, parentTNode: TNode, result: any[]): any[] {\n let tNodeChild = parentTNode.child;\n\n while (tNodeChild) {\n const nativeNode = getNativeByTNode(tNodeChild, lView);\n nativeNode && result.push(nativeNode);\n if (tNodeChild.type === TNodeType.ElementContainer) {\n collectNativeNodes(lView, tNodeChild, result);\n } else if (tNodeChild.type === TNodeType.Projection) {\n const componentView = findComponentView(lView);\n const componentHost = componentView[T_HOST] as TElementNode;\n const parentView = getLViewParent(componentView);\n let currentProjectedNode: TNode|null =\n (componentHost.projection as(TNode | null)[])[tNodeChild.projection as number];\n\n while (currentProjectedNode && parentView) {\n result.push(getNativeByTNode(currentProjectedNode, parentView));\n currentProjectedNode = currentProjectedNode.next;\n }\n }\n tNodeChild = tNodeChild.next;\n }\n\n return result;\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\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {Injector} from '../di/injector';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef as ViewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, ViewRef as viewEngine_ViewRef} from '../linker/view_ref';\nimport {Renderer2} from '../render/api';\nimport {assertDefined, assertGreaterThan, assertLessThan} from '../util/assert';\n\nimport {NodeInjector, getParentInjectorLocation} from './di';\nimport {addToViewTree, createEmbeddedViewAndNode, createLContainer, renderEmbeddedTemplate} from './instructions/shared';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, VIEW_REFS} from './interfaces/container';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {RComment, RElement, isProceduralRenderer} from './interfaces/renderer';\nimport {CONTEXT, LView, QUERIES, RENDERER, TView, T_HOST} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {addRemoveViewFromContainer, appendChild, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode, removeView} from './node_manipulation';\nimport {getParentInjectorTNode} from './node_util';\nimport {getLView, getPreviousOrParentTNode} from './state';\nimport {getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNode, isComponent, isLContainer, isLView, isRootView, unwrapRNode, viewAttachedToContainer} from './util/view_utils';\nimport {ViewRef} from './view_ref';\n\n\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(ElementRefToken: typeof ViewEngine_ElementRef):\n ViewEngine_ElementRef {\n return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\nlet R3ElementRef: {new (native: RElement | RComment): ViewEngine_ElementRef};\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param ElementRefToken The ElementRef type\n * @param tNode The node for which you'd like an ElementRef\n * @param view The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(\n ElementRefToken: typeof ViewEngine_ElementRef, tNode: TNode,\n view: LView): ViewEngine_ElementRef {\n if (!R3ElementRef) {\n // TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug\n R3ElementRef = class ElementRef_ extends ElementRefToken {};\n }\n return new R3ElementRef(getNativeByTNode(tNode, view) as RElement);\n}\n\nlet R3TemplateRef: {\n new (\n _declarationParentView: LView, elementRef: ViewEngine_ElementRef, _tView: TView,\n _hostLContainer: LContainer, _injectorIndex: number): ViewEngine_TemplateRef<any>\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(\n TemplateRefToken: typeof ViewEngine_TemplateRef,\n ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_TemplateRef<T>|null {\n return createTemplateRef<T>(\n TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param TemplateRefToken The TemplateRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a TemplateRef\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance to use\n */\nexport function createTemplateRef<T>(\n TemplateRefToken: typeof ViewEngine_TemplateRef, ElementRefToken: typeof ViewEngine_ElementRef,\n hostTNode: TNode, hostView: LView): ViewEngine_TemplateRef<T>|null {\n if (!R3TemplateRef) {\n // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug\n R3TemplateRef = class TemplateRef_<T> extends TemplateRefToken<T> {\n constructor(\n private _declarationParentView: LView, readonly elementRef: ViewEngine_ElementRef,\n private _tView: TView, private _hostLContainer: LContainer,\n private _injectorIndex: number) {\n super();\n }\n\n createEmbeddedView(context: T, container?: LContainer, index?: number):\n viewEngine_EmbeddedViewRef<T> {\n const currentQueries = this._declarationParentView[QUERIES];\n // Query container may be missing if this view was created in a directive\n // constructor. Create it now to avoid losing results in embedded views.\n if (currentQueries && this._hostLContainer[QUERIES] == null) {\n this._hostLContainer[QUERIES] = currentQueries !.container();\n }\n const lView = createEmbeddedViewAndNode(\n this._tView, context, this._declarationParentView, this._hostLContainer[QUERIES],\n this._injectorIndex);\n if (container) {\n insertView(lView, container, index !);\n }\n renderEmbeddedTemplate(lView, this._tView, context);\n const viewRef = new ViewRef(lView, context, -1);\n viewRef._tViewNode = lView[T_HOST] as TViewNode;\n return viewRef;\n }\n };\n }\n\n if (hostTNode.type === TNodeType.Container) {\n const hostContainer: LContainer = hostView[hostTNode.index];\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(\n hostView, createElementRef(ElementRefToken, hostTNode, hostView), hostTNode.tViews as TView,\n hostContainer, hostTNode.injectorIndex);\n } else {\n return null;\n }\n}\n\nlet R3ViewContainerRef: {\n new (\n lContainer: LContainer, hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n hostView: LView): ViewEngine_ViewContainerRef\n};\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(\n ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_ViewContainerRef {\n const previousTNode =\n getPreviousOrParentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n ElementRefToken: typeof ViewEngine_ElementRef,\n hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n hostView: LView): ViewEngine_ViewContainerRef {\n if (!R3ViewContainerRef) {\n // TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug\n R3ViewContainerRef = class ViewContainerRef_ extends ViewContainerRefToken {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n private _hostView: LView) {\n super();\n }\n\n get element(): ViewEngine_ElementRef {\n return createElementRef(ElementRefToken, this._hostTNode, this._hostView);\n }\n\n get injector(): Injector { return new NodeInjector(this._hostTNode, this._hostView); }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);\n const parentView = getParentInjectorView(parentLocation, this._hostView);\n const parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);\n\n return !hasParentInjector(parentLocation) || parentTNode == null ?\n new NodeInjector(null, this._hostView) :\n new NodeInjector(parentTNode, parentView);\n }\n\n clear(): void {\n while (this.length) {\n this.remove(0);\n }\n }\n\n get(index: number): viewEngine_ViewRef|null {\n return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS] ![index] || null;\n }\n\n get length(): number {\n // Note that if there are no views, the container\n // length will be smaller than the header offset.\n const viewAmount = this._lContainer.length - CONTAINER_HEADER_OFFSET;\n return viewAmount > 0 ? viewAmount : 0;\n }\n\n createEmbeddedView<C>(templateRef: ViewEngine_TemplateRef<C>, context?: C, index?: number):\n viewEngine_EmbeddedViewRef<C> {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index);\n const viewRef = (templateRef as any)\n .createEmbeddedView(context || <any>{}, this._lContainer, adjustedIdx);\n (viewRef as ViewRef<any>).attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 0, viewRef);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: viewEngine_ComponentFactory<C>, index?: number|undefined,\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n ngModuleRef?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {\n ngModuleRef = contextInjector.get(viewEngine_NgModuleRef, null);\n }\n\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: viewEngine_ViewRef, index?: number): viewEngine_ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n this.allocateContainerIfNeeded();\n const lView = (viewRef as ViewRef<any>)._lView !;\n const adjustedIdx = this._adjustIndex(index);\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, fall back to move() so we clean up\n // references appropriately.\n return this.move(viewRef, adjustedIdx);\n }\n\n insertView(lView, this._lContainer, adjustedIdx);\n\n const beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n addRemoveViewFromContainer(lView, true, beforeNode);\n\n (viewRef as ViewRef<any>).attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 0, viewRef);\n\n return viewRef;\n }\n\n move(viewRef: viewEngine_ViewRef, newIndex: number): viewEngine_ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const index = this.indexOf(viewRef);\n if (index !== -1) this.detach(index);\n this.insert(viewRef, newIndex);\n return viewRef;\n }\n\n indexOf(viewRef: viewEngine_ViewRef): number {\n return this._lContainer[VIEW_REFS] !== null ?\n this._lContainer[VIEW_REFS] !.indexOf(viewRef) :\n 0;\n }\n\n remove(index?: number): void {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainer, adjustedIdx);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 1);\n }\n\n detach(index?: number): viewEngine_ViewRef|null {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n const wasDetached = view && this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 1)[0] != null;\n return wasDetached ? new ViewRef(view !, view ![CONTEXT], -1) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n\n private allocateContainerIfNeeded(): void {\n if (this._lContainer[VIEW_REFS] === null) {\n this._lContainer[VIEW_REFS] = [];\n }\n }\n };\n }\n\n ngDevMode && assertNodeOfPossibleTypes(\n hostTNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n\n let lContainer: LContainer;\n const slotValue = hostView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n lContainer[ACTIVE_INDEX] = -1;\n } else {\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n if (hostTNode.type === TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');\n }\n\n // A container can be created on the root (topmost / bootstrapped) component and in this case we\n // can't use LTree to insert container's marker node (both parent of a comment node and the\n // commend node itself is located outside of elements hold by LTree). In this specific case we\n // use low-level DOM manipulation to insert container's marker (comment) node.\n if (isRootView(hostView)) {\n const renderer = hostView[RENDERER];\n const hostNative = getNativeByTNode(hostTNode, hostView) !;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer, parentOfHostNative !, commentNode, nativeNextSibling(renderer, hostNative));\n } else {\n appendChild(commentNode, hostTNode, hostView);\n }\n\n hostView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostView, commentNode, hostTNode, true);\n\n addToViewTree(hostView, lContainer);\n }\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n}\n\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(): ViewEngine_ChangeDetectorRef {\n return createViewRef(getPreviousOrParentTNode(), getLView(), null);\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param hostTNode The node that is requesting a ChangeDetectorRef\n * @param hostView The view to which the node belongs\n * @param context The context for this change detector ref\n * @returns The ChangeDetectorRef to use\n */\nexport function createViewRef(\n hostTNode: TNode, hostView: LView, context: any): ViewEngine_ChangeDetectorRef {\n if (isComponent(hostTNode)) {\n const componentIndex = hostTNode.directiveStart;\n const componentView = getComponentViewByIndex(hostTNode.index, hostView);\n return new ViewRef(componentView, context, componentIndex);\n } else if (\n hostTNode.type === TNodeType.Element || hostTNode.type === TNodeType.Container ||\n hostTNode.type === TNodeType.ElementContainer) {\n const hostComponentView = findComponentView(hostView);\n return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);\n }\n return null !;\n}\n\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(view: LView): Renderer2 {\n const renderer = view[RENDERER];\n if (isProceduralRenderer(renderer)) {\n return renderer as Renderer2;\n } else {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getPreviousOrParentTNode();\n const nodeAtIndex = getComponentViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\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\nexport function noop(...args: any[]): any {\n // Do nothing.\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\nimport {injectElementRef as render3InjectElementRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * The underlying native element or `null` if direct access to native elements is not supported\n * (e.g. when the application runs in a web worker).\n *\n * <div class=\"callout is-critical\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. Alternatively you can take a look at {@link\n * Renderer2}\n * which provides API that can safely be used even when direct access to native elements is not\n * supported.\n * </p>\n * <p>\n * Relying on direct DOM access creates tight coupling between your application and rendering\n * layers which will make it impossible to separate the two and deploy your application into a\n * web worker.\n * </p>\n * </div>\n *\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) { this.nativeElement = nativeElement; }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);\n}\n\nexport const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = render3InjectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY: typeof render3InjectElementRef =\n SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\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\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {injectRenderer2 as render3InjectRenderer2} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n\n\n/**\n * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n * @publicApi\n */\nexport class RenderComponentType {\n constructor(\n public id: string, public templateUrl: string, public slotCount: number,\n public encapsulation: ViewEncapsulation, public styles: Array<string|any[]>,\n public animations: any) {}\n}\n\n/**\n * @deprecated Debug info is handled internally in the view engine now.\n */\nexport abstract class RenderDebugInfo {\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get source(): string;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nexport interface DirectRenderer {\n remove(node: any): void;\n appendChild(node: any, parent: any): void;\n insertBefore(node: any, refNode: any): void;\n nextSibling(node: any): any;\n parentElement(node: any): any;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n * @publicApi\n */\nexport abstract class Renderer {\n abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any;\n\n abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any;\n\n abstract createViewRoot(hostElement: any): any;\n\n abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any;\n\n abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any;\n\n abstract projectNodes(parentElement: any, nodes: any[]): void;\n\n abstract attachViewAfter(node: any, viewRootNodes: any[]): void;\n\n abstract detachView(viewRootNodes: any[]): void;\n\n abstract destroyView(hostElement: any, viewAllNodes: any[]): void;\n\n abstract listen(renderElement: any, name: string, callback: Function): Function;\n\n abstract listenGlobal(target: string, name: string, callback: Function): Function;\n\n abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;\n\n abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue?: string):\n void;\n\n /**\n * Used only in debug mode to serialize property changes to dom nodes as attributes.\n */\n abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string):\n void;\n\n abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;\n\n abstract setElementStyle(renderElement: any, styleName: string, styleValue?: string): void;\n\n abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;\n\n abstract setText(renderNode: any, text: string): void;\n\n abstract animate(\n element: any, startingStyles: any, keyframes: any[], duration: number, delay: number,\n easing: string, previousPlayers?: any[]): any;\n}\n\nexport const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2Interceptor');\n\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n * @publicApi\n */\nexport abstract class RootRenderer {\n abstract renderComponent(componentType: RenderComponentType): Renderer;\n}\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: (string|any[])[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n}\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2|null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1\n}\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string|null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n // TODO(issue/24571): remove '!'.\n destroyNode !: ((node: any) => void) | null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node that should precede the new node.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * For WebWorkers, always returns true.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * For WebWorkers, always returns a value.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string|null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string|null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window'|'document'|'body'|any, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();\n}\n\n\nexport const SWITCH_RENDERER2_FACTORY__POST_R3__ = render3InjectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY: typeof render3InjectRenderer2 = SWITCH_RENDERER2_FACTORY__PRE_R3__;\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 * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.1.1');\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\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isListLikeIterable, iterateListLike} from '../change_detection_util';\n\nimport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, NgIterable, TrackByFunction} from './iterable_differs';\n\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object|null|undefined): boolean { return isListLikeIterable(obj); }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n public readonly collection !: V[] | Iterable<V>| null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V>|null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V>|null = null;\n private _previousItHead: IterableChangeRecord_<V>|null = null;\n private _itHead: IterableChangeRecord_<V>|null = null;\n private _itTail: IterableChangeRecord_<V>|null = null;\n private _additionsHead: IterableChangeRecord_<V>|null = null;\n private _additionsTail: IterableChangeRecord_<V>|null = null;\n private _movesHead: IterableChangeRecord_<V>|null = null;\n private _movesTail: IterableChangeRecord_<V>|null = null;\n private _removalsHead: IterableChangeRecord_<V>|null = null;\n private _removalsTail: IterableChangeRecord_<V>|null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V>|null = null;\n private _identityChangesTail: IterableChangeRecord_<V>|null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) { this._trackByFn = trackByFn || trackByIdentity; }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (item: IterableChangeRecord<V>, previousIndex: number|null, currentIndex: number|null) =>\n void) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[]|null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> = !nextRemove ||\n nextIt &&\n nextIt.currentIndex ! <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt ! :\n nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt !._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex ! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V>): DefaultIterableDiffer<V>|null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V>|null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as{length: number}).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as{length: number}).length = index;\n }\n\n this._truncate(record);\n (this as{collection: V[] | Iterable<V>}).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n }\n\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V>|null;\n let nextRecord: IterableChangeRecord_<V>|null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = nextRecord) {\n record.previousIndex = record.currentIndex;\n nextRecord = record._nextMoved;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(record: IterableChangeRecord_<V>|null, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V>|null;\n\n if (record === null) {\n previousRecord = this._itTail;\n } else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n\n // Attempt to see if we have seen the item before.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have seen this before, we need to move it forward in the collection.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // Never seen it, check evicted list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_<V>(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n }\n\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(record: IterableChangeRecord_<V>, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V>|null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev !, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record: IterableChangeRecord_<V>|null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V>|null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n } else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V>|null =\n prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n } else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number|null = null;\n previousIndex: number|null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _next: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V>|null = null;\n\n\n constructor(public item: V, public trackById: any) {}\n}\n\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V>|null = null;\n\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n } else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail !._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex !) &&\n looseIdentical(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n\n const prev: IterableChangeRecord_<V>|null = record._prevDup;\n const next: IterableChangeRecord_<V>|null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = this.map.get(key) !;\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n\n get isEmpty(): boolean { return this.map.size === 0; }\n\n clear() { this.map.clear(); }\n}\n\nfunction getPreviousIndex(\n item: any, addRemoveOffset: number, moveOffsets: number[] | null): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\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\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isJsObject} from '../change_detection_util';\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory} from './keyvalue_differs';\n\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean { return obj instanceof Map || isJsObject(obj); }\n\n create<K, V>(): KeyValueDiffer<K, V> { return new DefaultKeyValueDiffer<K, V>(); }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V>|null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V>|null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesTail: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V>|null = null;\n\n get isDirty(): boolean {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any>|{[k: string]: any}|null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\n `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\n\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map: Map<any, any>|{[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n\n this._removalsHead = insertBefore;\n\n for (let record: KeyValueChangeRecord_<K, V>|null = insertBefore; record !== null;\n record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\n\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V>|null,\n record: KeyValueChangeRecord_<K, V>): KeyValueChangeRecord_<K, V>|null {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key) !;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V>|null;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail !._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail !._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V>|{[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach(k => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V|null = null;\n currentValue: V|null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V>|null = null;\n\n constructor(public key: K) {}\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\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T>| Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V>): IterableChanges<V>|null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn:\n (record: IterableChangeRecord<V>, previousIndex: number|null,\n currentIndex: number|null) => void): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed. */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number|null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number|null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * @deprecated v4.0.0 - Use IterableChangeRecord instead.\n * @publicApi\n */\nexport interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}\n\n/**\n * An optional function passed into the `NgForOf` directive that defines how to track\n * changes for items in an iterable.\n * The function takes the iteration index and item ID.\n * When supplied, Angular tracks changes by the return value of the function.\n *\n * @publicApi\n */\nexport interface TrackByFunction<T> { (index: number, item: T): any; }\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])\n });\n\n /**\n * @deprecated v4.0.0 - Should be private\n */\n factories: IterableDifferFactory[];\n constructor(factories: IterableDifferFactory[]) { this.factories = factories; }\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\n }\n\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers) => {\n if (!parent) {\n // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n // to\n // bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend IterableDiffers without a parent injector');\n }\n return IterableDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find(f => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new Error(\n `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\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\nimport {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V>|null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V>|null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V|null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V|null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: KeyValueDiffers,\n providedIn: 'root',\n factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])\n });\n\n /**\n * @deprecated v4.0.0 - Should be private.\n */\n factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) { this.factories = factories; }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n if (!parent) {\n // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n // to bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n }\n return KeyValueDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find(f => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new Error(`Cannot find a differ supporting object '${kv}'`);\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\nimport {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../render3/view_engine_compatibility';\n\n/**\n * Base class for Angular Views, provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occured.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach\n * detach}\n * to implement local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();\n}\n\n\n\nexport const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = render3InjectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = (...args: any[]): any => {};\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY: typeof render3InjectChangeDetectorRef =\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\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\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {WrappedValue, devModeEqual} from './change_detection_util';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy} from './constants';\nexport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nexport {DefaultIterableDiffer} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {\n CollectionChangeRecord,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n IterableDiffers,\n NgIterable,\n TrackByFunction\n} from\n'./differs/iterable_differs';\nexport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\n\n\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\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\nimport {injectTemplateRef as render3InjectTemplateRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and injection contexts of embedded views created from this `TemplateRef`\n * inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract get elementRef(): ElementRef;\n\n /**\n * Instantiates an embedded view based on this template,\n * and attaches it to the view container.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n () => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)\n}\n\nexport const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = render3InjectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY: typeof render3InjectTemplateRef =\n SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\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\nimport {Injector} from '../di/injector';\nimport {injectViewContainerRef as render3InjectViewContainerRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only a single view container.\n *\n * Root elements of views attached to this container become siblings of the anchor element in\n * the rendered view.\n *\n * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef|null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory The factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes\n * @param ngModule\n *\n * @returns The new component instance, containing the host view.\n *\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef|null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n () => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef)\n}\n\nexport const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = render3InjectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY: typeof render3InjectViewContainerRef =\n SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\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\nimport {getDebugContext} from '../errors';\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER} from '../util/errors';\n\nimport {DebugContext} from './types';\n\nexport function expressionChangedAfterItHasBeenCheckedError(\n context: DebugContext, oldValue: any, currValue: any, isFirstCheck: boolean): Error {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n if (isFirstCheck) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n return viewDebugError(msg, context);\n}\n\nexport function viewWrappedDebugError(err: any, context: DebugContext): Error {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\n\nexport function viewDebugError(msg: string, context: DebugContext): Error {\n const err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\n\nfunction _addDebugContext(err: Error, context: DebugContext) {\n (err as any)[ERROR_DEBUG_CONTEXT] = context;\n (err as any)[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nexport function isViewDebugError(err: Error): boolean {\n return !!getDebugContext(err);\n}\n\nexport function viewDestroyedError(action: string): Error {\n return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\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\nimport {Injector} from '../di';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2, RendererFactory2, RendererType2} from '../render/api';\nimport {Sanitizer, SecurityContext} from '../sanitization/security';\n\n\n\n// -------------------------------------\n// Defs\n// -------------------------------------\n\n/**\n * Factory for ViewDefinitions/NgModuleDefinitions.\n * We use a function so we can reexeute it in case an error happens and use the given logger\n * function to log the error from the definition of the node, which is shown in all browser\n * logs.\n */\nexport interface DefinitionFactory<D extends Definition<any>> { (logger: NodeLogger): D; }\n\n/**\n * Function to call console.error at the right source location. This is an indirection\n * via another function as browser will log the location that actually called\n * `console.error`.\n */\nexport interface NodeLogger { (): () => void; }\n\nexport interface Definition<DF extends DefinitionFactory<any>> { factory: DF|null; }\n\nexport interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {\n providers: NgModuleProviderDef[];\n providersByKey: {[tokenKey: string]: NgModuleProviderDef};\n modules: any[];\n isRoot: boolean;\n}\n\nexport interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}\n\nexport interface ViewDefinition extends Definition<ViewDefinitionFactory> {\n flags: ViewFlags;\n updateDirectives: ViewUpdateFn;\n updateRenderer: ViewUpdateFn;\n handleEvent: ViewHandleEventFn;\n /**\n * Order: Depth first.\n * Especially providers are before elements / anchors.\n */\n nodes: NodeDef[];\n /** aggregated NodeFlags for all nodes **/\n nodeFlags: NodeFlags;\n rootNodeFlags: NodeFlags;\n lastRenderRootNode: NodeDef|null;\n bindingCount: number;\n outputCount: number;\n /**\n * Binary or of all query ids that are matched by one of the nodes.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n nodeMatchedQueries: number;\n}\n\nexport interface ViewDefinitionFactory extends DefinitionFactory<ViewDefinition> {}\n\n\nexport interface ViewUpdateFn { (check: NodeCheckFn, view: ViewData): void; }\n\n// helper functions to create an overloaded function type.\nexport interface NodeCheckFn {\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;\n\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;\n}\n\nexport const enum ArgumentType {Inline = 0, Dynamic = 1}\n\nexport interface ViewHandleEventFn {\n (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;\n}\n\n/**\n * Bitmask for ViewDefinition.flags.\n */\nexport const enum ViewFlags {\n None = 0,\n OnPush = 1 << 1,\n}\n\n/**\n * A node definition in the view.\n *\n * Note: We use one type for all nodes so that loops that loop over all nodes\n * of a ViewDefinition stay monomorphic!\n */\nexport interface NodeDef {\n flags: NodeFlags;\n // Index of the node in view data and view definition (those are the same)\n nodeIndex: number;\n // Index of the node in the check functions\n // Differ from nodeIndex when nodes are added or removed at runtime (ie after compilation)\n checkIndex: number;\n parent: NodeDef|null;\n renderParent: NodeDef|null;\n /** this is checked against NgContentDef.index to find matched nodes */\n ngContentIndex: number|null;\n /** number of transitive children */\n childCount: number;\n /** aggregated NodeFlags for all transitive children (does not include self) **/\n childFlags: NodeFlags;\n /** aggregated NodeFlags for all direct children (does not include self) **/\n directChildFlags: NodeFlags;\n\n bindingIndex: number;\n bindings: BindingDef[];\n bindingFlags: BindingFlags;\n outputIndex: number;\n outputs: OutputDef[];\n /**\n * references that the user placed on the element\n */\n references: {[refId: string]: QueryValueType};\n /**\n * ids and value types of all queries that are matched by this node.\n */\n matchedQueries: {[queryId: number]: QueryValueType};\n /** Binary or of all matched query ids of this node. */\n matchedQueryIds: number;\n /**\n * Binary or of all query ids that are matched by one of the children.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n childMatchedQueries: number;\n element: ElementDef|null;\n provider: ProviderDef|null;\n text: TextDef|null;\n query: QueryDef|null;\n ngContent: NgContentDef|null;\n}\n\n/**\n * Bitmask for NodeDef.flags.\n * Naming convention:\n * - `Type...`: flags that are mutually exclusive\n * - `Cat...`: union of multiple `Type...` (short for category).\n */\nexport const enum NodeFlags {\n None = 0,\n TypeElement = 1 << 0,\n TypeText = 1 << 1,\n ProjectedTemplate = 1 << 2,\n CatRenderNode = TypeElement | TypeText,\n TypeNgContent = 1 << 3,\n TypePipe = 1 << 4,\n TypePureArray = 1 << 5,\n TypePureObject = 1 << 6,\n TypePurePipe = 1 << 7,\n CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n TypeValueProvider = 1 << 8,\n TypeClassProvider = 1 << 9,\n TypeFactoryProvider = 1 << 10,\n TypeUseExistingProvider = 1 << 11,\n LazyProvider = 1 << 12,\n PrivateProvider = 1 << 13,\n TypeDirective = 1 << 14,\n Component = 1 << 15,\n CatProviderNoDirective =\n TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n CatProvider = CatProviderNoDirective | TypeDirective,\n OnInit = 1 << 16,\n OnDestroy = 1 << 17,\n DoCheck = 1 << 18,\n OnChanges = 1 << 19,\n AfterContentInit = 1 << 20,\n AfterContentChecked = 1 << 21,\n AfterViewInit = 1 << 22,\n AfterViewChecked = 1 << 23,\n EmbeddedViews = 1 << 24,\n ComponentView = 1 << 25,\n TypeContentQuery = 1 << 26,\n TypeViewQuery = 1 << 27,\n StaticQuery = 1 << 28,\n DynamicQuery = 1 << 29,\n TypeNgModule = 1 << 30,\n CatQuery = TypeContentQuery | TypeViewQuery,\n\n // mutually exclusive values...\n Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport interface BindingDef {\n flags: BindingFlags;\n ns: string|null;\n name: string|null;\n nonMinifiedName: string|null;\n securityContext: SecurityContext|null;\n suffix: string|null;\n}\n\nexport const enum BindingFlags {\n TypeElementAttribute = 1 << 0,\n TypeElementClass = 1 << 1,\n TypeElementStyle = 1 << 2,\n TypeProperty = 1 << 3,\n SyntheticProperty = 1 << 4,\n SyntheticHostProperty = 1 << 5,\n CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n // mutually exclusive values...\n Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport interface OutputDef {\n type: OutputType;\n target: 'window'|'document'|'body'|'component'|null;\n eventName: string;\n propName: string|null;\n}\n\nexport const enum OutputType {ElementOutput, DirectiveOutput}\n\nexport const enum QueryValueType {\n ElementRef = 0,\n RenderElement = 1,\n TemplateRef = 2,\n ViewContainerRef = 3,\n Provider = 4\n}\n\nexport interface ElementDef {\n // set to null for `<ng-container>`\n name: string|null;\n ns: string|null;\n /** ns, name, value */\n attrs: [string, string, string][]|null;\n template: ViewDefinition|null;\n componentProvider: NodeDef|null;\n componentRendererType: RendererType2|null;\n // closure to allow recursive components\n componentView: ViewDefinitionFactory|null;\n /**\n * visible public providers for DI in the view,\n * as see from this element. This does not include private providers.\n */\n publicProviders: {[tokenKey: string]: NodeDef}|null;\n /**\n * same as visiblePublicProviders, but also includes private providers\n * that are located on this element.\n */\n allProviders: {[tokenKey: string]: NodeDef}|null;\n handleEvent: ElementHandleEventFn|null;\n}\n\nexport interface ElementHandleEventFn { (view: ViewData, eventName: string, event: any): boolean; }\n\nexport interface ProviderDef {\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface NgModuleProviderDef {\n flags: NodeFlags;\n index: number;\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface DepDef {\n flags: DepFlags;\n token: any;\n tokenKey: string;\n}\n\n/**\n * Bitmask for DI flags\n */\nexport const enum DepFlags {\n None = 0,\n SkipSelf = 1 << 0,\n Optional = 1 << 1,\n Self = 1 << 2,\n Value = 1 << 3,\n}\n\nexport interface TextDef { prefix: string; }\n\nexport interface QueryDef {\n id: number;\n // variant of the id that can be used to check against NodeDef.matchedQueryIds, ...\n filterId: number;\n bindings: QueryBindingDef[];\n}\n\nexport interface QueryBindingDef {\n propName: string;\n bindingType: QueryBindingType;\n}\n\nexport const enum QueryBindingType {First = 0, All = 1}\n\nexport interface NgContentDef {\n /**\n * this index is checked against NodeDef.ngContentIndex to find the nodes\n * that are matched by this ng-content.\n * Note that a NodeDef with an ng-content can be reprojected, i.e.\n * have a ngContentIndex on its own.\n */\n index: number;\n}\n\n// -------------------------------------\n// Data\n// -------------------------------------\n\nexport interface NgModuleData extends Injector, NgModuleRef<any> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _def: NgModuleDefinition;\n _parent: Injector;\n _providers: any[];\n}\n\n/**\n * View instance data.\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ViewData {\n def: ViewDefinition;\n root: RootData;\n renderer: Renderer2;\n // index of component provider / anchor.\n parentNodeDef: NodeDef|null;\n parent: ViewData|null;\n viewContainerParent: ViewData|null;\n component: any;\n context: any;\n // Attention: Never loop over this, as this will\n // create a polymorphic usage site.\n // Instead: Always loop over ViewDefinition.nodes,\n // and call the right accessor (e.g. `elementData`) based on\n // the NodeType.\n nodes: {[key: number]: NodeData};\n state: ViewState;\n oldValues: any[];\n disposables: DisposableFn[]|null;\n initIndex: number;\n}\n\n/**\n * Bitmask of states\n */\nexport const enum ViewState {\n BeforeFirstCheck = 1 << 0,\n FirstCheck = 1 << 1,\n Attached = 1 << 2,\n ChecksEnabled = 1 << 3,\n IsProjectedView = 1 << 4,\n CheckProjectedView = 1 << 5,\n CheckProjectedViews = 1 << 6,\n Destroyed = 1 << 7,\n\n // InitState Uses 3 bits\n InitState_Mask = 7 << 8,\n InitState_BeforeInit = 0 << 8,\n InitState_CallingOnInit = 1 << 8,\n InitState_CallingAfterContentInit = 2 << 8,\n InitState_CallingAfterViewInit = 3 << 8,\n InitState_AfterInit = 4 << 8,\n\n CatDetectChanges = Attached | ChecksEnabled,\n CatInit = BeforeFirstCheck | CatDetectChanges | InitState_BeforeInit\n}\n\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nexport function shiftInitState(\n view: ViewData, priorInitState: ViewState, newInitState: ViewState): boolean {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n const state = view.state;\n const initState = state & ViewState.InitState_Mask;\n if (initState === priorInitState) {\n view.state = (state & ~ViewState.InitState_Mask) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nexport function shouldCallLifecycleInitHook(\n view: ViewData, initState: ViewState, index: number): boolean {\n if ((view.state & ViewState.InitState_Mask) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n\nexport interface DisposableFn { (): void; }\n\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nexport class NodeData { private __brand: any; }\n\n/**\n * Data for an instantiated NodeType.Text.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface TextData { renderText: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asTextData(view: ViewData, index: number): TextData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Element.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ElementData {\n renderElement: any;\n componentView: ViewData;\n viewContainer: ViewContainerData|null;\n template: TemplateData;\n}\n\nexport interface ViewContainerData extends ViewContainerRef {\n // Note: we are using the prefix _ as ViewContainerData is a ViewContainerRef and therefore\n // directly\n // exposed to the user.\n _embeddedViews: ViewData[];\n}\n\nexport interface TemplateData extends TemplateRef<any> {\n // views that have been created from the template\n // of this element,\n // but inserted into the embeddedViews of another element.\n // By default, this is undefined.\n // Note: we are using the prefix _ as TemplateData is a TemplateRef and therefore directly\n // exposed to the user.\n _projectedViews: ViewData[];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asElementData(view: ViewData, index: number): ElementData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Provider.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ProviderData { instance: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asProviderData(view: ViewData, index: number): ProviderData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.PureExpression.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface PureExpressionData { value: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asPureExpressionData(view: ViewData, index: number): PureExpressionData {\n return <any>view.nodes[index];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asQueryList(view: ViewData, index: number): QueryList<any> {\n return <any>view.nodes[index];\n}\n\nexport interface RootData {\n injector: Injector;\n ngModule: NgModuleRef<any>;\n projectableNodes: any[][];\n selectorOrNode: any;\n renderer: Renderer2;\n rendererFactory: RendererFactory2;\n errorHandler: ErrorHandler;\n sanitizer: Sanitizer;\n}\n\nexport abstract class DebugContext {\n abstract get view(): ViewData;\n abstract get nodeIndex(): number|null;\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get componentRenderElement(): any;\n abstract get renderNode(): any;\n abstract logError(console: Console, ...values: any[]): void;\n}\n\n// -------------------------------------\n// Other\n// -------------------------------------\n\nexport const enum CheckType {CheckAndUpdate, CheckNoChanges}\n\nexport interface ProviderOverride {\n token: any;\n flags: NodeFlags;\n value: any;\n deps: ([DepFlags, any]|any)[];\n deprecatedBehavior: boolean;\n}\n\nexport interface Services {\n setCurrentNode(view: ViewData, nodeIndex: number): void;\n createRootView(\n injector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData;\n createEmbeddedView(parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any):\n ViewData;\n createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData;\n createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any>;\n overrideProvider(override: ProviderOverride): void;\n overrideComponentView(compType: Type<any>, compFactory: ComponentFactory<any>): void;\n clearOverrides(): void;\n checkAndUpdateView(view: ViewData): void;\n checkNoChangesView(view: ViewData): void;\n destroyView(view: ViewData): void;\n resolveDep(\n view: ViewData, elDef: NodeDef|null, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue?: any): any;\n createDebugContext(view: ViewData, nodeIndex: number): DebugContext;\n handleEvent: ViewHandleEventFn;\n updateDirectives: (view: ViewData, checkType: CheckType) => void;\n updateRenderer: (view: ViewData, checkType: CheckType) => void;\n dirtyParentQueries: (view: ViewData) => void;\n}\n\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nexport const Services: Services = {\n setCurrentNode: undefined !,\n createRootView: undefined !,\n createEmbeddedView: undefined !,\n createComponentView: undefined !,\n createNgModuleRef: undefined !,\n overrideProvider: undefined !,\n overrideComponentView: undefined !,\n clearOverrides: undefined !,\n checkAndUpdateView: undefined !,\n checkNoChangesView: undefined !,\n destroyView: undefined !,\n resolveDep: undefined !,\n createDebugContext: undefined !,\n handleEvent: undefined !,\n updateDirectives: undefined !,\n updateRenderer: undefined !,\n dirtyParentQueries: undefined !,\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\nimport {WrappedValue, devModeEqual} from '../change_detection/change_detection';\nimport {SOURCE} from '../di/injector_compatibility';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {looseIdentical} from '../util/comparison';\nimport {stringify} from '../util/stringify';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {BindingDef, BindingFlags, Definition, DefinitionFactory, DepDef, DepFlags, ElementData, NodeDef, NodeFlags, QueryValueType, Services, ViewData, ViewDefinition, ViewDefinitionFactory, ViewFlags, ViewState, asElementData, asTextData} from './types';\n\nexport const NOOP: any = () => {};\n\nconst _tokenKeyCache = new Map<any, string>();\n\nexport function tokenKey(token: any): string {\n let key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\n\nexport function unwrapValue(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\n\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createRendererType2(values: {\n styles: (string | any[])[],\n encapsulation: ViewEncapsulation,\n data: {[kind: string]: any[]}\n}): RendererType2 {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\n\nlet _renderCompCount = 0;\n\nexport function resolveRendererType2(type?: RendererType2 | null): RendererType2|null {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n const isFilled =\n ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = `c${_renderCompCount++}`;\n } else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\n\nexport function checkBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n const oldValues = view.oldValues;\n if ((view.state & ViewState.FirstCheck) ||\n !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\n\nexport function checkAndUpdateBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\n\nexport function checkBindingNoChanges(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & ViewState.BeforeFirstCheck) || !devModeEqual(oldValue, value)) {\n const bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`,\n `${bindingName}: ${value}`, (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function markParentViewsForCheck(view: ViewData) {\n let currView: ViewData|null = view;\n while (currView) {\n if (currView.def.flags & ViewFlags.OnPush) {\n currView.state |= ViewState.ChecksEnabled;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function markParentViewsForCheckProjectedViews(view: ViewData, endView: ViewData) {\n let currView: ViewData|null = view;\n while (currView && currView !== endView) {\n currView.state |= ViewState.CheckProjectedViews;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function dispatchEvent(\n view: ViewData, nodeIndex: number, eventName: string, event: any): boolean|undefined {\n try {\n const nodeDef = view.def.nodes[nodeIndex];\n const startView = nodeDef.flags & NodeFlags.ComponentView ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n } catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\n\nexport function declaredViewContainer(view: ViewData): ElementData|null {\n if (view.parent) {\n const parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef !.nodeIndex);\n }\n return null;\n}\n\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nexport function viewParentEl(view: ViewData): NodeDef|null {\n const parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef !.parent;\n } else {\n return null;\n }\n}\n\nexport function renderNode(view: ViewData, def: NodeDef): any {\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return asElementData(view, def.nodeIndex).renderElement;\n case NodeFlags.TypeText:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\n\nexport function elementEventFullName(target: string | null, name: string): string {\n return target ? `${target}:${name}` : name;\n}\n\nexport function isComponentView(view: ViewData): boolean {\n return !!view.parent && !!(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function isEmbeddedView(view: ViewData): boolean {\n return !!view.parent && !(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function filterQueryId(queryId: number): number {\n return 1 << (queryId % 32);\n}\n\nexport function splitMatchedQueriesDsl(\n matchedQueriesDsl: [string | number, QueryValueType][] | null): {\n matchedQueries: {[queryId: string]: QueryValueType},\n references: {[refId: string]: QueryValueType},\n matchedQueryIds: number\n} {\n const matchedQueries: {[queryId: string]: QueryValueType} = {};\n let matchedQueryIds = 0;\n const references: {[refId: string]: QueryValueType} = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(([queryId, valueType]) => {\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n } else {\n references[queryId] = valueType;\n }\n });\n }\n return {matchedQueries, references, matchedQueryIds};\n}\n\nexport function splitDepsDsl(deps: ([DepFlags, any] | any)[], sourceName?: string): DepDef[] {\n return deps.map(value => {\n let token: any;\n let flags: DepFlags;\n if (Array.isArray(value)) {\n [flags, token] = value;\n } else {\n flags = DepFlags.None;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, {value: sourceName, configurable: true});\n }\n return {flags, token, tokenKey: tokenKey(token)};\n });\n}\n\nexport function getParentRenderElement(view: ViewData, renderHost: any, def: NodeDef): any {\n let renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & NodeFlags.TypeElement) === 0 ||\n (renderParent.flags & NodeFlags.ComponentView) === 0 ||\n (renderParent.element !.componentRendererType &&\n renderParent.element !.componentRendererType !.encapsulation ===\n ViewEncapsulation.Native)) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent !.nodeIndex).renderElement;\n }\n } else {\n return renderHost;\n }\n}\n\nconst DEFINITION_CACHE = new WeakMap<any, Definition<any>>();\n\nexport function resolveDefinition<D extends Definition<any>>(factory: DefinitionFactory<D>): D {\n let value = DEFINITION_CACHE.get(factory) !as D;\n if (!value) {\n value = factory(() => NOOP);\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\n\nexport function rootRenderNodes(view: ViewData): any[] {\n const renderNodes: any[] = [];\n visitRootRenderNodes(view, RenderNodeAction.Collect, undefined, undefined, renderNodes);\n return renderNodes;\n}\n\nexport const enum RenderNodeAction {Collect, AppendChild, InsertBefore, RemoveChild}\n\nexport function visitRootRenderNodes(\n view: ViewData, action: RenderNodeAction, parentNode: any, nextSibling: any, target?: any[]) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === RenderNodeAction.RemoveChild) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode !));\n }\n visitSiblingRenderNodes(\n view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nexport function visitSiblingRenderNodes(\n view: ViewData, action: RenderNodeAction, startIndex: number, endIndex: number, parentNode: any,\n nextSibling: any, target?: any[]) {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (NodeFlags.TypeElement | NodeFlags.TypeText | NodeFlags.TypeNgContent)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\n\nexport function visitProjectedRenderNodes(\n view: ViewData, ngContentIndex: number, action: RenderNodeAction, parentNode: any,\n nextSibling: any, target?: any[]) {\n let compView: ViewData|null = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n const hostView = compView !.parent;\n const hostElDef = viewParentEl(compView !);\n const startIndex = hostElDef !.nodeIndex + 1;\n const endIndex = hostElDef !.nodeIndex + hostElDef !.childCount;\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = hostView !.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView !, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView !.parent) {\n // a root view\n const projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (let i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\n\nfunction visitRenderNode(\n view: ViewData, nodeDef: NodeDef, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n if (nodeDef.flags & NodeFlags.TypeNgContent) {\n visitProjectedRenderNodes(\n view, nodeDef.ngContent !.index, action, parentNode, nextSibling, target);\n } else {\n const rn = renderNode(view, nodeDef);\n if (action === RenderNodeAction.RemoveChild && (nodeDef.flags & NodeFlags.ComponentView) &&\n (nodeDef.bindingFlags & BindingFlags.CatSyntheticProperty)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticProperty)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticHostProperty)) {\n const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n } else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & NodeFlags.TypeElement && !nodeDef.element !.name) {\n visitSiblingRenderNodes(\n view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode,\n nextSibling, target);\n }\n }\n}\n\nfunction execRenderNodeAction(\n view: ViewData, renderNode: any, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n const renderer = view.renderer;\n switch (action) {\n case RenderNodeAction.AppendChild:\n renderer.appendChild(parentNode, renderNode);\n break;\n case RenderNodeAction.InsertBefore:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case RenderNodeAction.RemoveChild:\n renderer.removeChild(parentNode, renderNode);\n break;\n case RenderNodeAction.Collect:\n target !.push(renderNode);\n break;\n }\n}\n\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nexport function splitNamespace(name: string): string[] {\n if (name[0] === ':') {\n const match = name.match(NS_PREFIX_RE) !;\n return [match[1], match[2]];\n }\n return ['', name];\n}\n\nexport function calcBindingFlags(bindings: BindingDef[]): BindingFlags {\n let flags = 0;\n for (let i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\n\nexport function interpolate(valueCount: number, constAndInterp: string[]): string {\n let result = '';\n for (let i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\n\nexport function inlineInterpolate(\n valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any,\n c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any,\n c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(`Does not support more than 9 expressions`);\n }\n}\n\nfunction _toStringWithNull(v: any): string {\n return v != null ? v.toString() : '';\n}\n\nexport const EMPTY_ARRAY: any[] = [];\nexport const EMPTY_MAP: {[key: string]: any} = {};\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\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {Injector} from '../di/injector';\nimport {INJECTOR, setCurrentInjector} from '../di/injector_compatibility';\nimport {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';\nimport {APP_ROOT} from '../di/scope';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {stringify} from '../util/stringify';\n\nimport {DepDef, DepFlags, NgModuleData, NgModuleDefinition, NgModuleProviderDef, NodeFlags} from './types';\nimport {splitDepsDsl, tokenKey} from './util';\n\nconst UNDEFINED_VALUE = new Object();\n\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\n\nexport function moduleProvideDef(\n flags: NodeFlags, token: any, value: any,\n deps: ([DepFlags, any] | any)[]): NgModuleProviderDef {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n const depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags, token, value\n };\n}\n\nexport function moduleDef(providers: NgModuleProviderDef[]): NgModuleDefinition {\n const providersByKey: {[key: string]: NgModuleProviderDef} = {};\n const modules = [];\n let isRoot: boolean = false;\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n if (provider.token === APP_ROOT && provider.value === true) {\n isRoot = true;\n }\n if (provider.flags & NodeFlags.TypeNgModule) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey,\n providers,\n modules,\n isRoot,\n };\n}\n\nexport function initNgModule(data: NgModuleData) {\n const def = data._def;\n const providers = data._providers = new Array(def.providers.length);\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (!(provDef.flags & NodeFlags.LazyProvider)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n}\n\nexport function resolveNgModuleDep(\n data: NgModuleData, depDef: DepDef, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const former = setCurrentInjector(data);\n try {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n if (depDef.flags & DepFlags.SkipSelf) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n const tokenKey = depDef.tokenKey;\n switch (tokenKey) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n const providerDef = data._def.providersByKey[tokenKey];\n let injectableDef: ɵɵInjectableDef<any>|null;\n if (providerDef) {\n let providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n } else if (\n (injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n const index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: NodeFlags.TypeFactoryProvider | NodeFlags.LazyProvider,\n value: injectableDef.factory,\n deps: [], index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (\n data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n } else if (depDef.flags & DepFlags.Self) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n } finally {\n setCurrentInjector(former);\n }\n}\n\nfunction moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDef<any>): boolean {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\n\nfunction _createProviderInstance(ngModule: NgModuleData, providerDef: NgModuleProviderDef): any {\n let injectable: any;\n switch (providerDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeFactoryProvider:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeUseExistingProvider:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case NodeFlags.TypeValueProvider:\n injectable = providerDef.value;\n break;\n }\n\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & NodeFlags.OnDestroy) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= NodeFlags.OnDestroy;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule: NgModuleData, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = new Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction _callFactory(ngModule: NgModuleData, factory: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\nexport function callNgModuleLifecycle(ngModule: NgModuleData, lifecycles: NodeFlags) {\n const def = ngModule._def;\n const destroyed = new Set<any>();\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (provDef.flags & NodeFlags.OnDestroy) {\n const instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n const onDestroy: Function|undefined = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\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\nimport {ElementData, NodeDef, NodeFlags, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {RenderNodeAction, declaredViewContainer, isComponentView, renderNode, visitRootRenderNodes} from './util';\n\nexport function attachEmbeddedView(\n parentView: ViewData, elementData: ElementData, viewIndex: number | undefined | null,\n view: ViewData) {\n let embeddedViews = elementData.viewContainer !._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex !, view);\n attachProjectedView(elementData, view);\n\n Services.dirtyParentQueries(view);\n\n const prevView = viewIndex ! > 0 ? embeddedViews[viewIndex ! - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData: ElementData, view: ViewData) {\n const dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & ViewState.IsProjectedView) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= ViewState.IsProjectedView;\n let projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent !.def, view.parentNodeDef !);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef: ViewDefinition, nodeDef: NodeDef) {\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n return;\n }\n viewDef.nodeFlags |= NodeFlags.ProjectedTemplate;\n nodeDef.flags |= NodeFlags.ProjectedTemplate;\n let parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= NodeFlags.ProjectedTemplate;\n parentNodeDef = parentNodeDef.parent;\n }\n}\n\nexport function detachEmbeddedView(elementData: ElementData, viewIndex?: number): ViewData|null {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n const view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n\n return view;\n}\n\nexport function detachProjectedView(view: ViewData) {\n if (!(view.state & ViewState.IsProjectedView)) {\n return;\n }\n const dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n const projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\n\nexport function moveEmbeddedView(\n elementData: ElementData, oldViewIndex: number, newViewIndex: number): ViewData {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n const view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n\n return view;\n}\n\nfunction renderAttachEmbeddedView(\n elementData: ElementData, prevView: ViewData | null, view: ViewData) {\n const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode !) :\n elementData.renderElement;\n const parentNode = view.renderer.parentNode(prevRenderNode);\n const nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, RenderNodeAction.InsertBefore, parentNode, nextSibling, undefined);\n}\n\nexport function renderDetachView(view: ViewData) {\n visitRootRenderNodes(view, RenderNodeAction.RemoveChild, null, null, undefined);\n}\n\nfunction addToArray(arr: any[], index: number, value: any) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nfunction removeFromArray(arr: any[], index: number) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n arr.pop();\n } else {\n arr.splice(index, 1);\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\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef} from '../linker/element_ref';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef, InternalViewRef, ViewRef} from '../linker/view_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {stringify} from '../util/stringify';\nimport {VERSION} from '../version';\n\nimport {callNgModuleLifecycle, initNgModule, resolveNgModuleDep} from './ng_module';\nimport {DepFlags, ElementData, NgModuleData, NgModuleDefinition, NodeDef, NodeFlags, Services, TemplateData, ViewContainerData, ViewData, ViewDefinitionFactory, ViewState, asElementData, asProviderData, asTextData} from './types';\nimport {markParentViewsForCheck, resolveDefinition, rootRenderNodes, splitNamespace, tokenKey, viewParentEl} from './util';\nimport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView, renderDetachView} from './view_attach';\n\nconst EMPTY_CONTEXT = new Object();\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createComponentFactory(\n selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory,\n inputs: {[propName: string]: string} | null, outputs: {[propName: string]: string},\n ngContentSelectors: string[]): ComponentFactory<any> {\n return new ComponentFactory_(\n selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nexport function getComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>):\n ViewDefinitionFactory {\n return (componentFactory as ComponentFactory_).viewDefFactory;\n}\n\nclass ComponentFactory_ extends ComponentFactory<any> {\n /**\n * @internal\n */\n viewDefFactory: ViewDefinitionFactory;\n\n constructor(\n public selector: string, public componentType: Type<any>,\n viewDefFactory: ViewDefinitionFactory, private _inputs: {[propName: string]: string}|null,\n private _outputs: {[propName: string]: string}, public ngContentSelectors: string[]) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n this.viewDefFactory = viewDefFactory;\n }\n\n get inputs() {\n const inputsArr: {propName: string, templateName: string}[] = [];\n const inputs = this._inputs !;\n for (let propName in inputs) {\n const templateName = inputs[propName];\n inputsArr.push({propName, templateName});\n }\n return inputsArr;\n }\n\n get outputs() {\n const outputsArr: {propName: string, templateName: string}[] = [];\n for (let propName in this._outputs) {\n const templateName = this._outputs[propName];\n outputsArr.push({propName, templateName});\n }\n return outputsArr;\n }\n\n /**\n * Creates a new component.\n */\n create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<any> {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n const viewDef = resolveDefinition(this.viewDefFactory);\n const componentNodeIndex = viewDef.nodes[0].element !.componentProvider !.nodeIndex;\n const view = Services.createRootView(\n injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n const component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n\n return new ComponentRef_(view, new ViewRef_(view), component);\n }\n}\n\nclass ComponentRef_ extends ComponentRef<any> {\n public readonly hostView: ViewRef;\n public readonly instance: any;\n public readonly changeDetectorRef: ChangeDetectorRef;\n private _elDef: NodeDef;\n constructor(private _view: ViewData, private _viewRef: ViewRef, private _component: any) {\n super();\n this._elDef = this._view.def.nodes[0];\n this.hostView = _viewRef;\n this.changeDetectorRef = _viewRef;\n this.instance = _component;\n }\n get location(): ElementRef {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n }\n get injector(): Injector { return new Injector_(this._view, this._elDef); }\n get componentType(): Type<any> { return <any>this._component.constructor; }\n\n destroy(): void { this._viewRef.destroy(); }\n onDestroy(callback: Function): void { this._viewRef.onDestroy(callback); }\n}\n\nexport function createViewContainerData(\n view: ViewData, elDef: NodeDef, elData: ElementData): ViewContainerData {\n return new ViewContainerRef_(view, elDef, elData);\n}\n\nclass ViewContainerRef_ implements ViewContainerData {\n /**\n * @internal\n */\n _embeddedViews: ViewData[] = [];\n constructor(private _view: ViewData, private _elDef: NodeDef, private _data: ElementData) {}\n\n get element(): ElementRef { return new ElementRef(this._data.renderElement); }\n\n get injector(): Injector { return new Injector_(this._view, this._elDef); }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n let view = this._view;\n let elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent !;\n }\n\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n }\n\n clear(): void {\n const len = this._embeddedViews.length;\n for (let i = len - 1; i >= 0; i--) {\n const view = detachEmbeddedView(this._data, i) !;\n Services.destroyView(view);\n }\n }\n\n get(index: number): ViewRef|null {\n const view = this._embeddedViews[index];\n if (view) {\n const ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n }\n\n get length(): number { return this._embeddedViews.length; }\n\n createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: ViewRef, index?: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n const viewRef_ = <ViewRef_>viewRef;\n const viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n }\n\n move(viewRef: ViewRef_, currentIndex: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n }\n\n indexOf(viewRef: ViewRef): number {\n return this._embeddedViews.indexOf((<ViewRef_>viewRef)._view);\n }\n\n remove(index?: number): void {\n const viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n }\n\n detach(index?: number): ViewRef|null {\n const view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n }\n}\n\nexport function createChangeDetectorRef(view: ViewData): ChangeDetectorRef {\n return new ViewRef_(view);\n}\n\nexport class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {\n /** @internal */\n _view: ViewData;\n private _viewContainerRef: ViewContainerRef|null;\n private _appRef: ApplicationRef|null;\n\n constructor(_view: ViewData) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n\n get rootNodes(): any[] { return rootRenderNodes(this._view); }\n\n get context() { return this._view.context; }\n\n get destroyed(): boolean { return (this._view.state & ViewState.Destroyed) !== 0; }\n\n markForCheck(): void { markParentViewsForCheck(this._view); }\n detach(): void { this._view.state &= ~ViewState.Attached; }\n detectChanges(): void {\n const fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n } finally {\n if (fs.end) {\n fs.end();\n }\n }\n }\n checkNoChanges(): void { Services.checkNoChangesView(this._view); }\n\n reattach(): void { this._view.state |= ViewState.Attached; }\n onDestroy(callback: Function) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(<any>callback);\n }\n\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n attachToViewContainerRef(vcRef: ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n}\n\nexport function createTemplateData(view: ViewData, def: NodeDef): TemplateData {\n return new TemplateRef_(view, def);\n}\n\nclass TemplateRef_ extends TemplateRef<any> implements TemplateData {\n /**\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _projectedViews !: ViewData[];\n\n constructor(private _parentView: ViewData, private _def: NodeDef) { super(); }\n\n createEmbeddedView(context: any): EmbeddedViewRef<any> {\n return new ViewRef_(Services.createEmbeddedView(\n this._parentView, this._def, this._def.element !.template !, context));\n }\n\n get elementRef(): ElementRef {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n }\n}\n\nexport function createInjector(view: ViewData, elDef: NodeDef): Injector {\n return new Injector_(view, elDef);\n}\n\nclass Injector_ implements Injector {\n constructor(private view: ViewData, private elDef: NodeDef|null) {}\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const allowPrivateServices =\n this.elDef ? (this.elDef.flags & NodeFlags.ComponentView) !== 0 : false;\n return Services.resolveDep(\n this.view, this.elDef, allowPrivateServices,\n {flags: DepFlags.None, token, tokenKey: tokenKey(token)}, notFoundValue);\n }\n}\n\nexport function nodeValue(view: ViewData, index: number): any {\n const def = view.def.nodes[index];\n if (def.flags & NodeFlags.TypeElement) {\n const elData = asElementData(view, def.nodeIndex);\n return def.element !.template ? elData.template : elData.renderElement;\n } else if (def.flags & NodeFlags.TypeText) {\n return asTextData(view, def.nodeIndex).renderText;\n } else if (def.flags & (NodeFlags.CatProvider | NodeFlags.TypePipe)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\n\nexport function createRendererV1(view: ViewData): RendererV1 {\n return new RendererAdapter(view.renderer);\n}\n\nclass RendererAdapter implements RendererV1 {\n constructor(private delegate: Renderer2) {}\n selectRootElement(selectorOrNode: string|Element): Element {\n return this.delegate.selectRootElement(selectorOrNode);\n }\n\n createElement(parent: Element|DocumentFragment, namespaceAndName: string): Element {\n const [ns, name] = splitNamespace(namespaceAndName);\n const el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n }\n\n createViewRoot(hostElement: Element): Element|DocumentFragment { return hostElement; }\n\n createTemplateAnchor(parentElement: Element|DocumentFragment): Comment {\n const comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n }\n\n createText(parentElement: Element|DocumentFragment, value: string): any {\n const node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n }\n\n projectNodes(parentElement: Element|DocumentFragment, nodes: Node[]) {\n for (let i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n }\n\n attachViewAfter(node: Node, viewRootNodes: Node[]) {\n const parentElement = this.delegate.parentNode(node);\n const nextSibling = this.delegate.nextSibling(node);\n for (let i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n }\n\n detachView(viewRootNodes: (Element|Text|Comment)[]) {\n for (let i = 0; i < viewRootNodes.length; i++) {\n const node = viewRootNodes[i];\n const parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n }\n\n destroyView(hostElement: Element|DocumentFragment, viewAllNodes: Node[]) {\n for (let i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode !(viewAllNodes[i]);\n }\n }\n\n listen(renderElement: any, name: string, callback: Function): Function {\n return this.delegate.listen(renderElement, name, <any>callback);\n }\n\n listenGlobal(target: string, name: string, callback: Function): Function {\n return this.delegate.listen(target, name, <any>callback);\n }\n\n setElementProperty(\n renderElement: Element|DocumentFragment, propertyName: string, propertyValue: any): void {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n }\n\n setElementAttribute(renderElement: Element, namespaceAndName: string, attributeValue?: string):\n void {\n const [ns, name] = splitNamespace(namespaceAndName);\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n } else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n }\n\n setBindingDebugInfo(renderElement: Element, propertyName: string, propertyValue: string): void {}\n\n setElementClass(renderElement: Element, className: string, isAdd: boolean): void {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n } else {\n this.delegate.removeClass(renderElement, className);\n }\n }\n\n setElementStyle(renderElement: HTMLElement, styleName: string, styleValue?: string): void {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n } else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n }\n\n invokeElementMethod(renderElement: Element, methodName: string, args: any[]): void {\n (renderElement as any)[methodName].apply(renderElement, args);\n }\n\n setText(renderNode: Text, text: string): void { this.delegate.setValue(renderNode, text); }\n\n animate(): any { throw new Error('Renderer.animate is no longer supported!'); }\n}\n\n\nexport function createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nclass NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {\n private _destroyListeners: (() => void)[] = [];\n private _destroyed: boolean = false;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _providers !: any[];\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _modules !: any[];\n\n readonly injector: Injector = this;\n\n constructor(\n private _moduleType: Type<any>, public _parent: Injector,\n public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {\n initNgModule(this);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n let flags = DepFlags.None;\n if (injectFlags & InjectFlags.SkipSelf) {\n flags |= DepFlags.SkipSelf;\n } else if (injectFlags & InjectFlags.Self) {\n flags |= DepFlags.Self;\n }\n return resolveNgModuleDep(\n this, {token: token, tokenKey: tokenKey(token), flags: flags}, notFoundValue);\n }\n\n get instance() { return this.get(this._moduleType); }\n\n get componentFactoryResolver() { return this.get(ComponentFactoryResolver); }\n\n destroy(): void {\n if (this._destroyed) {\n throw new Error(\n `The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, NodeFlags.OnDestroy);\n this._destroyListeners.forEach((listener) => listener());\n }\n\n onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\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\nimport {ChangeDetectorRef, SimpleChange, SimpleChanges, WrappedValue} from '../change_detection/change_detection';\nimport {INJECTOR, Injector, resolveForwardRef} from '../di';\nimport {ElementRef} from '../linker/element_ref';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {isObservable} from '../util/lang';\nimport {stringify} from '../util/stringify';\n\nimport {createChangeDetectorRef, createInjector, createRendererV1} from './refs';\nimport {BindingDef, BindingFlags, DepDef, DepFlags, NodeDef, NodeFlags, OutputDef, OutputType, ProviderData, QueryValueType, Services, ViewData, ViewFlags, ViewState, asElementData, asProviderData, shouldCallLifecycleInitHook} from './types';\nimport {calcBindingFlags, checkBinding, dispatchEvent, isComponentView, splitDepsDsl, splitMatchedQueriesDsl, tokenKey, viewParentEl} from './util';\n\nconst RendererV1TokenKey = tokenKey(RendererV1);\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\n\nexport function directiveDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueries: null | [string | number, QueryValueType][], childCount: number, ctor: any,\n deps: ([DepFlags, any] | any)[], props?: null | {[name: string]: [number, string]},\n outputs?: null | {[name: string]: string}): NodeDef {\n const bindings: BindingDef[] = [];\n if (props) {\n for (let prop in props) {\n const [bindingIndex, nonMinifiedName] = props[prop];\n bindings[bindingIndex] = {\n flags: BindingFlags.TypeProperty,\n name: prop, nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n const outputDefs: OutputDef[] = [];\n if (outputs) {\n for (let propName in outputs) {\n outputDefs.push(\n {type: OutputType.DirectiveOutput, propName, target: null, eventName: outputs[propName]});\n }\n }\n flags |= NodeFlags.TypeDirective;\n return _def(\n checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nexport function pipeDef(flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n flags |= NodeFlags.TypePipe;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nexport function providerDef(\n flags: NodeFlags, matchedQueries: null | [string | number, QueryValueType][], token: any,\n value: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nexport function _def(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: [string | number, QueryValueType][] | null, childCount: number, token: any,\n value: any, deps: ([DepFlags, any] | any)[], bindings?: BindingDef[],\n outputs?: OutputDef[]): NodeDef {\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n\n const depDefs = splitDepsDsl(deps, stringify(token));\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references,\n ngContentIndex: -1, childCount, bindings,\n bindingFlags: calcBindingFlags(bindings), outputs,\n element: null,\n provider: {token, value, deps: depDefs},\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createProviderInstance(view: ViewData, def: NodeDef): any {\n return _createProviderInstance(view, def);\n}\n\nexport function createPipeInstance(view: ViewData, def: NodeDef): any {\n // deps are looked up from component.\n let compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n const allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(\n compView.parent !, viewParentEl(compView) !, allowPrivateServices, def.provider !.value,\n def.provider !.deps);\n}\n\nexport function createDirectiveInstance(view: ViewData, def: NodeDef): any {\n // components can see other private services, other directives can't.\n const allowPrivateServices = (def.flags & NodeFlags.Component) > 0;\n // directives are always eager and classes!\n const instance = createClass(\n view, def.parent !, allowPrivateServices, def.provider !.value, def.provider !.deps);\n if (def.outputs.length) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const outputObservable = instance[output.propName !];\n if (isObservable(outputObservable)) {\n const subscription = outputObservable.subscribe(\n eventHandlerClosure(view, def.parent !.nodeIndex, output.eventName));\n view.disposables ![def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n } else {\n throw new Error(\n `@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n }\n }\n }\n return instance;\n}\n\nfunction eventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\nexport function checkAndUpdateDirectiveInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined !;\n const bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nexport function checkAndUpdateDirectiveDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined !;\n for (let i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nfunction _createProviderInstance(view: ViewData, def: NodeDef): any {\n // private services can see other private services\n const allowPrivateServices = (def.flags & NodeFlags.PrivateProvider) > 0;\n const providerDef = def.provider;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n return createClass(\n view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n case NodeFlags.TypeFactoryProvider:\n return callFactory(\n view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n case NodeFlags.TypeUseExistingProvider:\n return resolveDep(view, def.parent !, allowPrivateServices, providerDef !.deps[0]);\n case NodeFlags.TypeValueProvider:\n return providerDef !.value;\n }\n}\n\nfunction createClass(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = new Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction callFactory(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, factory: any,\n deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nexport function resolveDep(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n const startView = view;\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n const tokenKey = depDef.tokenKey;\n\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element !.componentView);\n }\n\n if (elDef && (depDef.flags & DepFlags.SkipSelf)) {\n allowPrivateServices = false;\n elDef = elDef.parent !;\n }\n\n let searchView: ViewData|null = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case RendererV1TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element !.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n let cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector(searchView, elDef);\n default:\n const providerDef =\n (allowPrivateServices ? elDef.element !.allProviders :\n elDef.element !.publicProviders) ![tokenKey];\n if (providerDef) {\n let providerData = asProviderData(searchView, providerDef.nodeIndex);\n if (!providerData) {\n providerData = {instance: _createProviderInstance(searchView, providerDef)};\n searchView.nodes[providerDef.nodeIndex] = providerData as any;\n }\n return providerData.instance;\n }\n }\n }\n\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView) !;\n searchView = searchView.parent !;\n\n if (depDef.flags & DepFlags.Self) {\n searchView = null;\n }\n }\n\n const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\n\nfunction findCompView(view: ViewData, elDef: NodeDef, allowPrivateServices: boolean) {\n let compView: ViewData;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n } else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\n\nfunction updateProp(\n view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,\n changes: SimpleChanges): SimpleChanges {\n if (def.flags & NodeFlags.Component) {\n const compView = asElementData(view, def.parent !.nodeIndex).componentView;\n if (compView.def.flags & ViewFlags.OnPush) {\n compView.state |= ViewState.ChecksEnabled;\n }\n }\n const binding = def.bindings[bindingIdx];\n const propName = binding.name !;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & NodeFlags.OnChanges) {\n changes = changes || {};\n const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n const binding = def.bindings[bindingIdx];\n changes[binding.nonMinifiedName !] =\n new SimpleChange(oldValue, value, (view.state & ViewState.FirstCheck) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nexport function callLifecycleHooksChildrenFirst(view: ViewData, lifecycles: NodeFlags) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n const nodes = view.def.nodes;\n let initIndex = 0;\n for (let i = 0; i < nodes.length; i++) {\n const nodeDef = nodes[i];\n let parent = nodeDef.parent;\n if (!parent && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent && (parent.flags & NodeFlags.TypeElement) &&\n i === parent.nodeIndex + parent.childCount) {\n // last child of an element\n if (parent.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n }\n parent = parent.parent;\n }\n }\n}\n\nfunction callElementProvidersLifecycles(\n view: ViewData, elDef: NodeDef, lifecycles: NodeFlags, initIndex: number): number {\n for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\n\nfunction callProviderLifecycles(\n view: ViewData, index: number, lifecycles: NodeFlags, initIndex: number) {\n const providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n const provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & NodeFlags.AfterContentInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterContentInit, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & NodeFlags.AfterContentChecked) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & NodeFlags.AfterViewInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterViewInit, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & NodeFlags.AfterViewChecked) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & NodeFlags.OnDestroy) {\n provider.ngOnDestroy();\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\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {ɵɵinject} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef as viewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider';\n\nimport {assertComponentType} from './assert';\nimport {LifecycleHooksFeature, createRootComponent, createRootComponentView, createRootContext} from './component';\nimport {getComponentDef} from './definition';\nimport {NodeInjector} from './di';\nimport {addToViewTree, assignTViewNodeToLView, createLView, createTView, elementCreate, locateHostElement, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef} from './interfaces/definition';\nimport {TContainerNode, TElementContainerNode, TElementNode} from './interfaces/node';\nimport {RNode, RendererFactory3, domRendererFactory3, isProceduralRenderer} from './interfaces/renderer';\nimport {LView, LViewFlags, RootContext, TVIEW} from './interfaces/view';\nimport {enterView, leaveView} from './state';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getTNode} from './util/view_utils';\nimport {createElementRef} from './view_engine_compatibility';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends viewEngine_ComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: viewEngine_NgModuleRef<any>) { super(); }\n\n resolveComponentFactory<T>(component: Type<T>): viewEngine_ComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component) !;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toRefArray(map: {[key: string]: string}): {propName: string; templateName: string;}[] {\n const array: {propName: string; templateName: string;}[] = [];\n for (let nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n const minified = map[nonMinified];\n array.push({propName: minified, templateName: nonMinified});\n }\n }\n return array;\n}\n\n/**\n * Default {@link RootContext} for all components rendered with {@link renderComponent}.\n */\nexport const ROOT_CONTEXT = new InjectionToken<RootContext>(\n 'ROOT_CONTEXT_TOKEN',\n {providedIn: 'root', factory: () => createRootContext(ɵɵinject(SCHEDULER))});\n\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nexport const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: () => defaultScheduler,\n});\n\nfunction createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector {\n return {\n get: <T>(token: Type<T>| InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T => {\n const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n}\n\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nexport class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {\n selector: string;\n componentType: Type<any>;\n ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n get inputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.inputs);\n }\n\n get outputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.outputs);\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>, private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n this.componentType = componentDef.type;\n this.selector = componentDef.selectors[0][0] as string;\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n\n create(\n injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n ngModule?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<T> {\n const isInternalRootView = rootSelectorOrNode === undefined;\n ngModule = ngModule || this.ngModule;\n\n const rootViewInjector =\n ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n\n const rendererFactory =\n rootViewInjector.get(RendererFactory2, domRendererFactory3) as RendererFactory3;\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const hostRNode = isInternalRootView ?\n elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef)) :\n locateHostElement(rendererFactory, rootSelectorOrNode);\n\n const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n\n // Check whether this Component needs to be isolated from other components, i.e. whether it\n // should be placed into its own (empty) root context or existing root context should be used.\n // Note: this is internal-only convention and might change in the future, so it should not be\n // relied upon externally.\n const isIsolated = typeof rootSelectorOrNode === 'string' &&\n /^#root-ng-internal-isolated-\\d+/.test(rootSelectorOrNode);\n\n const rootContext: RootContext = (isInternalRootView || isIsolated) ?\n createRootContext() :\n rootViewInjector.get(ROOT_CONTEXT);\n\n const renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);\n\n if (rootSelectorOrNode && hostRNode) {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProceduralRenderer(renderer) ?\n renderer.setAttribute(hostRNode, 'ng-version', VERSION.full) :\n hostRNode.setAttribute('ng-version', VERSION.full);\n }\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootLView = createLView(\n null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null,\n null, rendererFactory, renderer, sanitizer, rootViewInjector);\n\n // rootView is the parent when bootstrapping\n const oldLView = enterView(rootLView, null);\n\n let component: T;\n let tElementNode: TElementNode;\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n const componentView = createRootComponentView(\n hostRNode, this.componentDef, rootLView, rendererFactory, renderer);\n\n tElementNode = getTNode(0, rootLView) as TElementNode;\n\n if (projectableNodes) {\n // projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n tElementNode.projection =\n projectableNodes.map((nodesforSlot: RNode[]) => { return Array.from(nodesforSlot); });\n }\n\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(\n componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n\n addToViewTree(rootLView, componentView);\n refreshDescendantViews(rootLView);\n safeToRunHooks = true;\n } finally {\n leaveView(oldLView, safeToRunHooks);\n }\n\n const componentRef = new ComponentRef(\n this.componentType, component,\n createElementRef(viewEngine_ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n\n if (isInternalRootView) {\n // The host element of the internal root view is attached to the component's host view node\n componentRef.hostView._tViewNode !.child = tElementNode;\n }\n return componentRef;\n }\n}\n\nconst componentFactoryResolver: ComponentFactoryResolver = new ComponentFactoryResolver();\n\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nexport function injectComponentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return componentFactoryResolver;\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends viewEngine_ComponentRef<T> {\n destroyCbs: (() => void)[]|null = [];\n instance: T;\n hostView: ViewRef<T>;\n changeDetectorRef: ViewEngine_ChangeDetectorRef;\n componentType: Type<T>;\n\n constructor(\n componentType: Type<T>, instance: T, public location: viewEngine_ElementRef,\n private _rootLView: LView,\n private _tNode: TElementNode|TContainerNode|TElementContainerNode) {\n super();\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new RootViewRef<T>(_rootLView);\n this.hostView._tViewNode = assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n this.componentType = componentType;\n }\n\n get injector(): Injector { return new NodeInjector(this._tNode, this._rootLView); }\n\n destroy(): void {\n if (this.destroyCbs) {\n this.destroyCbs.forEach(fn => fn());\n this.destroyCbs = null;\n !this.hostView.destroyed && this.hostView.destroy();\n }\n }\n\n onDestroy(callback: () => void): void {\n if (this.destroyCbs) {\n this.destroyCbs.push(callback);\n }\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\nimport {global} from './global';\n\ndeclare global {\n const ngI18nClosureMode: boolean;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function() {\n // tslint:disable-next-line:no-toplevel-property-access\n global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\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 * This const is used to store the locale data registered with `registerLocaleData`\n */\nexport const LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n PluralCase,\n ExtraData\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// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\n\nconst u = undefined;\n\nfunction plural(n: number): number {\n let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0) return 1;\n return 5;\n}\n\nexport default [\n 'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],\n [\n ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n ],\n u,\n [\n ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ]\n ],\n u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],\n ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural\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\nimport {LOCALE_DATA, LocaleDataIndex} from './locale_data';\nimport localeEn from './locale_en';\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = locale.toLowerCase().replace(/_/g, '-');\n\n let match = LOCALE_DATA[normalizedLocale];\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = LOCALE_DATA[parentLocale];\n\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new Error(`Missing locale data for the locale \"${locale}\".`);\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\nimport {getLocalePluralCase} from './locale_data_api';\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: any, locale: string): string {\n const plural = getLocalePluralCase(locale)(value);\n\n switch (plural) {\n case 0:\n return 'zero';\n case 1:\n return 'one';\n case 2:\n return 'two';\n case 3:\n return 'few';\n case 4:\n return 'many';\n default:\n return 'other';\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* Equivalent to ES6 spread, add each item to an array.\n*\n* @param items The items to add\n* @param arr The array to which you want to add the items\n*/\nexport function addAllToArray(items: any[], arr: any[]) {\n for (let i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[], dst?: any[]): any[] {\n if (dst === undefined) dst = list;\n for (let i = 0; i < list.length; i++) {\n let item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n } else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\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\nimport '../util/ng_i18n_closure_mode';\n\nimport {getPluralCase} from '../i18n/localization';\nimport {SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS, getTemplateContent} from '../sanitization/html_sanitizer';\nimport {InertBodyHelper} from '../sanitization/inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from '../sanitization/url_sanitizer';\nimport {addAllToArray} from '../util/array_utils';\nimport {assertDataInRange, assertDefined, assertEqual, assertGreaterThan} from '../util/assert';\n\nimport {attachPatchData} from './context_discovery';\nimport {bind, setDelayProjection, ɵɵload} from './instructions/all';\nimport {attachI18nOpCodesDebug} from './instructions/lview_debug';\nimport {TsickleIssue1009, allocExpando, elementAttributeInternal, elementPropertyInternal, getOrCreateTNode, setInputsForProperty, textBindingInternal} from './instructions/shared';\nimport {LContainer, NATIVE} from './interfaces/container';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from './interfaces/node';\nimport {RComment, RElement, RText} from './interfaces/renderer';\nimport {SanitizerFn} from './interfaces/sanitization';\nimport {StylingContext} from './interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {appendChild, appendProjectedNodes, createTextNode, nativeRemoveNode} from './node_manipulation';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getNativeByIndex, getNativeByTNode, getTNode, isLContainer} from './util/view_utils';\n\n\nconst MARKER = `�`;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*!]\\d+):?\\d*�/gi;\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst enum TagType {\n ELEMENT = '#',\n TEMPLATE = '*',\n PROJECTION = '!',\n}\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\ninterface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string|IcuExpression)[][];\n}\n\ninterface IcuCase {\n /**\n * Number of slots to allocate in expando for this case.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number;\n\n /**\n * An optional array of child/sub ICUs.\n */\n childIcus: number[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes;\n}\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression into\n * keys and cases.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n *\n */\nfunction extractParts(pattern: string): (string | IcuExpression)[] {\n if (!pattern) {\n return [];\n }\n\n let prevPos = 0;\n const braceStack = [];\n const results: (string | IcuExpression)[] = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n\n let match;\n while (match = braces.exec(pattern)) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n } else {\n results.push(block);\n }\n\n prevPos = pos + 1;\n }\n } else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern: string): IcuExpression {\n const cases = [];\n const values: (string | IcuExpression)[][] = [];\n let icuType = IcuType.plural;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str: string, binding: string, type: string) {\n if (type === 'select') {\n icuType = IcuType.select;\n } else {\n icuType = IcuType.plural;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n\n const parts = extractParts(pattern) as string[];\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length;) {\n let key = parts[pos++].trim();\n if (icuType === IcuType.plural) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n\n const blocks = extractParts(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n assertGreaterThan(cases.indexOf('other'), -1, 'Missing key \"other\" in ICU statement.');\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n } else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n\n ngDevMode &&\n assertEqual(\n inTemplate, false,\n `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n\n res += message.substr(index);\n return res;\n}\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A translated\n * message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex?: number) {\n if (typeof subTemplateIndex !== 'number') {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n } else {\n // We want a specific sub-template\n const start =\n message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n */\nfunction generateBindingUpdateOpCodes(\n str: string, destinationNode: number, attrName?: string,\n sanitizeFn: SanitizerFn | null = null): I18nUpdateOpCodes {\n const updateOpCodes: I18nUpdateOpCodes = [null, null]; // Alloc space for mask and size\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n } else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n\n updateOpCodes.push(\n destinationNode << I18nUpdateOpCode.SHIFT_REF |\n (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[0] = mask;\n updateOpCodes[1] = updateOpCodes.length - 2;\n return updateOpCodes;\n}\n\nfunction getBindingMask(icuExpression: IcuExpression, mask = 0): number {\n mask = mask | toMaskBit(icuExpression.mainBinding);\n let match;\n for (let i = 0; i < icuExpression.values.length; i++) {\n const valueArr = icuExpression.values[i];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value === 'string') {\n while (match = BINDING_REGEXP.exec(value)) {\n mask = mask | toMaskBit(parseInt(match[1], 10));\n }\n } else {\n mask = getBindingMask(value as IcuExpression, mask);\n }\n }\n }\n return mask;\n}\n\nconst i18nIndexStack: number[] = [];\nlet i18nIndexStackPointer = -1;\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have\n * more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is\n * that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n return 1 << Math.min(bindingIndex, 31);\n}\n\nconst parentIndexStack: number[] = [];\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�!{index}(:{block})�`/`�/!{index}(:{block})�`: *Projection Placeholder*: Marks the\n * beginning and end of <ng-content> that was embedded in the original translation block.\n * The placeholder `index` points to the element index in the template instructions set.\n * An optional `block` that matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nIndexStack[++i18nIndexStackPointer] = index;\n // We need to delay projections until `i18nEnd`\n setDelayProjection(true);\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n i18nStartFirstPass(tView, index, message, subTemplateIndex);\n }\n}\n\n// Count for the number of vars that will be allocated for each i18n block.\n// It is global because this is used in multiple functions that include loops and recursive calls.\n// This is reset to 0 when `i18nStartFirstPass` is called.\nlet i18nVarsCount: number;\n\n/**\n * See `i18nStart` above.\n */\nfunction i18nStartFirstPass(\n tView: TView, index: number, message: string, subTemplateIndex?: number) {\n const viewData = getLView();\n const startIndex = tView.blueprint.length - HEADER_OFFSET;\n i18nVarsCount = 0;\n const previousOrParentTNode = getPreviousOrParentTNode();\n const parentTNode = getIsParent() ? getPreviousOrParentTNode() :\n previousOrParentTNode && previousOrParentTNode.parent;\n let parentIndex =\n parentTNode && parentTNode !== viewData[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;\n let parentIndexPointer = 0;\n parentIndexStack[parentIndexPointer] = parentIndex;\n const createOpCodes: I18nMutateOpCodes = [];\n // If the previous node wasn't the direct parent then we have a translation without top level\n // element and we need to keep a reference of the previous element if there is one\n if (index > 0 && previousOrParentTNode !== parentTNode) {\n // Create an OpCode to select the previous TNode\n createOpCodes.push(\n previousOrParentTNode.index << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select);\n }\n const updateOpCodes: I18nUpdateOpCodes = [];\n const icuExpressions: TIcu[] = [];\n\n const templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = templateTranslation.split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if (i & 1) {\n // Odd indexes are placeholders (elements and sub-templates)\n if (value.charAt(0) === '/') {\n // It is a closing tag\n if (value.charAt(1) === TagType.ELEMENT) {\n const phIndex = parseInt(value.substr(2), 10);\n parentIndex = parentIndexStack[--parentIndexPointer];\n createOpCodes.push(phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.ElementEnd);\n }\n } else {\n const phIndex = parseInt(value.substr(1), 10);\n // The value represents a placeholder that we move to the designated index\n createOpCodes.push(\n phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n if (value.charAt(0) === TagType.ELEMENT) {\n parentIndexStack[++parentIndexPointer] = parentIndex = phIndex;\n }\n }\n } else {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = extractParts(value);\n for (let j = 0; j < parts.length; j++) {\n if (j & 1) {\n // Odd indexes are ICU expressions\n // Create the comment node that will anchor the ICU expression\n const icuNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(\n COMMENT_MARKER, ngDevMode ? `ICU ${icuNodeIndex}` : '', icuNodeIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n // Update codes for the ICU expression\n const icuExpression = parts[j] as IcuExpression;\n const mask = getBindingMask(icuExpression);\n icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n const tIcuIndex = icuExpressions.length - 1;\n updateOpCodes.push(\n toMaskBit(icuExpression.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - icuExpression.mainBinding,\n icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch, tIcuIndex,\n mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate, tIcuIndex);\n } else if (parts[j] !== '') {\n const text = parts[j] as string;\n // Even indexes are text (including bindings)\n const hasBinding = text.match(BINDING_REGEXP);\n // Create text nodes\n const textNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(\n // If there is a binding, the value will be set during update\n hasBinding ? '' : text, textNodeIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);\n }\n }\n }\n }\n }\n\n allocExpando(viewData, i18nVarsCount);\n\n ngDevMode &&\n attachI18nOpCodesDebug(\n createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, viewData);\n\n // NOTE: local var needed to properly assert the type of `TI18n`.\n const tI18n: TI18n = {\n vars: i18nVarsCount,\n create: createOpCodes,\n update: updateOpCodes,\n icus: icuExpressions.length ? icuExpressions : null,\n };\n\n tView.data[index + HEADER_OFFSET] = tI18n;\n}\n\nfunction appendI18nNode(\n tNode: TNode, parentTNode: TNode, previousTNode: TNode | null, viewData: LView): TNode {\n ngDevMode && ngDevMode.rendererMoveNode++;\n const nextNode = tNode.next;\n if (!previousTNode) {\n previousTNode = parentTNode;\n }\n\n // Re-organize node tree to put this node in the correct position.\n if (previousTNode === parentTNode && tNode !== parentTNode.child) {\n tNode.next = parentTNode.child;\n parentTNode.child = tNode;\n } else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {\n tNode.next = previousTNode.next;\n previousTNode.next = tNode;\n } else {\n tNode.next = null;\n }\n\n if (parentTNode !== viewData[T_HOST]) {\n tNode.parent = parentTNode as TElementNode;\n }\n\n // If tNode was moved around, we might need to fix a broken link.\n let cursor: TNode|null = tNode.next;\n while (cursor) {\n if (cursor.next === tNode) {\n cursor.next = nextNode;\n }\n cursor = cursor.next;\n }\n\n // If the placeholder to append is a projection, we need to move the projected nodes instead\n if (tNode.type === TNodeType.Projection) {\n const tProjectionNode = tNode as TProjectionNode;\n appendProjectedNodes(\n viewData, tProjectionNode, tProjectionNode.projection, findComponentView(viewData));\n return tNode;\n }\n\n appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);\n\n const slotValue = viewData[tNode.index];\n if (tNode.type !== TNodeType.Container && isLContainer(slotValue)) {\n // Nodes that inject ViewContainerRef also have a comment node that should be moved\n appendChild(slotValue[NATIVE], tNode, viewData);\n }\n return tNode;\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ɵɵi18nPostprocess(\n message: string, replacements: {[key: string]: (string | string[])} = {}): string {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result: string = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n const content = phs || tmpl;\n const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder: string) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n } else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n\n /**\n * Step 3: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key] as string[];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift() !;\n }\n return match;\n });\n\n return result;\n}\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nEnd(): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nEndFirstPass(tView);\n // Stop delaying projections\n setDelayProjection(false);\n}\n\n/**\n * See `i18nEnd` above.\n */\nfunction i18nEndFirstPass(tView: TView) {\n const viewData = getLView();\n ngDevMode && assertEqual(\n viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex,\n 'i18nEnd should be called before any binding');\n\n const rootIndex = i18nIndexStack[i18nIndexStackPointer--];\n const tI18n = tView.data[rootIndex + HEADER_OFFSET] as TI18n;\n ngDevMode && assertDefined(tI18n, `You should call i18nStart before i18nEnd`);\n\n // Find the last node that was added before `i18nEnd`\n let lastCreatedNode = getPreviousOrParentTNode();\n\n // Read the instructions to insert/move/remove DOM elements\n const visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData);\n\n // Remove deleted nodes\n for (let i = rootIndex + 1; i <= lastCreatedNode.index - HEADER_OFFSET; i++) {\n if (visitedNodes.indexOf(i) === -1) {\n removeNode(i, viewData);\n }\n }\n}\n\n/**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\nfunction createDynamicNodeAtIndex(\n lView: LView, index: number, type: TNodeType, native: RElement | RText | null,\n name: string | null): TElementNode|TIcuContainerNode {\n const previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n lView[index + HEADER_OFFSET] = native;\n const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, type as any, name, null);\n\n // We are creating a dynamic node, the previous tNode might not be pointing at this node.\n // We will link ourselves into the tree later with `appendI18nNode`.\n if (previousOrParentTNode.next === tNode) {\n previousOrParentTNode.next = null;\n }\n\n return tNode;\n}\n\nfunction readCreateOpCodes(\n index: number, createOpCodes: I18nMutateOpCodes, icus: TIcu[] | null,\n viewData: LView): number[] {\n const renderer = getLView()[RENDERER];\n let currentTNode: TNode|null = null;\n let previousTNode: TNode|null = null;\n const visitedNodes: number[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i];\n if (typeof opCode == 'string') {\n const textRNode = createTextNode(opCode, renderer);\n const textNodeIndex = createOpCodes[++i] as number;\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n previousTNode = currentTNode;\n currentTNode =\n createDynamicNodeAtIndex(viewData, textNodeIndex, TNodeType.Element, textRNode, null);\n visitedNodes.push(textNodeIndex);\n setIsNotParent();\n } else if (typeof opCode == 'number') {\n switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.AppendChild:\n const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n let destinationTNode: TNode;\n if (destinationNodeIndex === index) {\n // If the destination node is `i18nStart`, we don't have a\n // top-level node and we should use the host node instead\n destinationTNode = viewData[T_HOST] !;\n } else {\n destinationTNode = getTNode(destinationNodeIndex, viewData);\n }\n ngDevMode &&\n assertDefined(\n currentTNode !,\n `You need to create or select a node before you can insert it into the DOM`);\n previousTNode = appendI18nNode(currentTNode !, destinationTNode, previousTNode, viewData);\n break;\n case I18nMutateOpCode.Select:\n const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n visitedNodes.push(nodeIndex);\n previousTNode = currentTNode;\n currentTNode = getTNode(nodeIndex, viewData);\n if (currentTNode) {\n setPreviousOrParentTNode(currentTNode, currentTNode.type === TNodeType.Element);\n }\n break;\n case I18nMutateOpCode.ElementEnd:\n const elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n previousTNode = currentTNode = getTNode(elementIndex, viewData);\n setPreviousOrParentTNode(currentTNode, false);\n break;\n case I18nMutateOpCode.Attr:\n const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n const attrName = createOpCodes[++i] as string;\n const attrValue = createOpCodes[++i] as string;\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n elementAttributeInternal(elementNodeIndex, attrName, attrValue, viewData);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n } else {\n switch (opCode) {\n case COMMENT_MARKER:\n const commentValue = createOpCodes[++i] as string;\n const commentNodeIndex = createOpCodes[++i] as number;\n ngDevMode && assertEqual(\n typeof commentValue, 'string',\n `Expected \"${commentValue}\" to be a comment node value`);\n const commentRNode = renderer.createComment(commentValue);\n ngDevMode && ngDevMode.rendererCreateComment++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(\n viewData, commentNodeIndex, TNodeType.IcuContainer, commentRNode, null);\n visitedNodes.push(commentNodeIndex);\n attachPatchData(commentRNode, viewData);\n (currentTNode as TIcuContainerNode).activeCaseIndex = null;\n // We will add the case nodes later, during the update phase\n setIsNotParent();\n break;\n case ELEMENT_MARKER:\n const tagNameValue = createOpCodes[++i] as string;\n const elementNodeIndex = createOpCodes[++i] as number;\n ngDevMode && assertEqual(\n typeof tagNameValue, 'string',\n `Expected \"${tagNameValue}\" to be an element node tag name`);\n const elementRNode = renderer.createElement(tagNameValue);\n ngDevMode && ngDevMode.rendererCreateElement++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(\n viewData, elementNodeIndex, TNodeType.Element, elementRNode, tagNameValue);\n visitedNodes.push(elementNodeIndex);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n\n setIsNotParent();\n\n return visitedNodes;\n}\n\nfunction readUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null, bindingsStartIndex: number,\n changeMask: number, viewData: LView, bypassCheckBit = false) {\n let caseCreated = false;\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i] as number;\n if (bypassCheckBit || (checkBit & changeMask)) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n value += renderStringify(viewData[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n let tIcuIndex: number;\n let tIcu: TIcu;\n let icuTNode: TIcuContainerNode;\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const propName = updateOpCodes[++j] as string;\n const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);\n break;\n case I18nUpdateOpCode.Text:\n textBindingInternal(viewData, nodeIndex, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n tIcuIndex = updateOpCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n // If there is an active case, delete the old nodes\n if (icuTNode.activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[icuTNode.activeCaseIndex];\n for (let k = 0; k < removeCodes.length; k++) {\n const removeOpCode = removeCodes[k] as number;\n switch (removeOpCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.Remove:\n const nodeIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n removeNode(nodeIndex, viewData);\n break;\n case I18nMutateOpCode.RemoveNestedIcu:\n const nestedIcuNodeIndex =\n removeCodes[k + 1] as number >>> I18nMutateOpCode.SHIFT_REF;\n const nestedIcuTNode =\n getTNode(nestedIcuNodeIndex, viewData) as TIcuContainerNode;\n const activeIndex = nestedIcuTNode.activeCaseIndex;\n if (activeIndex !== null) {\n const nestedIcuTIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n const nestedTIcu = icus ![nestedIcuTIndex];\n addAllToArray(nestedTIcu.remove[activeIndex], removeCodes);\n }\n break;\n }\n }\n }\n\n // Update the active caseIndex\n const caseIndex = getCaseIndex(tIcu, value);\n icuTNode.activeCaseIndex = caseIndex !== -1 ? caseIndex : null;\n\n // Add the nodes for the new case\n readCreateOpCodes(-1, tIcu.create[caseIndex], icus, viewData);\n caseCreated = true;\n break;\n case I18nUpdateOpCode.IcuUpdate:\n tIcuIndex = updateOpCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n readUpdateOpCodes(\n tIcu.update[icuTNode.activeCaseIndex !], icus, bindingsStartIndex, changeMask,\n viewData, caseCreated);\n break;\n }\n }\n }\n }\n }\n i += skipCodes;\n }\n}\n\nfunction removeNode(index: number, viewData: LView) {\n const removedPhTNode = getTNode(index, viewData);\n const removedPhRNode = getNativeByIndex(index, viewData);\n if (removedPhRNode) {\n nativeRemoveNode(viewData[RENDERER], removedPhRNode);\n }\n\n const slotValue = ɵɵload(index) as RElement | RComment | LContainer | StylingContext;\n if (isLContainer(slotValue)) {\n const lContainer = slotValue as LContainer;\n if (removedPhTNode.type !== TNodeType.Container) {\n nativeRemoveNode(viewData[RENDERER], lContainer[NATIVE]);\n }\n }\n\n // Define this node as detached so that we don't risk projecting it\n removedPhTNode.flags |= TNodeFlags.isDetached;\n ngDevMode && ngDevMode.rendererRemoveNode++;\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, message, subTemplateIndex);\n ɵɵi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ɵɵi18nAttributes(index: number, values: string[]): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nAttributesFirstPass(tView, index, values);\n}\n\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getPreviousOrParentTNode();\n const previousElementIndex = previousElement.index - HEADER_OFFSET;\n const updateOpCodes: I18nUpdateOpCodes = [];\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n const parts = message.split(ICU_REGEXP);\n for (let j = 0; j < parts.length; j++) {\n const value = parts[j];\n\n if (j & 1) {\n // Odd indexes are ICU expressions\n // TODO(ocombe): support ICU expressions in attributes\n throw new Error('ICU expressions are not yet supported in attributes');\n } else if (value !== '') {\n // Even indexes are text (including bindings)\n const hasBinding = !!value.match(BINDING_REGEXP);\n if (hasBinding) {\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n addAllToArray(\n generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n }\n } else {\n const lView = getLView();\n elementAttributeInternal(previousElementIndex, attrName, value, lView);\n // Check if that attribute is a directive input\n const tNode = getTNode(previousElementIndex, lView);\n const dataValue = tNode.inputs && tNode.inputs[attrName];\n if (dataValue) {\n setInputsForProperty(lView, dataValue, value);\n }\n }\n }\n }\n }\n\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n tView.data[index + HEADER_OFFSET] = updateOpCodes;\n }\n}\n\nlet changeMask = 0b0;\nlet shiftsCounter = 0;\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵi18nExp<T>(value: T): TsickleIssue1009 {\n const lView = getLView();\n const expression = bind(lView, value);\n if (expression !== NO_CHANGE) {\n changeMask = changeMask | (1 << shiftsCounter);\n }\n shiftsCounter++;\n return ɵɵi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nApply(index: number) {\n if (shiftsCounter) {\n const lView = getLView();\n const tView = lView[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index + HEADER_OFFSET];\n let updateOpCodes: I18nUpdateOpCodes;\n let icus: TIcu[]|null = null;\n if (Array.isArray(tI18n)) {\n updateOpCodes = tI18n as I18nUpdateOpCodes;\n } else {\n updateOpCodes = (tI18n as TI18n).update;\n icus = (tI18n as TI18n).icus;\n }\n const bindingsStartIndex = lView[BINDING_INDEX] - shiftsCounter - 1;\n readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, lView);\n\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n shiftsCounter = 0;\n }\n}\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case IcuType.plural: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case IcuType.select: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index;\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param tIcus\n * @param icuExpression\n * @param startIndex\n * @param expandoStartIndex\n */\nfunction icuStart(\n tIcus: TIcu[], icuExpression: IcuExpression, startIndex: number,\n expandoStartIndex: number): void {\n const createCodes = [];\n const removeCodes = [];\n const updateCodes = [];\n const vars = [];\n const childIcus: number[][] = [];\n for (let i = 0; i < icuExpression.values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = icuExpression.values[i];\n const nestedIcus: IcuExpression[] = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n const icuCase: IcuCase =\n parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);\n createCodes.push(icuCase.create);\n removeCodes.push(icuCase.remove);\n updateCodes.push(icuCase.update);\n vars.push(icuCase.vars);\n childIcus.push(icuCase.childIcus);\n }\n const tIcu: TIcu = {\n type: icuExpression.type,\n vars,\n childIcus,\n cases: icuExpression.cases,\n create: createCodes,\n remove: removeCodes,\n update: updateCodes\n };\n tIcus.push(tIcu);\n // Adding the maximum possible of vars needed (based on the cases with the most vars)\n i18nVarsCount += Math.max(...vars);\n}\n\n/**\n * Transforms a string template into an HTML template and a list of instructions used to update\n * attributes or nodes that contain bindings.\n *\n * @param unsafeHtml The string to parse\n * @param parentIndex\n * @param nestedIcus\n * @param tIcus\n * @param expandoStartIndex\n */\nfunction parseIcuCase(\n unsafeHtml: string, parentIndex: number, nestedIcus: IcuExpression[], tIcus: TIcu[],\n expandoStartIndex: number): IcuCase {\n const inertBodyHelper = new InertBodyHelper(document);\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n if (!inertBodyElement) {\n throw new Error('Unable to generate inert body element');\n }\n const wrapper = getTemplateContent(inertBodyElement !) as Element || inertBodyElement;\n const opCodes: IcuCase = {vars: 0, childIcus: [], create: [], remove: [], update: []};\n parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);\n return opCodes;\n}\n\nconst NESTED_ICU = /�(\\d+)�/;\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n * @param currentNode The first node to parse\n * @param icuCase The data for the ICU expression case that contains those nodes\n * @param parentIndex Index of the current node's parent\n * @param nestedIcus Data for the nested ICU expressions that this case contains\n * @param tIcus Data for all ICU expressions of the current message\n * @param expandoStartIndex Expando start index for the current ICU expression\n */\nfunction parseNodes(\n currentNode: Node | null, icuCase: IcuCase, parentIndex: number, nestedIcus: IcuExpression[],\n tIcus: TIcu[], expandoStartIndex: number) {\n if (currentNode) {\n const nestedIcusToCreate: [IcuExpression, number][] = [];\n while (currentNode) {\n const nextNode: Node|null = currentNode.nextSibling;\n const newIndex = expandoStartIndex + ++icuCase.vars;\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode as Element;\n const tagName = element.tagName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n // This isn't a valid element, we won't create an element for it\n icuCase.vars--;\n } else {\n icuCase.create.push(\n ELEMENT_MARKER, tagName, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i) !;\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n addAllToArray(\n generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl),\n icuCase.update);\n } else if (SRCSET_ATTRS[lowerAttrName]) {\n addAllToArray(\n generateBindingUpdateOpCodes(\n attr.value, newIndex, attr.name, sanitizeSrcset),\n icuCase.update);\n } else {\n addAllToArray(\n generateBindingUpdateOpCodes(attr.value, newIndex, attr.name),\n icuCase.update);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ${lowerAttrName} on element ${tagName} (see http://g.co/ng/security#xss)`);\n }\n } else {\n icuCase.create.push(\n newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Attr, attr.name,\n attr.value);\n }\n }\n // Parse the children of this node (if any)\n parseNodes(\n currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex);\n // Remove the parent node after the children\n icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n icuCase.create.push(\n hasBinding ? '' : value, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const match = NESTED_ICU.exec(currentNode.textContent || '');\n if (match) {\n const nestedIcuIndex = parseInt(match[1], 10);\n const newLocal = ngDevMode ? `nested ICU ${nestedIcuIndex}` : '';\n // Create the comment node that will anchor the ICU expression\n icuCase.create.push(\n COMMENT_MARKER, newLocal, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n const nestedIcu = nestedIcus[nestedIcuIndex];\n nestedIcusToCreate.push([nestedIcu, newIndex]);\n } else {\n // We do not handle any other type of comment\n icuCase.vars--;\n }\n break;\n default:\n // We do not handle any other type of element\n icuCase.vars--;\n }\n currentNode = nextNode !;\n }\n\n for (let i = 0; i < nestedIcusToCreate.length; i++) {\n const nestedIcu = nestedIcusToCreate[i][0];\n const nestedIcuNodeIndex = nestedIcusToCreate[i][1];\n icuStart(tIcus, nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n const nestTIcuIndex = tIcus.length - 1;\n icuCase.vars += Math.max(...tIcus[nestTIcuIndex].vars);\n icuCase.childIcus.push(nestTIcuIndex);\n const mask = getBindingMask(nestedIcu);\n icuCase.update.push(\n toMaskBit(nestedIcu.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - nestedIcu.mainBinding,\n nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch,\n nestTIcuIndex,\n mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate,\n nestTIcuIndex);\n icuCase.remove.push(\n nestTIcuIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.RemoveNestedIcu,\n nestedIcuNodeIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n }\n }\n}\n\nlet TRANSLATIONS: {[key: string]: string} = {};\nexport interface I18nLocalizeOptions { translations: {[key: string]: string}; }\n\n/**\n * Set the configuration for `i18nLocalize`.\n *\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function i18nConfigureLocalize(options: I18nLocalizeOptions = {\n translations: {}\n}) {\n TRANSLATIONS = options.translations;\n}\n\nconst LOCALIZE_PH_REGEXP = /\\{\\$(.*?)\\}/g;\n\n/**\n * A goog.getMsg-like function for users that do not use Closure.\n *\n * This method is required as a *temporary* measure to prevent i18n tests from being blocked while\n * running outside of Closure Compiler. This method will not be needed once runtime translation\n * service support is introduced.\n *\n * @codeGenApi\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function ɵɵi18nLocalize(input: string, placeholders?: {[key: string]: string}) {\n if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string\n input = TRANSLATIONS[input];\n }\n if (placeholders !== undefined && Object.keys(placeholders).length) {\n return input.replace(LOCALIZE_PH_REGEXP, (_, key) => placeholders[key] || '');\n }\n return input;\n}\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\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\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../render3/ng_module_ref';\nimport {stringify} from '../util/stringify';\n\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map<string, NgModuleFactory<any>|NgModuleType>();\n\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nexport function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {\n const existing = modules.get(id) as NgModuleFactory<any>;\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>| null, incoming: Type<any>): void {\n if (type && type !== incoming) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n\nexport function registerNgModuleType(ngModuleType: NgModuleType) {\n if (ngModuleType.ngModuleDef.id !== null) {\n const id = ngModuleType.ngModuleDef.id;\n const existing = modules.get(id) as NgModuleType | null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n\n let imports = ngModuleType.ngModuleDef.imports;\n if (imports instanceof Function) {\n imports = imports();\n }\n if (imports) {\n imports.forEach((i: NgModuleType<any>) => registerNgModuleType(i));\n }\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string) {\n return modules.get(id);\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\nimport {Injector} from '../di/injector';\nimport {INJECTOR} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\nimport {StaticProvider} from '../di/interface/provider';\nimport {R3Injector, createInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {registerNgModuleType} from '../linker/ng_module_factory_registration';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgLocaleIdDef, getNgModuleDef} from './definition';\nimport {setLocaleId} from './i18n';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\nexport interface NgModuleType<T = any> extends Type<T> { ngModuleDef: NgModuleDef<T>; }\n\nconst COMPONENT_FACTORY_RESOLVER: StaticProvider = {\n provide: viewEngine_ComponentFactoryResolver,\n useClass: ComponentFactoryResolver,\n deps: [viewEngine_NgModuleRef],\n};\n\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n // tslint:disable-next-line:require-internal-with-underscore\n _r3Injector: R3Injector;\n injector: Injector = this;\n instance: T;\n destroyCbs: (() => void)[]|null = [];\n\n constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode && assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n if (ngLocaleIdDef) {\n setLocaleId(ngLocaleIdDef);\n }\n\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef !.bootstrap);\n const additionalProviders: StaticProvider[] = [\n {\n provide: viewEngine_NgModuleRef,\n useValue: this,\n },\n COMPONENT_FACTORY_RESOLVER\n ];\n this._r3Injector = createInjector(\n ngModuleType, _parent, additionalProviders, stringify(ngModuleType)) as R3Injector;\n this.instance = this.get(ngModuleType);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n if (token === Injector || token === viewEngine_NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n }\n\n get componentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return this.get(viewEngine_ComponentFactoryResolver);\n }\n\n destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs !.forEach(fn => fn());\n this.destroyCbs = null;\n }\n onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs !.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n\n const ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType as NgModuleType);\n }\n }\n\n create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector);\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\nimport {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n decorators?: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being\n * tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null,\n propDecorators: {[field: string]: any} | null): void {\n return noSideEffects(() => {\n const clazz = type as TypeWithMetadata;\n\n // We determine whether a class has its own metadata by taking the metadata from the parent\n // constructor and checking whether it's the same as the subclass metadata below. We can't use\n // `hasOwnProperty` here because it doesn't work correctly in IE10 for static fields that are\n // defined by TS. See https://github.com/angular/angular/pull/28439#issuecomment-459349218.\n const parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;\n const parentConstructor: TypeWithMetadata|null = parentPrototype && parentPrototype.constructor;\n\n if (decorators !== null) {\n if (clazz.decorators !== undefined &&\n (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {\n clazz.decorators.push(...decorators);\n } else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which use\n // tsickle-style annotations and reflect over them in the same way, this could cause issues,\n // but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have different\n // decorator types. Decorators on individual fields are not merged, as it's also incredibly\n // unlikely that a field will be decorated both with an Angular decorator and a non-Angular\n // decorator that's also been downleveled.\n if (clazz.propDecorators !== undefined &&\n (!parentConstructor || parentConstructor.propDecorators !== clazz.propDecorators)) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\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\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {getBindingRoot, getLView, isCreationMode} from './state';\n\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |------consts------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return isCreationMode() ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const lView = getLView();\n const bindingIndex = getBindingRoot() + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getBinding(lView, bindingIndex + 1);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(\n lView, bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getBinding(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(\n lView, bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getBinding(lView, bindingIndex + 3);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,\n exp3: any, exp4: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(\n lView, bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getBinding(lView, bindingIndex + 4);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(\n lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(\n lView, bindingIndex + 6, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(\n lView, bindingIndex + 7, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(\n lView, bindingIndex + 8, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n let bindingIndex = getBindingRoot() + slotOffset;\n let different = false;\n const lView = getLView();\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getBinding(lView, bindingIndex);\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\nimport {WrappedValue} from '../change_detection/change_detection_util';\nimport {PipeTransform} from '../change_detection/pipe_transform';\n\nimport {store, ɵɵload} from './instructions/all';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';\nimport {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunctionV} from './pure_function';\nimport {getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getLView()[TVIEW];\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeInstance = pipeDef.factory();\n store(index, pipeInstance);\n return pipeInstance;\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n *\n * @publicApi\n */\nfunction getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> {\n if (registry) {\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(`The pipe '${name}' could not be found!`);\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ?\n ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ?\n ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(index: number): boolean {\n return (<PipeDef<any>>getLView()[TVIEW].data[index + HEADER_OFFSET]).pure;\n}\n\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue(newValue: any): any {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n const lView = getLView();\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n const bindingToInvalidateIdx = lView[BINDING_INDEX];\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\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/// <reference types=\"rxjs\" />\n\nimport {Subject, Subscription} from 'rxjs';\n\n/**\n * Use in directives and components to emit custom events synchronously\n * or asynchronously, and register handlers for those events by subscribing\n * to an instance.\n *\n * @usageNotes\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @publicApi\n */\nexport class EventEmitter<T> extends Subject<T> {\n // TODO: mark this as internal once all the facades are gone\n // we can't mark it as internal now because EventEmitter exported via @angular/core would not\n // contain this property making it incompatible with all the code that uses EventEmitter via\n // facades, which are local to the code and do not have this property stripped.\n /**\n * Internal\n */\n __isAsync: boolean; // tslint:disable-line\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param isAsync When true, deliver events asynchronously.\n *\n */\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T) { super.next(value); }\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param generatorOrNext When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification\n * from this emitter.\n * @param complete When supplied, a custom handler for a completion\n * notification from this emitter.\n */\n subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription {\n let schedulerFn: (t: any) => any;\n let errorFn = (err: any): any => null;\n let completeFn = (): any => null;\n\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? (value: any) => {\n setTimeout(() => generatorOrNext.next(value));\n } : (value: any) => { generatorOrNext.next(value); };\n\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :\n (err) => { generatorOrNext.error(err); };\n }\n\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :\n () => { generatorOrNext.complete(); };\n }\n } else {\n schedulerFn = this.__isAsync ? (value: any) => { setTimeout(() => generatorOrNext(value)); } :\n (value: any) => { generatorOrNext(value); };\n\n if (error) {\n errorFn =\n this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };\n }\n\n if (complete) {\n completeFn =\n this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };\n }\n }\n\n const sink = super.subscribe(schedulerFn, errorFn, completeFn);\n\n if (generatorOrNext instanceof Subscription) {\n generatorOrNext.add(sink);\n }\n\n return sink;\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\nimport {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {flatten} from '../util/array_utils';\nimport {getSymbolIterator} from '../util/symbol';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n return ((this as any as{_results: Array<T>})._results as any)[getSymbolIterator()]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T>/* implements Iterable<T> */ {\n public readonly dirty = true;\n private _results: Array<T> = [];\n public readonly changes: Observable<any> = new EventEmitter();\n\n readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n readonly first !: T;\n // TODO(issue/24571): remove '!'.\n readonly last !: T;\n\n constructor() {\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype as any;\n if (!proto[symbol]) proto[symbol] = symbolIterator;\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] { return this._results.map(fn); }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T|undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void { this._results.forEach(fn); }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] { return this._results.slice(); }\n\n toString(): string { return this._results.toString(); }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The results tree to store\n */\n reset(resultsTree: Array<T|any[]>): void {\n this._results = flatten(resultsTree);\n (this as{dirty: boolean}).dirty = false;\n (this as{length: number}).length = this._results.length;\n (this as{last: T}).last = this._results[this.length - 1];\n (this as{first: T}).first = this._results[0];\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void { (this.changes as EventEmitter<any>).emit(this); }\n\n /** internal */\n setDirty() { (this as{dirty: boolean}).dirty = true; }\n\n /** internal */\n destroy(): void {\n (this.changes as EventEmitter<any>).complete();\n (this.changes as EventEmitter<any>).unsubscribe();\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// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {Type} from '../interface/type';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {assertDataInRange, assertDefined, assertEqual} from '../util/assert';\n\nimport {assertPreviousIsParent} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {NG_ELEMENT_ID} from './fields';\nimport {store} from './instructions/all';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';\nimport {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';\nimport {LQueries, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';\nimport {CONTENT_QUERIES, HEADER_OFFSET, LView, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {getCurrentQueryIndex, getIsParent, getLView, getPreviousOrParentTNode, isCreationMode, setCurrentQueryIndex} from './state';\nimport {isContentQueryHost, loadInternal} from './util/view_utils';\nimport {createElementRef, createTemplateRef} from './view_engine_compatibility';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;\n\n/**\n * A predicate which determines if a given element/directive should be included in the query\n * results.\n */\nexport interface QueryPredicate<T> {\n /**\n * If looking for directives then it contains the directive type.\n */\n type: Type<T>|null;\n\n /**\n * If selector then contains local names to query for.\n */\n selector: string[]|null;\n\n /**\n * Indicates which token should be read from DI for this query.\n */\n read: Type<T>|null;\n}\n\n/**\n * An object representing a query, which is a combination of:\n * - query predicate to determines if a given element/directive should be included in the query\n * - values collected based on a predicate\n * - `QueryList` to which collected values should be reported\n */\nclass LQuery<T> {\n constructor(\n /**\n * Next query. Used when queries are stored as a linked list in `LQueries`.\n */\n public next: LQuery<any>|null,\n\n /**\n * Destination to which the value should be added.\n */\n public list: QueryList<T>,\n\n /**\n * A predicate which determines if a given element/directive should be included in the query\n * results.\n */\n public predicate: QueryPredicate<T>,\n\n /**\n * Values which have been located.\n * This is what builds up the `QueryList._valuesTree`.\n */\n public values: any[],\n\n /**\n * A pointer to an array that stores collected values from views. This is necessary so we\n * know a container into which to insert nodes collected from views.\n */\n public containerValues: any[]|null) {}\n}\n\nexport class LQueries_ implements LQueries {\n constructor(\n public parent: LQueries_|null, private shallow: LQuery<any>|null,\n private deep: LQuery<any>|null, public nodeIndex: number = -1) {}\n\n track<T>(queryList: QueryList<T>, predicate: Type<T>|string[], descend?: boolean, read?: Type<T>):\n void {\n if (descend) {\n this.deep = createLQuery(this.deep, queryList, predicate, read != null ? read : null);\n } else {\n this.shallow = createLQuery(this.shallow, queryList, predicate, read != null ? read : null);\n }\n }\n\n clone(tNode: TNode): LQueries {\n return this.shallow !== null || isContentQueryHost(tNode) ?\n new LQueries_(this, null, this.deep, tNode.index) :\n this;\n }\n\n container(): LQueries|null {\n const shallowResults = copyQueriesToContainer(this.shallow);\n const deepResults = copyQueriesToContainer(this.deep);\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n }\n\n createView(): LQueries|null {\n const shallowResults = copyQueriesToView(this.shallow);\n const deepResults = copyQueriesToView(this.deep);\n\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n }\n\n insertView(index: number): void {\n insertView(index, this.shallow);\n insertView(index, this.deep);\n }\n\n addNode(tNode: TElementNode|TContainerNode|TElementContainerNode): void {\n add(this.deep, tNode, false);\n add(this.shallow, tNode, false);\n }\n\n insertNodeBeforeViews(tNode: TElementNode|TContainerNode|TElementContainerNode): void {\n add(this.deep, tNode, true);\n add(this.shallow, tNode, true);\n }\n\n removeView(): void {\n removeView(this.shallow);\n removeView(this.deep);\n }\n}\n\nfunction copyQueriesToContainer(query: LQuery<any>| null): LQuery<any>|null {\n let result: LQuery<any>|null = null;\n\n while (query) {\n const containerValues: any[] = []; // prepare room for views\n query.values.push(containerValues);\n result = new LQuery<any>(result, query.list, query.predicate, containerValues, null);\n query = query.next;\n }\n\n return result;\n}\n\nfunction copyQueriesToView(query: LQuery<any>| null): LQuery<any>|null {\n let result: LQuery<any>|null = null;\n\n while (query) {\n result = new LQuery<any>(result, query.list, query.predicate, [], query.values);\n query = query.next;\n }\n\n return result;\n}\n\nfunction insertView(index: number, query: LQuery<any>| null) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n query.containerValues !.splice(index, 0, query.values);\n\n // mark a query as dirty only when inserted view had matching modes\n if (query.values.length) {\n query.list.setDirty();\n }\n\n query = query.next;\n }\n}\n\nfunction removeView(query: LQuery<any>| null) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n\n const containerValues = query.containerValues !;\n const viewValuesIdx = containerValues.indexOf(query.values);\n const removed = containerValues.splice(viewValuesIdx, 1);\n\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n\n query = query.next;\n }\n}\n\nfunction assertViewQueryhasPointerToDeclarationContainer(query: LQuery<any>) {\n assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number|null {\n const localNames = tNode.localNames;\n if (localNames) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\n\n// TODO: \"read\" should be an AbstractType (FW-486)\nfunction queryByReadToken(read: any, tNode: TNode, currentView: LView): any {\n const factoryFn = (read as any)[NG_ELEMENT_ID];\n if (typeof factoryFn === 'function') {\n return factoryFn();\n } else {\n const tView = currentView[TVIEW];\n const matchingIdx = locateDirectiveOrProvider(tNode, tView, read as Type<any>, false, false);\n if (matchingIdx !== null) {\n return getNodeInjectable(tView.data, currentView, matchingIdx, tNode as TElementNode);\n }\n }\n return null;\n}\n\nfunction queryByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n return createElementRef(ViewEngine_ElementRef, tNode, currentView);\n }\n if (tNode.type === TNodeType.Container) {\n return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\n }\n return null;\n}\n\nfunction queryByTemplateRef(\n templateRefToken: ViewEngine_TemplateRef<any>, tNode: TNode, currentView: LView,\n read: any): any {\n const templateRefResult = (templateRefToken as any)[NG_ELEMENT_ID]();\n if (read) {\n return templateRefResult ? queryByReadToken(read, tNode, currentView) : null;\n }\n return templateRefResult;\n}\n\nfunction queryRead(tNode: TNode, currentView: LView, read: any, matchingIdx: number): any {\n if (read) {\n return queryByReadToken(read, tNode, currentView);\n }\n if (matchingIdx > -1) {\n return getNodeInjectable(\n currentView[TVIEW].data, currentView, matchingIdx, tNode as TElementNode);\n }\n // if read token and / or strategy is not specified,\n // detect it using appropriate tNode type\n return queryByTNodeType(tNode, currentView);\n}\n\n/**\n * Add query matches for a given node.\n *\n * @param query The first query in the linked list\n * @param tNode The TNode to match against queries\n * @param insertBeforeContainer Whether or not we should add matches before the last\n * container array. This mode is necessary if the query container had to be created\n * out of order (e.g. a view was created in a constructor)\n */\nfunction add(\n query: LQuery<any>| null, tNode: TElementNode | TContainerNode | TElementContainerNode,\n insertBeforeContainer: boolean) {\n const lView = getLView();\n const tView = lView[TVIEW];\n\n while (query) {\n const predicate = query.predicate;\n const type = predicate.type as any;\n if (type) {\n let result = null;\n if (type === ViewEngine_TemplateRef) {\n result = queryByTemplateRef(type, tNode, lView, predicate.read);\n } else {\n const matchingIdx = locateDirectiveOrProvider(tNode, tView, type, false, false);\n if (matchingIdx !== null) {\n result = queryRead(tNode, lView, predicate.read, matchingIdx);\n }\n }\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n } else {\n const selector = predicate.selector !;\n for (let i = 0; i < selector.length; i++) {\n const matchingIdx = getIdxOfMatchingSelector(tNode, selector[i]);\n if (matchingIdx !== null) {\n const result = queryRead(tNode, lView, predicate.read, matchingIdx);\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n }\n }\n }\n query = query.next;\n }\n}\n\nfunction addMatch(query: LQuery<any>, matchingValue: any, insertBeforeViewMatches: boolean): void {\n // Views created in constructors may have their container values created too early. In this case,\n // ensure template node results are unshifted before container results. Otherwise, results inside\n // embedded views will appear before results on parent template nodes when flattened.\n insertBeforeViewMatches ? query.values.unshift(matchingValue) : query.values.push(matchingValue);\n query.list.setDirty();\n}\n\nfunction createPredicate<T>(predicate: Type<T>| string[], read: Type<T>| null): QueryPredicate<T> {\n const isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate as Type<T>,\n selector: isArray ? predicate as string[] : null,\n read: read\n };\n}\n\nfunction createLQuery<T>(\n previous: LQuery<any>| null, queryList: QueryList<T>, predicate: Type<T>| string[],\n read: Type<T>| null): LQuery<T> {\n return new LQuery(\n previous, queryList, createPredicate(predicate, read),\n (queryList as any as QueryList_<T>)._valuesTree, null);\n}\n\ntype QueryList_<T> = QueryList<T>& {_valuesTree: any[], _static: boolean};\n\n/**\n * Creates a QueryList and stores it in LView's collection of active queries (LQueries).\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n */\nfunction createQueryListInLView<T>(\n // TODO: \"read\" should be an AbstractType (FW-486)\n lView: LView, predicate: Type<any>| string[], descend: boolean, read: any, isStatic: boolean,\n nodeIndex: number): QueryList<T> {\n ngDevMode && assertPreviousIsParent(getIsParent());\n const queryList = new QueryList<T>() as QueryList_<T>;\n const queries = lView[QUERIES] || (lView[QUERIES] = new LQueries_(null, null, null, nodeIndex));\n queryList._valuesTree = [];\n queryList._static = isStatic;\n queries.track(queryList, predicate, descend, read);\n storeCleanupWithContext(lView, queryList, queryList.destroy);\n return queryList;\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const queryListImpl = (queryList as any as QueryList_<any>);\n const creationMode = isCreationMode();\n\n // if creation mode and static or update mode and not static\n if (queryList.dirty && creationMode === queryListImpl._static) {\n queryList.reset(queryListImpl._valuesTree || []);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}\n\n/**\n * Creates new QueryList for a static view query.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵstaticViewQuery<T>(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate: Type<any>| string[], descend: boolean, read: any): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n viewQueryInternal(lView, tView, predicate, descend, read, true);\n tView.staticViewQueries = true;\n}\n\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate: Type<any>| string[], descend: boolean, read: any): QueryList<T> {\n const lView = getLView();\n const tView = lView[TVIEW];\n return viewQueryInternal(lView, tView, predicate, descend, read, false);\n}\n\nfunction viewQueryInternal<T>(\n lView: LView, tView: TView, predicate: Type<any>| string[], descend: boolean, read: any,\n isStatic: boolean): QueryList<T> {\n if (tView.firstTemplatePass) {\n tView.expandoStartIndex++;\n }\n const index = getCurrentQueryIndex();\n const queryList: QueryList<T> =\n createQueryListInLView<T>(lView, predicate, descend, read, isStatic, -1);\n store(index - HEADER_OFFSET, queryList);\n setCurrentQueryIndex(index + 1);\n return queryList;\n}\n\n/**\n * Loads current View Query and moves the pointer/index to the next View Query in LView.\n *\n * @codeGenApi\n */\nexport function ɵɵloadViewQuery<T>(): T {\n const index = getCurrentQueryIndex();\n setCurrentQueryIndex(index + 1);\n return loadInternal<T>(getLView(), index - HEADER_OFFSET);\n}\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number, predicate: Type<any>| string[], descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any): QueryList<T> {\n const lView = getLView();\n const tView = lView[TVIEW];\n const tNode = getPreviousOrParentTNode();\n return contentQueryInternal(\n lView, tView, directiveIndex, predicate, descend, read, false, tNode.index);\n}\n\nfunction contentQueryInternal<T>(\n lView: LView, tView: TView, directiveIndex: number, predicate: Type<any>| string[],\n descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any, isStatic: boolean, nodeIndex: number): QueryList<T> {\n const contentQuery: QueryList<T> =\n createQueryListInLView<T>(lView, predicate, descend, read, isStatic, nodeIndex);\n (lView[CONTENT_QUERIES] || (lView[CONTENT_QUERIES] = [])).push(contentQuery);\n if (tView.firstTemplatePass) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex =\n tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(directiveIndex);\n }\n }\n return contentQuery;\n}\n\n/**\n * Registers a QueryList, associated with a static content query, for later refresh\n * (part of a view refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵstaticContentQuery<T>(\n directiveIndex: number, predicate: Type<any>| string[], descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n const tNode = getPreviousOrParentTNode();\n contentQueryInternal(lView, tView, directiveIndex, predicate, descend, read, true, tNode.index);\n tView.staticContentQueries = true;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵloadContentQuery<T>(): QueryList<T> {\n const lView = getLView();\n ngDevMode &&\n assertDefined(\n lView[CONTENT_QUERIES], 'Content QueryList array should be defined if reading a query.');\n\n const index = getCurrentQueryIndex();\n ngDevMode && assertDataInRange(lView[CONTENT_QUERIES] !, index);\n\n setCurrentQueryIndex(index + 1);\n return lView[CONTENT_QUERIES] ![index];\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\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\n\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\nimport {createTemplateRef} from './view_engine_compatibility';\n\n\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView) {\n return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\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\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: Function} =\n (() => ({\n 'ɵɵattribute': r3.ɵɵattribute,\n 'ɵɵattributeInterpolate1': r3.ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': r3.ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': r3.ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': r3.ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': r3.ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': r3.ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': r3.ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': r3.ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': r3.ɵɵattributeInterpolateV,\n 'ɵɵdefineBase': r3.ɵɵdefineBase,\n 'ɵɵdefineComponent': r3.ɵɵdefineComponent,\n 'ɵɵdefineDirective': r3.ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,\n 'ɵɵdefinePipe': r3.ɵɵdefinePipe,\n 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,\n 'ɵɵgetFactoryOf': r3.ɵɵgetFactoryOf,\n 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵcontainer': r3.ɵɵcontainer,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵcontainerRefreshStart': r3.ɵɵcontainerRefreshStart,\n 'ɵɵcontainerRefreshEnd': r3.ɵɵcontainerRefreshEnd,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵallocHostVars': r3.ɵɵallocHostVars,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵpureFunction0': r3.ɵɵpureFunction0,\n 'ɵɵpureFunction1': r3.ɵɵpureFunction1,\n 'ɵɵpureFunction2': r3.ɵɵpureFunction2,\n 'ɵɵpureFunction3': r3.ɵɵpureFunction3,\n 'ɵɵpureFunction4': r3.ɵɵpureFunction4,\n 'ɵɵpureFunction5': r3.ɵɵpureFunction5,\n 'ɵɵpureFunction6': r3.ɵɵpureFunction6,\n 'ɵɵpureFunction7': r3.ɵɵpureFunction7,\n 'ɵɵpureFunction8': r3.ɵɵpureFunction8,\n 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,\n 'ɵɵrestoreView': r3.ɵɵrestoreView,\n 'ɵɵinterpolation1': r3.ɵɵinterpolation1,\n 'ɵɵinterpolation2': r3.ɵɵinterpolation2,\n 'ɵɵinterpolation3': r3.ɵɵinterpolation3,\n 'ɵɵinterpolation4': r3.ɵɵinterpolation4,\n 'ɵɵinterpolation5': r3.ɵɵinterpolation5,\n 'ɵɵinterpolation6': r3.ɵɵinterpolation6,\n 'ɵɵinterpolation7': r3.ɵɵinterpolation7,\n 'ɵɵinterpolation8': r3.ɵɵinterpolation8,\n 'ɵɵinterpolationV': r3.ɵɵinterpolationV,\n 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵload': r3.ɵɵload,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵupdateSyntheticHostBinding': r3.ɵɵupdateSyntheticHostBinding,\n 'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,\n 'ɵɵpipeBind1': r3.ɵɵpipeBind1,\n 'ɵɵpipeBind2': r3.ɵɵpipeBind2,\n 'ɵɵpipeBind3': r3.ɵɵpipeBind3,\n 'ɵɵpipeBind4': r3.ɵɵpipeBind4,\n 'ɵɵpipeBindV': r3.ɵɵpipeBindV,\n 'ɵɵprojectionDef': r3.ɵɵprojectionDef,\n 'ɵɵproperty': r3.ɵɵproperty,\n 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV,\n 'ɵɵpipe': r3.ɵɵpipe,\n 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,\n 'ɵɵviewQuery': r3.ɵɵviewQuery,\n 'ɵɵstaticViewQuery': r3.ɵɵstaticViewQuery,\n 'ɵɵstaticContentQuery': r3.ɵɵstaticContentQuery,\n 'ɵɵloadViewQuery': r3.ɵɵloadViewQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵloadContentQuery': r3.ɵɵloadContentQuery,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵelementHostAttrs': r3.ɵɵelementHostAttrs,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵstyling': r3.ɵɵstyling,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstyleSanitizer': r3.ɵɵstyleSanitizer,\n 'ɵɵstylingApply': r3.ɵɵstylingApply,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵselect': r3.ɵɵselect,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵtext': r3.ɵɵtext,\n 'ɵɵtextBinding': r3.ɵɵtextBinding,\n 'ɵɵtextInterpolate': r3.ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': r3.ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': r3.ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': r3.ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': r3.ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': r3.ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': r3.ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': r3.ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': r3.ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': r3.ɵɵtextInterpolateV,\n 'ɵɵembeddedViewStart': r3.ɵɵembeddedViewStart,\n 'ɵɵembeddedViewEnd': r3.ɵɵembeddedViewEnd,\n 'ɵɵi18n': r3.ɵɵi18n,\n 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,\n 'ɵɵi18nExp': r3.ɵɵi18nExp,\n 'ɵɵi18nStart': r3.ɵɵi18nStart,\n 'ɵɵi18nEnd': r3.ɵɵi18nEnd,\n 'ɵɵi18nApply': r3.ɵɵi18nApply,\n 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,\n 'ɵɵi18nLocalize': r3.ɵɵi18nLocalize,\n 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵdefaultStyleSanitizer': sanitization.ɵɵdefaultStyleSanitizer,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\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\nimport {R3InjectorMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJECTOR_DEF} from '../../di/interface/defs';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Component} from '../../metadata';\nimport {ModuleWithProviders, NgModule, NgModuleDef, NgModuleTransitiveScopes} from '../../metadata/ng_module';\nimport {flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {NgModuleType} from '../ng_module_ref';\nimport {maybeUnwrapFn, stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\n\nconst EMPTY_ARRAY: Type<any>[] = [];\n\ninterface ModuleQueueItem {\n moduleType: Type<any>;\n ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const {moduleType, ngModule} = moduleQueue[i];\n\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n } finally {\n flushingModuleQueue = false;\n }\n }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[] | Type<any>): boolean {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n moduleType: NgModuleType, ngModule: NgModule,\n allowDuplicateDeclarationsInRoot: boolean = false): void {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef: any = null;\n Object.defineProperty(moduleType, NG_MODULE_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n ngModuleDef = getCompilerFacade().compileNgModule(\n angularCoreEnv, `ng:///${moduleType.name}/ngModuleDef.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n emitInline: true,\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n }\n return ngModuleDef;\n }\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJECTOR_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode && verifySemanticsOfNgModuleDef(\n moduleType as any as NgModuleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n ngInjectorDef = getCompilerFacade().compileInjector(\n angularCoreEnv, `ng:///${moduleType.name}/ngInjectorDef.js`, meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean): void {\n if (verifiedNgModule.get(moduleType)) return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n const ngModuleDef = getNgModuleDef(moduleType, true);\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(mod => verifySemanticsOfNgModuleDef(mod, false));\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n const combinedDeclarations: Type<any>[] = [\n ...declarations.map(resolveForwardRef), //\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n\n const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(mod => verifySemanticsOfNgModuleDef(mod, false));\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyCorrectBootstrapType);\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyComponentIsPartOfNgModule);\n ngModule.entryComponents && ngModule.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(\n `Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n\n function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(\n `Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n }\n }\n }\n\n function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\n `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n }\n } else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n\n function verifyComponentIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(\n `Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n }\n }\n\n function verifyCorrectBootstrapType(type: Type<any>) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n }\n\n function verifyComponentEntryComponentsIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n const component = getAnnotation<Component>(type, 'Component');\n if (component && component.entryComponents) {\n component.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(\n typeOrWithProviders: NgModuleType<any>| {ngModule: NgModuleType<any>}): NgModuleType<any> {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T|null {\n let annotation: T|null = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n\n function collect(annotations: any[] | null) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n\n function readAnnotation(\n decorator: {type: {prototype: {ngMetadataName: string}, args: any[]}, args: any}): void {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator as any;\n } else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n moduleQueue.length = 0;\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type, true);\n return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n return computeCombinedExports(type);\n } else {\n return type;\n }\n }))];\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ngComponentDef set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n const transitiveScopes = transitiveScopesFor(moduleType);\n\n declarations.forEach(declaration => {\n if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n // An `ngComponentDef` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any>& {ngComponentDef: ComponentDef<any>};\n const componentDef = getComponentDef(component) !;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIRECTIVE_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n (declaration as Type<any>& {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n }\n });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n componentDef: ComponentDef<C>, transitiveScopes: NgModuleTransitiveScopes) {\n componentDef.directiveDefs = () =>\n Array.from(transitiveScopes.compilation.directives)\n .map(\n dir => dir.hasOwnProperty(NG_COMPONENT_DEF) ? getComponentDef(dir) ! :\n getDirectiveDef(dir) !)\n .filter(def => !!def);\n componentDef.pipeDefs = () =>\n Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe) !);\n componentDef.schemas = transitiveScopes.schemas;\n\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be called\n * on modules with components that have not fully compiled yet, but the result should not be used\n * until they have.\n */\nexport function transitiveScopesFor<T>(\n moduleType: Type<T>,\n processNgModuleFn?: (ngModule: NgModuleType) => void): NgModuleTransitiveScopes {\n if (!isNgModule(moduleType)) {\n throw new Error(`${moduleType.name} does not have an ngModuleDef`);\n }\n const def = getNgModuleDef(moduleType) !;\n\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n\n const scopes: NgModuleTransitiveScopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n };\n\n maybeUnwrapFn(def.declarations).forEach(declared => {\n const declaredWithDefs = declared as Type<any>& { ngPipeDef?: any; };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has an ngComponentDef or ngDirectiveDef, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n\n maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n const importedType = imported as Type<I>& {\n // If imported is an @NgModule:\n ngModuleDef?: NgModuleDef<I>;\n };\n\n if (!isNgModule<I>(importedType)) {\n throw new Error(`Importing ${importedType.name} which does not have an ngModuleDef`);\n }\n\n if (processNgModuleFn) {\n processNgModuleFn(importedType as NgModuleType);\n }\n\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(importedType, processNgModuleFn);\n importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n });\n\n maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E>& {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ngComponentDef?: any;\n ngDirectiveDef?: any;\n ngModuleDef?: NgModuleDef<E>;\n ngPipeDef?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have an\n // ngComponentDef as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType, processNgModuleFn);\n exportedScope.exported.directives.forEach(entry => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(entry => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n } else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n } else {\n scopes.exported.directives.add(exportedType);\n }\n });\n\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any>| ModuleWithProviders<{}>): Type<any> {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as{ngModule?: any}).ngModule !== undefined;\n}\n\nfunction isNgModule<T>(value: Type<T>): value is Type<T>&{ngModuleDef: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\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\nimport {R3DirectiveMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {R3BaseMetadataFacade, R3ComponentMetadataFacade, R3QueryMetadataFacade} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {compileInjectable} from '../../di/jit/injectable';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Query} from '../../metadata/di';\nimport {Component, Directive, Input} from '../../metadata/directives';\nimport {componentNeedsResolution, maybeQueueResolutionOfComponentResources} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {getBaseDef, getComponentDef, getDirectiveDef} from '../definition';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF} from '../fields';\nimport {ComponentType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {flushModuleScopingQueueAsMuchAsPossible, patchComponentDefWithScope, transitiveScopesFor} from './module';\n\n\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * ngComponentDef onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ngComponentDef`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n let ngComponentDef: any = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n Object.defineProperty(type, NG_COMPONENT_DEF, {\n get: () => {\n const compiler = getCompilerFacade();\n if (ngComponentDef === null) {\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta: R3ComponentMetadataFacade = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces: metadata.preserveWhitespaces || false,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n directives: [],\n changeDetection: metadata.changeDetection,\n pipes: new Map(),\n encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n };\n if (meta.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n\n // Add ngInjectableDef so components are reachable through the module injector by default\n // This is mostly to support injecting components in tests. In real application code,\n // components should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n}\n\nfunction hasSelectorScope<T>(component: Type<T>): component is Type<T>&\n {ngSelectorScope: Type<any>} {\n return (component as{ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * ngDirectiveDef onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive): void {\n let ngDirectiveDef: any = null;\n Object.defineProperty(type, NG_DIRECTIVE_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ngDirectiveDef.js`;\n const compiler = getCompilerFacade();\n const facade = directiveMetadata(type as ComponentType<any>, directive);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngDirectiveDef = compiler.compileDirective(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n // Add ngInjectableDef so directives are reachable through the module injector by default\n // This is mostly to support injecting directives in tests. In real application code,\n // directives should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n // Reflect inputs and outputs.\n const propMetadata = getReflect().ownPropMetadata(type);\n\n return {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n selector: metadata.selector !,\n deps: reflectDependencies(type),\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: {usesOnChanges: type.prototype.hasOwnProperty('ngOnChanges')},\n typeSourceSpan: null !,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n };\n}\n\n/**\n * Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addBaseDefToUndecoratedParents(type: Type<any>) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type);\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the base def if there are no annotations and the base def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) && !getBaseDef(parent)) {\n const facade = extractBaseDefMetadata(parent);\n facade && compileBase(parent, facade);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\n\n/** Compiles the base metadata into a base definition. */\nfunction compileBase(type: Type<any>, facade: R3BaseMetadataFacade): void {\n let ngBaseDef: any = null;\n Object.defineProperty(type, NG_BASE_DEF, {\n get: () => {\n if (ngBaseDef === null) {\n const name = type && type.name;\n const sourceMapUrl = `ng://${name}/ngBaseDef.js`;\n const compiler = getCompilerFacade();\n ngBaseDef = compiler.compileBase(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngBaseDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\n/** Extracts the metadata necessary to construct an `ngBaseDef` from a class. */\nfunction extractBaseDefMetadata(type: Type<any>): R3BaseMetadataFacade|null {\n const propMetadata = getReflect().ownPropMetadata(type);\n const viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery);\n const queries = extractQueriesMetadata(type, propMetadata, isContentQuery);\n let inputs: {[key: string]: string | [string, string]}|undefined;\n let outputs: {[key: string]: string}|undefined;\n // We only need to know whether there are any HostListener or HostBinding\n // decorators present, the parsing logic is in the compiler already.\n let hasHostDecorators = false;\n\n for (const field in propMetadata) {\n propMetadata[field].forEach(ann => {\n const metadataName = ann.ngMetadataName;\n if (metadataName === 'Input') {\n inputs = inputs || {};\n inputs[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n } else if (metadataName === 'Output') {\n outputs = outputs || {};\n outputs[field] = ann.bindingPropertyName || field;\n } else if (metadataName === 'HostBinding' || metadataName === 'HostListener') {\n hasHostDecorators = true;\n }\n });\n }\n\n // Only generate the base def if there's any info inside it.\n if (inputs || outputs || viewQueries.length || queries.length || hasHostDecorators) {\n return {name: type.name, inputs, outputs, viewQueries, queries, propMetadata};\n }\n\n return null;\n}\n\nfunction convertToR3QueryPredicate(selector: any): any|string[] {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static\n };\n}\nfunction extractQueriesMetadata(\n type: Type<any>, propMetadata: {[key: string]: any[]},\n isQueryAnn: (ann: any) => ann is Query): R3QueryMetadataFacade[] {\n const queriesMeta: R3QueryMetadataFacade[] = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\n `Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnn)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string | undefined): string[]|null {\n if (exportAs === undefined) {\n return null;\n }\n\n return exportAs.split(',').map(part => part.trim());\n}\n\nfunction isContentQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnn(value: any): value is Input {\n return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n return value.split(',').map(piece => piece.trim());\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\nimport {getCompilerFacade} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Pipe} from '../../metadata/directives';\nimport {NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n let ngPipeDef: any = null;\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const typeName = type.name;\n ngPipeDef =\n getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${typeName}/ngPipeDef.js`, {\n type: type,\n typeArgumentCount: 0,\n name: typeName,\n deps: reflectDependencies(type),\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\n });\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\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\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di';\nimport {Type} from '../interface/type';\nimport {compileComponent as render3CompileComponent, compileDirective as render3CompileDirective} from '../render3/jit/directive';\nimport {compilePipe as render3CompilePipe} from '../render3/jit/pipe';\nimport {TypeDecorator, makeDecorator, makePropDecorator} from '../util/decorators';\nimport {noop} from '../util/noop';\n\nimport {ViewEncapsulation} from './view';\n\n\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n /**\n * Decorator that marks a class as an Angular directive.\n * You can define your own directives to attach custom behavior to elements in the DOM.\n *\n * The options provide configuration metadata that determines\n * how the directive should be processed, instantiated and used at\n * runtime.\n *\n * Directive classes, like component classes, can implement\n * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.\n *\n *\n * @usageNotes\n * To define a directive, mark the class with the decorator and provide metadata.\n *\n * ```ts\n * import {Directive} from '@angular/core';\n *\n * @Directive({\n * selector: 'my-directive',\n * })\n * export class MyDirective {\n * ...\n * }\n * ```\n *\n * ### Declaring directives\n *\n * Directives are [declarables](guide/glossary#declarable).\n * They must be declared by an NgModule\n * in order to be usable in an app.\n *\n * A directive must belong to exactly one NgModule. Do not re-declare\n * a directive imported from another module.\n * List the directive class in the `declarations` field of an NgModule.\n *\n * ```ts\n * declarations: [\n * AppComponent,\n * MyDirective\n * ],\n * ```\n *\n * @Annotation\n */\n (obj: Directive): TypeDecorator;\n\n /**\n * See the `Directive` decorator.\n */\n new (obj: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n /**\n * The CSS selector that identifies this directive in a template\n * and triggers instantiation of the directive.\n *\n * Declare as one of the following:\n *\n * - `element-name`: Select by element name.\n * - `.class`: Select by class name.\n * - `[attribute]`: Select by attribute name.\n * - `[attribute=value]`: Select by attribute name and value.\n * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n *\n * Angular only allows directives to apply on CSS selectors that do not cross\n * element boundaries.\n *\n * For the following template HTML, a directive with an `input[type=text]` selector,\n * would be instantiated only on the `<input type=\"text\">` element.\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n */\n selector?: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * @usageNotes\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n *\n * ```\n *\n */\n inputs?: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * in the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * @usageNotes\n *\n * ```typescript\n * @Component({\n * selector: 'child-dir',\n * outputs: [ 'bankNameChange' ]\n * template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n * })\n * class ChildDir {\n * bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `\n * {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n * `\n * })\n * class MainComponent {\n * bankName: string;\n *\n * onBankNameChange(bankName: string) {\n * this.bankName = bankName;\n * }\n * }\n * ```\n *\n */\n outputs?: string[];\n\n /**\n * Configures the [injector](guide/glossary#injector) of this\n * directive or component with a [token](guide/glossary#di-token)\n * that maps to a [provider](guide/glossary#provider) of a dependency.\n */\n providers?: Provider[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * @usageNotes\n *\n * ```ts\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`\n * })\n * class MainComponent {\n * }\n * ```\n *\n */\n exportAs?: string;\n\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * @usageNotes\n *\n * The following example shows how queries are defined\n * and when their results are available in lifecycle hooks:\n *\n * ```ts\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>'\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n *\n * @Annotation\n */\n queries?: {[key: string]: any};\n\n /**\n * Maps class properties to host element bindings for properties,\n * attributes, and events, using a set of key-value pairs.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, Angular updates the directive's host element.\n *\n * When the key is a property of the host element, the property value is\n * the propagated to the specified DOM property.\n *\n * When the key is a static attribute in the DOM, the attribute value\n * is propagated to the specified property in the host element.\n *\n * For event handling:\n * - The key is the DOM event that the directive listens to.\n * To listen to global events, add the target to the event name.\n * The target can be `window`, `document` or `body`.\n * - The value is the statement to execute when the event occurs. If the\n * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n * event. A handler method can refer to the `$event` local variable.\n *\n */\n host?: {[key: string]: string};\n\n /**\n * If true, this directive/component will be skipped by the AOT compiler and so will always be\n * compiled using JIT.\n *\n * This exists to support future Ivy work and has no effect currently.\n */\n jit?: true;\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n 'Directive', (dir: Directive = {}) => dir, undefined, undefined,\n (type: Type<any>, meta: Directive) => SWITCH_COMPILE_DIRECTIVE(type, meta));\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n /**\n * Decorator that marks a class as an Angular component and provides configuration\n * metadata that determines how the component should be processed,\n * instantiated, and used at runtime.\n *\n * Components are the most basic UI building block of an Angular app.\n * An Angular app contains a tree of Angular components.\n *\n * Angular components are a subset of directives, always associated with a template.\n * Unlike other directives, only one component can be instantiated per an element in a template.\n *\n * A component must belong to an NgModule in order for it to be available\n * to another component or application. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * Note that, in addition to these options for configuring a directive,\n * you can control a component's runtime behavior by implementing\n * life-cycle hooks. For more information, see the\n * [Lifecycle Hooks](guide/lifecycle-hooks) guide.\n *\n * @usageNotes\n *\n * ### Setting component inputs\n *\n * The following example creates a component with two data-bound properties,\n * specified by the `inputs` value.\n *\n * <code-example path=\"core/ts/metadata/directives.ts\" region=\"component-input\"\n * linenums=\"false\">\n * </code-example>\n *\n *\n * ### Setting component outputs\n *\n * The following example shows two event emitters that emit on an interval. One\n * emits an output every second, while the other emits every five seconds.\n *\n * {@example core/ts/metadata/directives.ts region='component-output-interval\n * linenums=\"false\"}\n *\n * ### Injecting a class with a view provider\n *\n * The following simple example injects a class into a component\n * using the view provider specified in component metadata:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`\n * })\n * class HelloWorld {\n * }\n *\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.\n * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * By default, the AOT compiler removes whitespace characters as follows:\n * * Trims all whitespaces at the beginning and the end of a template.\n * * Removes whitespace-only text nodes. For example,\n *\n * ```html\n * <button>Action 1</button> <button>Action 2</button>\n * ```\n *\n * becomes:\n *\n * ```html\n * <button>Action 1</button><button>Action 2</button>\n * ```\n *\n * * Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\n (obj: Component): TypeDecorator;\n /**\n * See the `Component` decorator.\n */\n new (obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n /**\n * The change-detection strategy to use for this component.\n *\n * When a component is instantiated, Angular creates a change detector,\n * which is responsible for propagating the component's bindings.\n * The strategy is one of:\n * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n * See [example](#injecting-a-class-with-a-view-provider).\n *\n */\n viewProviders?: Provider[];\n\n /**\n * The module ID of the module that contains the component.\n * The component must be able to resolve relative URLs for templates and styles.\n * SystemJS exposes the `__moduleName` variable within each module.\n * In CommonJS, this can be set to `module.id`.\n *\n */\n moduleId?: string;\n\n /**\n * The relative path or absolute URL of a template file for an Angular component.\n * If provided, do not supply an inline template using `template`.\n *\n */\n templateUrl?: string;\n\n /**\n * An inline template for an Angular component. If provided,\n * do not supply a template file using `templateUrl`.\n *\n */\n template?: string;\n\n /**\n * One or more relative paths or absolute URLs for files containing CSS stylesheets to use\n * in this component.\n */\n styleUrls?: string[];\n\n /**\n * One or more inline CSS stylesheets to use\n * in this component.\n */\n styles?: string[];\n\n /**\n * One or more animation `trigger()` calls, containing\n * `state()` and `transition()` definitions.\n * See the [Animations guide](/guide/animations) and animations API documentation.\n *\n */\n animations?: any[];\n\n /**\n * An encapsulation policy for the template and CSS styles. One of:\n * - `ViewEncapsulation.Native`: Deprecated. Use `ViewEncapsulation.ShadowDom` instead.\n * - `ViewEncapsulation.Emulated`: Use shimmed CSS that\n * emulates the native behavior.\n * - `ViewEncapsulation.None`: Use global CSS without any\n * encapsulation.\n * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.\n *\n * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is\n * `ViewEncapsulation.Emulated`.\n *\n * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`\n * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Overrides the default encapsulation start and end delimiters (`{{` and `}}`)\n */\n interpolation?: [string, string];\n\n /**\n * A set of components that should be compiled along with\n * this component. For each component listed here,\n * Angular creates a {@link ComponentFactory} and stores it in the\n * {@link ComponentFactoryResolver}.\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * True to preserve or false to remove potentially superfluous whitespace characters\n * from the compiled template. Whitespace characters are those matching the `\\s`\n * character class in JavaScript regular expressions. Default is false, unless\n * overridden in compiler options.\n */\n preserveWhitespaces?: boolean;\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n 'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n Directive, undefined,\n (type: Type<any>, meta: Component) => SWITCH_COMPILE_COMPONENT(type, meta));\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n /**\n *\n * Decorator that marks a class as pipe and supplies configuration metadata.\n *\n * A pipe class must implement the `PipeTransform` interface.\n * For example, if the name is \"myPipe\", use a template binding expression\n * such as the following:\n *\n * ```\n * {{ exp | myPipe }}\n * ```\n *\n * The result of the expression is passed to the pipe's `transform()` method.\n *\n * A pipe must belong to an NgModule in order for it to be available\n * to a template. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n */\n (obj: Pipe): TypeDecorator;\n\n /**\n * See the `Pipe` decorator.\n */\n new (obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n /**\n * The pipe name to use in template bindings.\n *\n */\n name: string;\n\n /**\n * When true, the pipe is pure, meaning that the\n * `transform()` method is invoked only when its input arguments\n * change. Pipes are pure by default.\n *\n * If the pipe has internal state (that is, the result\n * depends on state other than its arguments), set `pure` to false.\n * In this case, the pipe is invoked on each change-detection cycle,\n * even if the arguments have not changed.\n */\n pure?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n 'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,\n (type: Type<any>, meta: Pipe) => SWITCH_COMPILE_PIPE(type, meta));\n\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n /**\n * Decorator that marks a class field as an input property and supplies configuration metadata.\n * The input property is bound to a DOM property in the template. During change detection,\n * Angular automatically updates the data property with the DOM property's value.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for input binding.\n *\n * The following example creates a component with two input properties,\n * one of which is given a special binding name.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * // This property is bound using its original name.\n * @Input() bankName: string;\n * // this property value is bound to a different property name\n * // when this component is instantiated in a template.\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and is not automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bankName=\"RBC\" account-id=\"4747\"></bank-account>\n * `\n * })\n * class App {}\n * ```\n */\n (bindingPropertyName?: string): any;\n new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n /**\n * The name of the DOM property to which the input property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator =\n makePropDecorator('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n /**\n * Decorator that marks a class field as an output property and supplies configuration metadata.\n * The DOM property bound to the output property is automatically updated during change detection.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for output binding.\n *\n * See `Input` decorator for an example of providing a binding name.\n *\n */\n (bindingPropertyName?: string): any;\n new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n /**\n * The name of the DOM property to which the output property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator =\n makePropDecorator('Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n /**\n * Decorator that marks a DOM property as a host-binding property and supplies configuration\n * metadata.\n * Angular automatically checks host property bindings during change detection, and\n * if a binding changes it updates the host element of the directive.\n *\n * @usageNotes\n *\n * The following example creates a directive that sets the `valid` and `invalid`\n * properties on the DOM element that has an `ngModel` directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control: NgModel) {}\n * @HostBinding('class.valid') get valid() { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * })\n * class App {\n * prop;\n * }\n * ```\n *\n */\n (hostPropertyName?: string): any;\n new (hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n /**\n * The DOM property that is bound to a data property.\n */\n hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator =\n makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n /**\n * Decorator that declares a DOM event to listen for,\n * and provides a handler method to run when that event occurs.\n */\n (eventName: string, args?: string[]): any;\n new (eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n /**\n * The DOM event to listen for.\n */\n eventName?: string;\n /**\n * A set of arguments to pass to the handler method when the event occurs.\n */\n args?: string[];\n}\n\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator =\n makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\n\n\nexport const SWITCH_COMPILE_COMPONENT__POST_R3__ = render3CompileComponent;\nexport const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = render3CompileDirective;\nexport const SWITCH_COMPILE_PIPE__POST_R3__ = render3CompilePipe;\n\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n\nconst SWITCH_COMPILE_COMPONENT: typeof render3CompileComponent = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE: typeof render3CompileDirective = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE: typeof render3CompilePipe = SWITCH_COMPILE_PIPE__PRE_R3__;\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\nimport {ApplicationRef} from '../application_ref';\nimport {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';\nimport {Provider} from '../di/interface/provider';\nimport {convertInjectableProviderToFactory} from '../di/util';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {NgModuleType} from '../render3';\nimport {compileNgModule as render3CompileNgModule} from '../render3/jit/module';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\n\n/**\n * Represents the expansion of an `NgModule` into its scopes.\n *\n * A scope is a set of directives and pipes that are visible in a particular context. Each\n * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will\n * be recognized in the templates of components declared by the module. The `exported` scope is the\n * set of directives and pipes exported by a module (that is, module B's exported scope gets added\n * to module A's compilation scope when module A imports B).\n */\nexport interface NgModuleTransitiveScopes {\n compilation: {directives: Set<any>; pipes: Set<any>;};\n exported: {directives: Set<any>; pipes: Set<any>;};\n schemas: SchemaMetadata[]|null;\n}\n\n/**\n * @publicApi\n */\nexport type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;\n\n/**\n * Runtime link information for NgModules.\n *\n * This is the internal data structure used by the runtime to assemble components, directives,\n * pipes, and injectors.\n *\n * NOTE: Always use `ɵɵdefineNgModule` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n */\nexport interface NgModuleDef<T> {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap: Type<any>[]|(() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations: Type<any>[]|(() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports: Type<any>[]|(() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports: Type<any>[]|(() => Type<any>[]);\n\n /**\n * Cached value of computed `transitiveCompileScopes` for this module.\n *\n * This should never be read directly, but accessed via `transitiveScopesFor`.\n */\n transitiveCompileScopes: NgModuleTransitiveScopes|null;\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas: SchemaMetadata[]|null;\n\n /** Unique ID for the module with which it should be registered. */\n id: string|null;\n}\n\n/**\n * A wrapper around an NgModule that associates it with the providers.\n *\n * @param T the module type. In Ivy applications, this must be explicitly\n * provided.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<\n T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {\n ngModule: Type<T>;\n providers?: Provider[];\n}\n\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n /**\n * Decorator that marks a class as an NgModule and supplies configuration metadata.\n */\n (obj?: NgModule): TypeDecorator;\n new (obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n /**\n * The set of injectable objects that are available in the injector\n * of this module.\n *\n * @see [Dependency Injection guide](guide/dependency-injection)\n * @see [NgModule guide](guide/providers)\n *\n * @usageNotes\n *\n * Dependencies whose providers are listed here become available for injection\n * into any component, directive, pipe or service that is a child of this injector.\n * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n * to any part of the app.\n *\n * A lazy-loaded module has its own injector, typically a child of the app root injector.\n * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n * If a lazy-loaded module also provides the `UserService`, any component created\n * within that module's context (such as by router navigation) gets the local instance\n * of the service, not the instance in the root injector.\n * Components in external modules continue to receive the instance provided by their injectors.\n *\n * ### Example\n *\n * The following example defines a class that is injected in\n * the HelloWorld NgModule:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @NgModule({\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n providers?: Provider[];\n\n /**\n * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))\n * that belong to this module.\n *\n * @usageNotes\n *\n * The set of selectors that are available to a template include those declared here, and\n * those that are exported from imported NgModules.\n *\n * Declarables must belong to exactly one module.\n * The compiler emits an error if you try to declare the same class in more than one module.\n * Be careful not to declare a class that is imported from another module.\n *\n * ### Example\n *\n * The following example allows the CommonModule to use the `NgFor`\n * directive.\n *\n * ```javascript\n * @NgModule({\n * declarations: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n declarations?: Array<Type<any>|any[]>;\n\n /**\n * The set of NgModules whose exported [declarables](guide/glossary#declarable)\n * are available to templates in this module.\n *\n * @usageNotes\n *\n * A template can use exported declarables from any\n * imported module, including those from modules that are imported indirectly\n * and re-exported.\n * For example, `ModuleA` imports `ModuleB`, and also exports\n * it, which makes the declarables from `ModuleB` available\n * wherever `ModuleA` is imported.\n *\n * ### Example\n *\n * The following example allows MainModule to use anything exported by\n * `CommonModule`:\n *\n * ```javascript\n * @NgModule({\n * imports: [CommonModule]\n * })\n * class MainModule {\n * }\n * ```\n *\n */\n imports?: Array<Type<any>|ModuleWithProviders<{}>|any[]>;\n\n /**\n * The set of components, directives, and pipes declared in this\n * NgModule that can be used in the template of any component that is part of an\n * NgModule that imports this NgModule. Exported declarations are the module's public API.\n *\n * A declarable belongs to one and only one NgModule.\n * A module can list another module among its exports, in which case all of that module's\n * public declaration are exported.\n *\n * @usageNotes\n *\n * Declarations are private by default.\n * If this ModuleA does not export UserComponent, then only the components within this\n * ModuleA can use UserComponent.\n *\n * ModuleA can import ModuleB and also export it, making exports from ModuleB\n * available to an NgModule that imports ModuleA.\n *\n * ### Example\n *\n * The following example exports the `NgFor` directive from CommonModule.\n *\n * ```javascript\n * @NgModule({\n * exports: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n exports?: Array<Type<any>|any[]>;\n\n /**\n * The set of components to compile when this NgModule is defined,\n * so that they can be dynamically loaded into the view.\n *\n * For each component listed here, Angular creates a `ComponentFactory`\n * and stores it in the `ComponentFactoryResolver`.\n *\n * Angular automatically adds components in the module's bootstrap\n * and route definitions into the `entryComponents` list. Use this\n * option to add components that are bootstrapped\n * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.\n *\n * @see [Entry Components](guide/entry-components)\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * The set of components that are bootstrapped when\n * this module is bootstrapped. The components listed here\n * are automatically added to `entryComponents`.\n */\n bootstrap?: Array<Type<any>|any[]>;\n\n /**\n * The set of schemas that declare elements to be allowed in the NgModule.\n * Elements and properties that are neither Angular components nor directives\n * must be declared in a schema.\n *\n * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n *\n * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n * you must ensure that allowed elements and properties securely escape inputs.\n */\n schemas?: Array<SchemaMetadata|any[]>;\n\n /**\n * A name or path that uniquely identifies this NgModule in `getModuleFactory`.\n * If left `undefined`, the NgModule is not registered with\n * `getModuleFactory`.\n */\n id?: string;\n\n /**\n * If true, this module will be skipped by the AOT compiler and so will always be compiled\n * using JIT.\n *\n * This exists to support future Ivy work and has no effect currently.\n */\n jit?: true;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,\n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n (type: NgModuleType, meta: NgModule) => SWITCH_COMPILE_NGMODULE(type, meta));\n\n/**\n * @description\n * Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule\n * annotation.\n *\n * Reference to the current application is provided as a parameter.\n *\n * See [\"Bootstrapping\"](guide/bootstrapping) and [\"Entry components\"](guide/entry-components).\n *\n * @usageNotes\n * ```typescript\n * class AppModule implements DoBootstrap {\n * ngDoBootstrap(appRef: ApplicationRef) {\n * appRef.bootstrap(AppComponent); // Or some other component\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; }\n\nfunction preR3NgModuleCompile(moduleType: InjectorType<any>, metadata: NgModule): void {\n let imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = [...imports, metadata.exports];\n }\n\n moduleType.ngInjectorDef = ɵɵdefineInjector({\n factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n}\n\n\nexport const SWITCH_COMPILE_NGMODULE__POST_R3__ = render3CompileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE: typeof render3CompileNgModule = SWITCH_COMPILE_NGMODULE__PRE_R3__;\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\nimport {isPromise} from '../src/util/lang';\n\nimport {Inject, Injectable, InjectionToken, Optional} from './di';\n\n\n/**\n * A function that will be executed when an application is initialized.\n *\n * @publicApi\n */\nexport const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationInitStatus {\n // TODO(issue/24571): remove '!'.\n private resolve !: Function;\n // TODO(issue/24571): remove '!'.\n private reject !: Function;\n private initialized = false;\n public readonly donePromise: Promise<any>;\n public readonly done = false;\n\n constructor(@Inject(APP_INITIALIZER) @Optional() private appInits: (() => any)[]) {\n this.donePromise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises: Promise<any>[] = [];\n\n const complete = () => {\n (this as{done: boolean}).done = true;\n this.resolve();\n };\n\n if (this.appInits) {\n for (let i = 0; i < this.appInits.length; i++) {\n const initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n\n Promise.all(asyncInitPromises).then(() => { complete(); }).catch(e => { this.reject(e); });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\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\nimport {InjectionToken} from './di';\nimport {ComponentRef} from './linker/component_factory';\n\n\n/**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>('AppId');\n\nexport function _appIdRandomProviderFactory() {\n return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @publicApi\n */\nexport const APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: <any[]>[],\n};\n\nfunction _randomChar(): string {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n\n/**\n * A function that will be executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');\n\n/**\n * A token that indicates an opaque platform id.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>('Platform ID');\n\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER =\n new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');\n\n/**\n * A token which indicates the root directory of the application\n * @publicApi\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');\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\nimport {Injectable} from './di';\n\n@Injectable()\nexport class Console {\n log(message: string): void {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message: string): void {\n // tslint:disable-next-line:no-console\n console.warn(message);\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\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID = new InjectionToken<string>('LocaleId');\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>('Translations');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\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\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[]) {}\n}\n\n\nfunction _throwError() {\n throw new Error(`Runtime compiler is not loaded`);\n}\n\nconst Compiler_compileModuleSync__PRE_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T> =\n _throwError as any;\nexport const Compiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) =>\n NgModuleFactory<T> = function<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n\nconst Compiler_compileModuleAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = _throwError as any;\nexport const Compiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = function<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = function<T>(moduleType: Type<T>):\n ModuleWithComponentFactories<T> {\n const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n const moduleDef = getNgModuleDef(moduleType) !;\n const componentFactories =\n maybeUnwrapFn(moduleDef.declarations)\n .reduce((factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n }, [] as ComponentFactory<any>[]);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync =\n Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = function<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync =\n Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n@Injectable()\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T> = Compiler_compileModuleSync;\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync:\n <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>> = Compiler_compileModuleAsync;\n\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T> =\n Compiler_compileModuleAndAllComponentsSync;\n\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = Compiler_compileModuleAndAllComponentsAsync;\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string|undefined { return undefined; }\n}\n\n/**\n * Options for creating a compiler\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n useJit?: boolean,\n defaultEncapsulation?: ViewEncapsulation,\n providers?: StaticProvider[],\n missingTranslation?: MissingTranslationStrategy,\n preserveWhitespaces?: boolean,\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\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\nimport {global} from '../util/global';\n\n/**\n * A scope function for the Web Tracing Framework (WTF).\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport interface WtfScopeFn { (arg0?: any, arg1?: any): any; }\n\ninterface WTF {\n trace: Trace;\n}\n\ninterface Trace {\n events: Events;\n leaveScope(scope: Scope, returnValue: any): any /** TODO #9100 */;\n beginTimeRange(rangeType: string, action: string): Range;\n endTimeRange(range: Range): any /** TODO #9100 */;\n}\n\nexport interface Range {}\n\ninterface Events {\n createScope(signature: string, flags: any): Scope;\n}\n\nexport interface Scope { (...args: any[] /** TODO #9100 */): any; }\n\nlet trace: Trace;\nlet events: Events;\n\nexport function detectWTF(): boolean {\n const wtf: WTF = (global as any /** TODO #9100 */)['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n}\n\nexport function createScope(signature: string, flags: any = null): any {\n return events.createScope(signature, flags);\n}\n\nexport function leave<T>(scope: Scope): void;\nexport function leave<T>(scope: Scope, returnValue?: T): T;\nexport function leave<T>(scope: Scope, returnValue?: any): any {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n}\n\nexport function startTimeRange(rangeType: string, action: string): Range {\n return trace.beginTimeRange(rangeType, action);\n}\n\nexport function endTimeRange(range: Range): void {\n trace.endTimeRange(range);\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\nimport {WtfScopeFn, createScope, detectWTF, endTimeRange, leave, startTimeRange} from './wtf_impl';\n\nexport {WtfScopeFn} from './wtf_impl';\n\n\n/**\n * True if WTF is enabled.\n */\nexport const wtfEnabled = detectWTF();\n\nfunction noopScope(arg0?: any, arg1?: any): any {\n return null;\n}\n\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =\n wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope;\n\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfLeave: <T>(scope: any, returnValue?: T) => T =\n wtfEnabled ? leave : (s: any, r?: any) => r;\n\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfStartTimeRange: (rangeType: string, action: string) => any =\n wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null;\n\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null;\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\nconst promise: Promise<any> = (() => Promise.resolve(0))();\n\ndeclare const Zone: any;\n\nexport function scheduleMicroTask(fn: Function) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(() => { fn && fn.apply(null, null); });\n } else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\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\nimport {EventEmitter} from '../event_emitter';\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor({enableLongStackTrace = false}) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['wtfZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['wtfZoneSpec']);\n }\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean { return Zone.current.get('isAngularZone') === true; }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs) as T;\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs) as T;\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs) as T;\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn) as T;\n }\n}\n\nfunction noop() {}\nconst EMPTY_PAYLOAD = {};\n\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n\n hasPendingMicrotasks: boolean;\n hasPendingMacrotasks: boolean;\n isStable: boolean;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{'isAngularZone': true},\n onInvokeTask: (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task, applyThis: any,\n applyArgs: any): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n onLeave(zone);\n }\n },\n\n\n onInvoke: (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function,\n applyThis: any, applyArgs: any[], source: string): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n onLeave(zone);\n }\n },\n\n onHasTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone.hasPendingMicrotasks = hasTaskState.microTask;\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n readonly isStable: boolean = true;\n readonly onUnstable: EventEmitter<any> = new EventEmitter();\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter();\n readonly onStable: EventEmitter<any> = new EventEmitter();\n readonly onError: EventEmitter<any> = new EventEmitter();\n\n run(fn: () => any): any { return fn(); }\n\n runGuarded(fn: () => any): any { return fn(); }\n\n runOutsideAngular(fn: () => any): any { return fn(); }\n\n runTask<T>(fn: () => any): any { return fn(); }\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\nimport {Injectable} from '../di';\nimport {scheduleMicroTask} from '../util/microtask';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\n// Angular internal, not intended for public API.\nexport type DoneCallback = (didWork: boolean, tasks?: PendingMacrotask[]) => void;\nexport type UpdateCallback = (tasks: PendingMacrotask[]) => boolean;\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: DoneCallback;\n updateCb?: UpdateCallback;\n}\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _pendingCount: number = 0;\n private _isZoneStable: boolean = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n private _didWork: boolean = false;\n private _callbacks: WaitCallback[] = [];\n\n private taskTrackingZone: {macroTasks: Task[]}|null = null;\n\n constructor(private _ngZone: NgZone) {\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._didWork = true;\n this._isZoneStable = false;\n }\n });\n\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n }\n });\n });\n }\n\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n increasePendingRequestCount(): number {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n decreasePendingRequestCount(): number {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop() !;\n clearTimeout(cb.timeoutId);\n cb.doneCb(this._didWork);\n }\n this._didWork = false;\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n\n this._didWork = true;\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this.taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data\n };\n });\n }\n\n private addCallback(cb: DoneCallback, timeout?: number, updateCb?: UpdateCallback) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb(this._didWork, this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\n\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb as DoneCallback, timeout, updateCb as UpdateCallback);\n this._runCallbacksIfReady();\n }\n\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n getPendingRequestCount(): number { return this._pendingCount; }\n\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable()\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n constructor() { _testabilityGetter.addToWindow(this); }\n\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) { this._applications.delete(token); }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() { this._applications.clear(); }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability|null { return this._applications.get(elem) || null; }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] { return Array.from(this._applications.values()); }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] { return Array.from(this._applications.keys()); }\n\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability|null {\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null;\n}\n\nclass _NoopGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {}\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null {\n return null;\n }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability = new _NoopGetTestability();\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\nimport {Observable, Observer, Subscription, merge} from 'rxjs';\nimport {share} from 'rxjs/operators';\n\nimport {ApplicationInitStatus} from './application_init';\nimport {APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER} from './application_tokens';\nimport {getCompilerFacade} from './compiler/compiler_facade';\nimport {Console} from './console';\nimport {Injectable, InjectionToken, Injector, StaticProvider} from './di';\nimport {ErrorHandler} from './error_handler';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {Type} from './interface/type';\nimport {COMPILER_OPTIONS, CompilerFactory, CompilerOptions} from './linker/compiler';\nimport {ComponentFactory, ComponentRef} from './linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from './linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nimport {InternalViewRef, ViewRef} from './linker/view_ref';\nimport {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';\nimport {WtfScopeFn, wtfCreateScope, wtfLeave} from './profile/profile';\nimport {assertNgModuleType} from './render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from './render3/component_ref';\nimport {DEFAULT_LOCALE_ID, setLocaleId} from './render3/i18n';\nimport {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';\nimport {Testability, TestabilityRegistry} from './testability/testability';\nimport {isDevMode} from './util/is_dev_mode';\nimport {isPromise} from './util/lang';\nimport {scheduleMicroTask} from './util/microtask';\nimport {stringify} from './util/stringify';\nimport {NgZone, NoopNgZone} from './zone/ng_zone';\n\nlet _platform: PlatformRef;\n\nlet compileNgModuleFactory:\n <M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>) =>\n Promise<NgModuleFactory<M>> = compileNgModuleFactory__PRE_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n const compilerFactory: CompilerFactory = injector.get(CompilerFactory);\n const compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n}\n\nexport function compileNgModuleFactory__POST_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers !));\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade();\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\n\nlet isBoundToModule: <C>(cf: ComponentFactory<C>) => boolean = isBoundToModule__PRE_R3__;\n\nexport function isBoundToModule__PRE_R3__<C>(cf: ComponentFactory<C>): boolean {\n return cf instanceof ComponentFactoryBoundToModule;\n}\n\nexport function isBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultipleToken');\n\n\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(public name: string, public token: any) {}\n}\n\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error(\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) inits.forEach((init: any) => init());\n return _platform;\n}\n\n/**\n * Creates a factory for a platform\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,\n name: string, providers: StaticProvider[] = []): (extraProviders?: StaticProvider[]) =>\n PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(\n providers.concat(extraProviders).concat({provide: marker, useValue: true}));\n } else {\n const injectedProviders: StaticProvider[] =\n providers.concat(extraProviders).concat({provide: marker, useValue: true});\n createPlatform(Injector.create({providers: injectedProviders, name: desc}));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new Error('No platform exists!');\n }\n\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error(\n 'A platform with a different configuration has been created. Please destroy it first.');\n }\n\n return platform;\n}\n\n/**\n * Destroy the existing platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef|null {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone|'zone.js'|'noop';\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Function[] = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):\n Promise<NgModuleRef<M>> {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZoneOption = options ? options.ngZone : undefined;\n const ngZone = getNgZone(ngZoneOption);\n const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create(\n {providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});\n const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);\n const exceptionHandler: ErrorHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n // If the `LOCALE_ID` provider is defined at bootstrap we set the value for runtime i18n (ivy)\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId);\n moduleRef.onDestroy(() => remove(this._modules, moduleRef));\n ngZone !.runOutsideAngular(\n () => ngZone !.onError.subscribe(\n {next: (error: any) => { exceptionHandler.handleError(error); }}));\n return _callAndReportToErrorHandler(exceptionHandler, ngZone !, () => {\n const initStatus: ApplicationInitStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>, compilerOptions: (CompilerOptions&BootstrapOptions)|\n Array<CompilerOptions&BootstrapOptions> = []): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n\n private _moduleDoBootstrap(moduleRef: InternalNgModuleRef<any>): void {\n const appRef = moduleRef.injector.get(ApplicationRef) as ApplicationRef;\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new Error(\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n\n /**\n * Register a listener to be called when the platform is disposed.\n */\n onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\n\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector { return this._injector; }\n\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }\n\n get destroyed() { return this._destroyed; }\n}\n\nfunction getNgZone(ngZoneOption?: NgZone | 'zone.js' | 'noop'): NgZone {\n let ngZone: NgZone;\n\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n } else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({enableLongStackTrace: isDevMode()});\n }\n return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(\n errorHandler: ErrorHandler, ngZone: NgZone, callback: () => any): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n\nfunction optionsReducer<T extends Object>(dst: any, objs: T | T[]): T {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n } else {\n dst = {...dst, ...(objs as any)};\n }\n return dst;\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationRef {\n /** @internal */\n static _tickScope: WtfScopeFn = wtfCreateScope('ApplicationRef#tick()');\n private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n private _views: InternalViewRef[] = [];\n private _runningTick: boolean = false;\n private _enforceNoNewChanges: boolean = false;\n private _stable = true;\n\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n *\n * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.\n */\n // TODO(issue/24571): remove '!'.\n public readonly isStable !: Observable<boolean>;\n\n /** @internal */\n constructor(\n private _zone: NgZone, private _console: Console, private _injector: Injector,\n private _exceptionHandler: ErrorHandler,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _initStatus: ApplicationInitStatus) {\n this._enforceNoNewChanges = isDevMode();\n\n this._zone.onMicrotaskEmpty.subscribe(\n {next: () => { this._zone.run(() => { this.tick(); }); }});\n\n const isCurrentlyStable = new Observable<boolean>((observer: Observer<boolean>) => {\n this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks;\n this._zone.runOutsideAngular(() => {\n observer.next(this._stable);\n observer.complete();\n });\n });\n\n const isStable = new Observable<boolean>((observer: Observer<boolean>) => {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n let stableSub: Subscription;\n this._zone.runOutsideAngular(() => {\n stableSub = this._zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(() => {\n if (!this._stable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks) {\n this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n\n const unstableSub: Subscription = this._zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n if (this._stable) {\n this._stable = false;\n this._zone.runOutsideAngular(() => { observer.next(false); });\n }\n });\n\n return () => {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n\n (this as{isStable: Observable<boolean>}).isStable =\n merge(isCurrentlyStable, isStable.pipe(share()));\n }\n\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n bootstrap<C>(componentOrFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?: string|any):\n ComponentRef<C> {\n if (!this._initStatus.done) {\n throw new Error(\n 'Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n let componentFactory: ComponentFactory<C>;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory) !;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule = isBoundToModule(componentFactory) ? null : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n\n compRef.onDestroy(() => { this._unloadComponent(compRef); });\n const testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\n `Angular is running in the development mode. Call enableProdMode() to enable the production mode.`);\n }\n return compRef;\n }\n\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick(): void {\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n\n const scope = ApplicationRef._tickScope();\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n if (this._enforceNoNewChanges) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n } finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n }\n\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners =\n this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach((listener) => listener(componentRef));\n }\n\n private _unloadComponent(componentRef: ComponentRef<any>): void {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n }\n\n /** @internal */\n ngOnDestroy() {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach((view) => view.destroy());\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() { return this._views.length; }\n}\n\nfunction remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n const result: any[] = [];\n parts.forEach((part) => part && result.push(...part));\n return result;\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\nimport {NgModuleFactory as R3NgModuleFactory, NgModuleType} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_factory_registration';\n\n\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class NgModuleFactoryLoader {\n abstract load(path: string): Promise<NgModuleFactory<any>>;\n}\n\nexport function getModuleFactory__PRE_R3__(id: string): NgModuleFactory<any> {\n const factory = getRegisteredNgModuleType(id) as NgModuleFactory<any>| null;\n if (!factory) throw noModuleError(id);\n return factory;\n}\n\nexport function getModuleFactory__POST_R3__(id: string): NgModuleFactory<any> {\n const type = getRegisteredNgModuleType(id) as NgModuleType | null;\n if (!type) throw noModuleError(id);\n return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nexport const getModuleFactory: (id: string) => NgModuleFactory<any> = getModuleFactory__PRE_R3__;\n\nfunction noModuleError(id: string, ): Error {\n return new Error(`No module with ID ${id} loaded`);\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\nexport const SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nexport const ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\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\nimport {Injectable, Optional} from '../di';\nimport {ivyEnabled} from '../ivy_switch';\n\nimport {Compiler} from './compiler';\nimport {NgModuleFactory} from './ng_module_factory';\nimport {NgModuleFactoryLoader} from './ng_module_factory_loader';\n\nconst _SEPARATOR = '#';\n\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\ndeclare var System: any;\n\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class SystemJsNgModuleLoaderConfig {\n /**\n * Prefix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathPrefix !: string;\n\n /**\n * Suffix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathSuffix !: string;\n}\n\nconst DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n@Injectable()\nexport class SystemJsNgModuleLoader implements NgModuleFactoryLoader {\n private _config: SystemJsNgModuleLoaderConfig;\n\n constructor(private _compiler: Compiler, @Optional() config?: SystemJsNgModuleLoaderConfig) {\n this._config = config || DEFAULT_CONFIG;\n }\n\n load(path: string): Promise<NgModuleFactory<any>> {\n const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n }\n\n private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n if (exportName === undefined) {\n exportName = 'default';\n }\n\n return System.import(module)\n .then((module: any) => module[exportName])\n .then((type: any) => checkNotEmpty(type, module, exportName))\n .then((type: any) => this._compiler.compileModuleAsync(type));\n }\n\n private loadFactory(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then((module: any) => module[exportName + factoryClassSuffix])\n .then((factory: any) => checkNotEmpty(factory, module, exportName));\n }\n}\n\nfunction checkNotEmpty(value: any, modulePath: string, exportName: string): any {\n if (!value) {\n throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n }\n return value;\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\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular [view](guide/glossary#view),\n * specifically the [host view](guide/glossary#view-tree) that is defined by a component.\n * Also serves as the base class\n * that adds destroy methods for [embedded views](guide/glossary#view-tree).\n *\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n /**\n * Destroys this view and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Reports whether this view has been destroyed.\n * @returns True after the `destroy()` method has been called, false otherwise.\n */\n abstract get destroyed(): boolean;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for views.\n * @param callback A handler function that cleans up developer-defined data\n * associated with a view. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): any /** TODO #9100 */;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n /**\n * The context for this view, inherited from the anchor element.\n */\n abstract get context(): C;\n\n /**\n * The root nodes for this embedded view.\n */\n abstract get rootNodes(): any[];\n}\n\nexport interface InternalViewRef extends ViewRef {\n detachFromAppRef(): void;\n attachToAppRef(appRef: ApplicationRef): void;\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\nimport {Injector} from '../di';\nimport {getViewComponent} from '../render3/global_utils_api';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {StylingIndex} from '../render3/interfaces/styling';\nimport {LView, PARENT, TData, TVIEW, T_HOST} from '../render3/interfaces/view';\nimport {getProp, getValue, isClassBasedValue} from '../render3/styling/class_and_style_bindings';\nimport {getStylingContextFromLView} from '../render3/styling/util';\nimport {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, isBrowserEvents, loadLContext, loadLContextFromNode} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER, isPropMetadataString, renderStringify} from '../render3/util/misc_utils';\nimport {findComponentView} from '../render3/util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNode, isComponent, isLContainer} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\nimport {DebugContext} from '../view/index';\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n constructor(public name: string, public callback: Function) {}\n}\n\n/**\n * @publicApi\n */\nexport interface DebugNode {\n readonly listeners: DebugEventListener[];\n readonly parent: DebugElement|null;\n readonly nativeNode: any;\n readonly injector: Injector;\n readonly componentInstance: any;\n readonly context: any;\n readonly references: {[key: string]: any};\n readonly providerTokens: any[];\n}\nexport class DebugNode__PRE_R3__ {\n readonly listeners: DebugEventListener[] = [];\n readonly parent: DebugElement|null = null;\n readonly nativeNode: any;\n private readonly _debugContext: DebugContext;\n\n constructor(nativeNode: any, parent: DebugNode|null, _debugContext: DebugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n\n get injector(): Injector { return this._debugContext.injector; }\n\n get componentInstance(): any { return this._debugContext.component; }\n\n get context(): any { return this._debugContext.context; }\n\n get references(): {[key: string]: any} { return this._debugContext.references; }\n\n get providerTokens(): any[] { return this._debugContext.providerTokens; }\n}\n\n/**\n * @publicApi\n */\nexport interface DebugElement extends DebugNode {\n readonly name: string;\n readonly properties: {[key: string]: any};\n readonly attributes: {[key: string]: string | null};\n readonly classes: {[key: string]: boolean};\n readonly styles: {[key: string]: string | null};\n readonly childNodes: DebugNode[];\n readonly nativeElement: any;\n readonly children: DebugElement[];\n\n query(predicate: Predicate<DebugElement>): DebugElement;\n queryAll(predicate: Predicate<DebugElement>): DebugElement[];\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];\n triggerEventHandler(eventName: string, eventObj: any): void;\n}\nexport class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ implements DebugElement {\n readonly name !: string;\n readonly properties: {[key: string]: any} = {};\n readonly attributes: {[key: string]: string | null} = {};\n readonly classes: {[key: string]: boolean} = {};\n readonly styles: {[key: string]: string | null} = {};\n readonly childNodes: DebugNode[] = [];\n readonly nativeElement: any;\n\n constructor(nativeNode: any, parent: any, _debugContext: DebugContext) {\n super(nativeNode, parent, _debugContext);\n this.nativeElement = nativeNode;\n }\n\n addChild(child: DebugNode) {\n if (child) {\n this.childNodes.push(child);\n (child as{parent: DebugNode}).parent = this;\n }\n }\n\n removeChild(child: DebugNode) {\n const childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n (child as{parent: DebugNode | null}).parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n }\n\n insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {\n const siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n newChildren.forEach(c => {\n if (c.parent) {\n (c.parent as DebugElement__PRE_R3__).removeChild(c);\n }\n (child as{parent: DebugNode}).parent = this;\n });\n }\n }\n\n insertBefore(refChild: DebugNode, newChild: DebugNode): void {\n const refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n } else {\n if (newChild.parent) {\n (newChild.parent as DebugElement__PRE_R3__).removeChild(newChild);\n }\n (newChild as{parent: DebugNode}).parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n }\n\n get children(): DebugElement[] {\n return this\n .childNodes //\n .filter((node) => node instanceof DebugElement__PRE_R3__) as DebugElement[];\n }\n\n triggerEventHandler(eventName: string, eventObj: any) {\n this.listeners.forEach((listener) => {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n return debugEls.map((el) => el.nativeElement);\n}\n\nfunction _queryElementChildren(\n element: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[]) {\n element.childNodes.forEach(node => {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\n\nfunction _queryNodeChildren(\n parentNode: DebugNode, predicate: Predicate<DebugNode>, matches: DebugNode[]) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(node => {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\nclass DebugNode__POST_R3__ implements DebugNode {\n readonly nativeNode: Node;\n\n constructor(nativeNode: Node) { this.nativeNode = nativeNode; }\n\n get parent(): DebugElement|null {\n const parent = this.nativeNode.parentNode as Element;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n }\n\n get injector(): Injector { return getInjector(this.nativeNode); }\n\n get componentInstance(): any {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement as Element) || getViewComponent(nativeElement));\n }\n get context(): any { return getContext(this.nativeNode as Element); }\n\n get listeners(): DebugEventListener[] {\n return getListeners(this.nativeNode as Element).filter(isBrowserEvents);\n }\n\n get references(): {[key: string]: any;} { return getLocalRefs(this.nativeNode); }\n\n get providerTokens(): any[] { return getInjectionTokens(this.nativeNode as Element); }\n}\n\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {\n constructor(nativeNode: Element) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n\n get nativeElement(): Element|null {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode as Element : null;\n }\n\n get name(): string { return this.nativeElement !.nodeName; }\n\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties(): {[key: string]: any;} {\n const context = loadLContext(this.nativeNode) !;\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n\n const properties = collectPropertyBindings(tNode, lView, tData);\n const hostProperties = collectHostPropertyBindings(tNode, lView, tData);\n const className = collectClassNames(this);\n const output = {...properties, ...hostProperties};\n\n if (className) {\n output['className'] = output['className'] ? output['className'] + ` ${className}` : className;\n }\n\n return output;\n }\n\n get attributes(): {[key: string]: string | null;} {\n const attributes: {[key: string]: string | null;} = {};\n const element = this.nativeElement;\n\n if (!element) {\n return attributes;\n }\n\n const context = loadLContext(element);\n const lView = context.lView;\n const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n const lowercaseTNodeAttrs: string[] = [];\n\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string') break;\n\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue as string;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n i += 2;\n }\n }\n\n const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(attr.name) === -1) {\n attributes[attr.name] = attr.value;\n }\n }\n\n return attributes;\n }\n\n get classes(): {[key: string]: boolean;} {\n const classes: {[key: string]: boolean;} = {};\n const element = this.nativeElement;\n if (element) {\n const lContext = loadLContextFromNode(element);\n const stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (let i = StylingIndex.SingleStylesStartPosition; i < stylingContext.length;\n i += StylingIndex.Size) {\n if (isClassBasedValue(stylingContext, i)) {\n const className = getProp(stylingContext, i);\n const value = getValue(stylingContext, i);\n if (typeof value == 'boolean') {\n // we want to ignore `null` since those don't overwrite the values.\n classes[className] = value;\n }\n }\n }\n } else {\n // Fallback, just read DOM.\n const eClasses = element.classList;\n for (let i = 0; i < eClasses.length; i++) {\n classes[eClasses[i]] = true;\n }\n }\n }\n return classes;\n }\n\n get styles(): {[key: string]: string | null;} {\n const styles: {[key: string]: string | null;} = {};\n const element = this.nativeElement;\n if (element) {\n const lContext = loadLContextFromNode(element);\n const stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (let i = StylingIndex.SingleStylesStartPosition; i < stylingContext.length;\n i += StylingIndex.Size) {\n if (!isClassBasedValue(stylingContext, i)) {\n const styleName = getProp(stylingContext, i);\n const value = getValue(stylingContext, i) as string | null;\n if (value !== null) {\n // we want to ignore `null` since those don't overwrite the values.\n styles[styleName] = value;\n }\n }\n }\n } else {\n // Fallback, just read DOM.\n const eStyles = (element as HTMLElement).style;\n for (let i = 0; i < eStyles.length; i++) {\n const name = eStyles.item(i);\n styles[name] = eStyles.getPropertyValue(name);\n }\n }\n }\n return styles;\n }\n\n get childNodes(): DebugNode[] {\n const childNodes = this.nativeNode.childNodes;\n const children: DebugNode[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n get children(): DebugElement[] {\n const nativeElement = this.nativeElement;\n if (!nativeElement) return [];\n const childNodes = nativeElement.children;\n const children: DebugElement[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n }\n\n triggerEventHandler(eventName: string, eventObj: any): void {\n this.listeners.forEach((listener) => {\n if (listener.name === eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean) {\n const context = loadLContext(parentElement.nativeNode) !;\n const parentTNode = context.lView[TVIEW].data[context.nodeIndex] as TNode;\n _queryNodeChildrenR3(\n parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _queryNodeChildrenR3(\n tNode: TNode, lView: LView, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean, rootNativeNode: any) {\n const nativeNode = getNativeByTNode(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponent(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(\n componentView[TVIEW].firstChild !, componentView, predicate, matches, elementsOnly,\n rootNativeNode);\n }\n } else if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(\n nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.type === TNodeType.Container) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n } else if (tNode.type === TNodeType.Projection) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = findComponentView(lView !);\n const componentHost = componentView[T_HOST] as TElementNode;\n const head: TNode|null =\n (componentHost.projection as(TNode | null)[])[tNode.projection as number];\n\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (head) {\n const nextLView = componentView[PARENT] !as LView;\n const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & TNodeFlags.isProjected) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _queryNodeChildrenInContainerR3(\n lContainer: LContainer, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean, rootNativeNode: any) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i];\n _queryNodeChildrenR3(\n childView[TVIEW].node !, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _addQueryMatchR3(\n nativeNode: any, predicate: Predicate<DebugNode>, matches: DebugNode[], elementsOnly: boolean,\n rootNativeNode: any) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (debugNode && (elementsOnly ? debugNode instanceof DebugElement__POST_R3__ : true) &&\n predicate(debugNode)) {\n matches.push(debugNode);\n }\n }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n const properties: {[key: string]: string} = {};\n let bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData);\n\n while (bindingIndex < tNode.propertyMetadataEndIndex) {\n let value: any;\n let propMetadata = tData[bindingIndex] as string;\n while (!isPropMetadataString(propMetadata)) {\n // This is the first value for an interpolation. We need to build up\n // the full interpolation by combining runtime values in LView with\n // the static interstitial values stored in TData.\n value = (value || '') + renderStringify(lView[bindingIndex]) + tData[bindingIndex];\n propMetadata = tData[++bindingIndex] as string;\n }\n value = value === undefined ? lView[bindingIndex] : value += lView[bindingIndex];\n // Property metadata string has 3 parts: property name, prefix, and suffix\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n // Attr bindings don't have property names and should be skipped\n if (propertyName) {\n // Wrap value with prefix and suffix (will be '' for normal bindings), if they're defined.\n // Avoid wrapping for normal bindings so that the value doesn't get cast to a string.\n properties[propertyName] = (metadataParts[1] && metadataParts[2]) ?\n metadataParts[1] + value + metadataParts[2] :\n value;\n }\n bindingIndex++;\n }\n return properties;\n}\n\n/**\n * Retrieves the first binding index that holds values for this property\n * binding.\n *\n * For normal bindings (e.g. `[id]=\"id\"`), the binding index is the\n * same as the metadata index. For interpolations (e.g. `id=\"{{id}}-{{name}}\"`),\n * there can be multiple binding values, so we might have to loop backwards\n * from the metadata index until we find the first one.\n *\n * @param metadataIndex The index of the first property metadata string for\n * this node.\n * @param tData The data array for the current TView\n * @returns The first binding index for this binding\n */\nfunction getFirstBindingIndex(metadataIndex: number, tData: TData): number {\n let currentBindingIndex = metadataIndex - 1;\n\n // If the slot before the metadata holds a string, we know that this\n // metadata applies to an interpolation with at least 2 bindings, and\n // we need to search further to access the first binding value.\n let currentValue = tData[currentBindingIndex];\n\n // We need to iterate until we hit either a:\n // - TNode (it is an element slot marking the end of `consts` section), OR a\n // - metadata string (slot is attribute metadata or a previous node's property metadata)\n while (typeof currentValue === 'string' && !isPropMetadataString(currentValue)) {\n currentValue = tData[--currentBindingIndex];\n }\n return currentBindingIndex + 1;\n}\n\nfunction collectHostPropertyBindings(\n tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n const properties: {[key: string]: string} = {};\n\n // Host binding values for a node are stored after directives on that node\n let hostPropIndex = tNode.directiveEnd;\n let propMetadata = tData[hostPropIndex] as any;\n\n // When we reach a value in TView.data that is not a string, we know we've\n // hit the next node's providers and directives and should stop copying data.\n while (typeof propMetadata === 'string') {\n const propertyName = propMetadata.split(INTERPOLATION_DELIMITER)[0];\n properties[propertyName] = lView[hostPropIndex];\n propMetadata = tData[++hostPropIndex];\n }\n return properties;\n}\n\n\nfunction collectClassNames(debugElement: DebugElement__POST_R3__): string {\n const classes = debugElement.classes;\n let output = '';\n\n for (const className of Object.keys(classes)) {\n if (classes[className]) {\n output = output ? output + ` ${className}` : className;\n }\n }\n\n return output;\n}\n\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nfunction getDebugNode__PRE_R3__(nativeNode: any): DebugNode|null {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\nexport function getDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: null): null;\nexport function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n (nativeNode as any)[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode as Element) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return (nativeNode as any)[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n\n/**\n * @publicApi\n */\nexport const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__;\n\nexport function getAllDebugNodes(): DebugNode[] {\n return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport interface Predicate<T> { (value: T): boolean; }\n\n/**\n * @publicApi\n */\nexport const DebugNode: {new (...args: any[]): DebugNode} = DebugNode__PRE_R3__;\n\n/**\n * @publicApi\n */\nexport const DebugElement: {new (...args: any[]): DebugElement} = DebugElement__PRE_R3__;\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\nimport {PlatformRef, createPlatformFactory} from './application_ref';\nimport {PLATFORM_ID} from './application_tokens';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {TestabilityRegistry} from './testability/testability';\n\nconst _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [\n // Set a default platform name for platforms that don't set it explicitly.\n {provide: PLATFORM_ID, useValue: 'unknown'},\n {provide: PlatformRef, deps: [Injector]},\n {provide: TestabilityRegistry, deps: []},\n {provide: Console, deps: []},\n];\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\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\nimport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nimport {ApplicationRef} from './application_ref';\nimport {APP_ID_RANDOM_PROVIDER} from './application_tokens';\nimport {IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers} from './change_detection/change_detection';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {Inject, Optional, SkipSelf} from './di/metadata';\nimport {ErrorHandler} from './error_handler';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {ComponentFactoryResolver} from './linker';\nimport {Compiler} from './linker/compiler';\nimport {NgModule} from './metadata';\nimport {SCHEDULER} from './render3/component_ref';\nimport {NgZone} from './zone';\n\nexport function _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\n\nexport function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\n\nexport function _localeFactory(locale?: string): string {\n return locale || 'en-US';\n}\n\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nexport const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps:\n [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n {provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory},\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n {provide: Compiler, useClass: Compiler, deps: []},\n APP_ID_RANDOM_PROVIDER,\n {provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: []},\n {provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: []},\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n];\n\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nexport function zoneSchedulerFactory(ngZone: NgZone): (fn: () => void) => void {\n let queue: (() => void)[] = [];\n ngZone.onStable.subscribe(() => {\n while (queue.length) {\n queue.pop() !();\n }\n });\n return function(fn: () => void) { queue.push(fn); };\n}\n\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({providers: APPLICATION_MODULE_PROVIDERS})\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\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\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {SecurityContext} from '../sanitization/security';\n\nimport {BindingDef, BindingFlags, ElementData, ElementHandleEventFn, NodeDef, NodeFlags, OutputDef, OutputType, QueryValueType, ViewData, ViewDefinitionFactory, asElementData} from './types';\nimport {NOOP, calcBindingFlags, checkAndUpdateBinding, dispatchEvent, elementEventFullName, getParentRenderElement, resolveDefinition, resolveRendererType2, splitMatchedQueriesDsl, splitNamespace} from './util';\n\nexport function anchorDef(\n flags: NodeFlags, matchedQueriesDsl: null | [string | number, QueryValueType][],\n ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn,\n templateFactory?: ViewDefinitionFactory): NodeDef {\n flags |= NodeFlags.TypeElement;\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n const template = templateFactory ? resolveDefinition(templateFactory) : null;\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function elementDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: null | [string | number, QueryValueType][], ngContentIndex: null | number,\n childCount: number, namespaceAndName: string | null, fixedAttrs: null | [string, string][] = [],\n bindings?: null | [BindingFlags, string, string | SecurityContext | null][],\n outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn,\n componentView?: null | ViewDefinitionFactory,\n componentRendererType?: RendererType2 | null): NodeDef {\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n let ns: string = null !;\n let name: string = null !;\n if (namespaceAndName) {\n [ns, name] = splitNamespace(namespaceAndName);\n }\n bindings = bindings || [];\n const bindingDefs: BindingDef[] = new Array(bindings.length);\n for (let i = 0; i < bindings.length; i++) {\n const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n\n const [ns, name] = splitNamespace(namespaceAndName);\n let securityContext: SecurityContext = undefined !;\n let suffix: string = undefined !;\n switch (bindingFlags & BindingFlags.Types) {\n case BindingFlags.TypeElementStyle:\n suffix = <string>suffixOrSecurityContext;\n break;\n case BindingFlags.TypeElementAttribute:\n case BindingFlags.TypeProperty:\n securityContext = <SecurityContext>suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n {flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix};\n }\n outputs = outputs || [];\n const outputDefs: OutputDef[] = new Array(outputs.length);\n for (let i = 0; i < outputs.length; i++) {\n const [target, eventName] = outputs[i];\n outputDefs[i] = {\n type: OutputType.ElementOutput,\n target: <any>target, eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n const attrs = <[string, string, string][]>fixedAttrs.map(([namespaceAndName, value]) => {\n const [ns, name] = splitNamespace(namespaceAndName);\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= NodeFlags.ComponentView;\n }\n flags |= NodeFlags.TypeElement;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns,\n name,\n attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createElement(view: ViewData, renderHost: any, def: NodeDef): ElementData {\n const elDef = def.element !;\n const rootSelectorOrNode = view.root.selectorOrNode;\n const renderer = view.renderer;\n let el: any;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n } else {\n el = renderer.createComment('');\n }\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n } else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n const preserveContent =\n (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (let i = 0; i < elDef.attrs.length; i++) {\n const [ns, name, value] = elDef.attrs[i];\n renderer.setAttribute(el, name, value, ns);\n }\n }\n return el;\n}\n\nexport function listenToElementOutputs(view: ViewData, compView: ViewData, def: NodeDef, el: any) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const handleEventClosure = renderEventHandlerClosure(\n view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n let listenTarget: 'window'|'document'|'body'|'component'|null = output.target;\n let listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n const disposable =\n <any>listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables ![def.outputIndex + i] = disposable;\n }\n}\n\nfunction renderEventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\n\nexport function checkAndUpdateElementInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindLen = def.bindings.length;\n let changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;\n return changed;\n}\n\nexport function checkAndUpdateElementDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n }\n return changed;\n}\n\nfunction checkAndUpdateElementValue(view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n const binding = def.bindings[bindingIdx];\n const elData = asElementData(view, def.nodeIndex);\n const renderNode = elData.renderElement;\n const name = binding.name !;\n switch (binding.flags & BindingFlags.Types) {\n case BindingFlags.TypeElementAttribute:\n setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n break;\n case BindingFlags.TypeElementClass:\n setElementClass(view, renderNode, name, value);\n break;\n case BindingFlags.TypeElementStyle:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case BindingFlags.TypeProperty:\n const bindView = (def.flags & NodeFlags.ComponentView &&\n binding.flags & BindingFlags.SyntheticHostProperty) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n}\n\nfunction setElementAttribute(\n view: ViewData, binding: BindingDef, renderNode: any, ns: string | null, name: string,\n value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n const renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n } else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n}\n\nfunction setElementClass(view: ViewData, renderNode: any, name: string, value: boolean) {\n const renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n } else {\n renderer.removeClass(renderNode, name);\n }\n}\n\nfunction setElementStyle(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n let renderValue: string|null =\n view.root.sanitizer.sanitize(SecurityContext.STYLE, value as{} | string);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n const unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n } else {\n renderValue = null;\n }\n const renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n } else {\n renderer.removeStyle(renderNode, name);\n }\n}\n\nfunction setElementProperty(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\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\nimport {ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\n\nimport {NodeDef, NodeFlags, QueryBindingDef, QueryBindingType, QueryDef, QueryValueType, ViewData, asElementData, asProviderData, asQueryList} from './types';\nimport {declaredViewContainer, filterQueryId, isEmbeddedView} from './util';\n\nexport function queryDef(\n flags: NodeFlags, id: number, bindings: {[propName: string]: QueryBindingType}): NodeDef {\n let bindingDefs: QueryBindingDef[] = [];\n for (let propName in bindings) {\n const bindingType = bindings[propName];\n bindingDefs.push({propName, bindingType});\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1, flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: {id, filterId: filterQueryId(id), bindings: bindingDefs},\n ngContent: null\n };\n}\n\nexport function createQuery(): QueryList<any> {\n return new QueryList();\n}\n\nexport function dirtyParentQueries(view: ViewData) {\n const queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n let tplDef = view.parentNodeDef !;\n view = view.parent;\n // content queries\n const end = tplDef.nodeIndex + tplDef.childCount;\n for (let i = 0; i <= end; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeContentQuery) &&\n (nodeDef.flags & NodeFlags.DynamicQuery) &&\n (nodeDef.query !.filterId & queryIds) === nodeDef.query !.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & NodeFlags.TypeElement && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & NodeFlags.TypeContentQuery) ||\n !(nodeDef.childFlags & NodeFlags.DynamicQuery)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n\n // view queries\n if (view.def.nodeFlags & NodeFlags.TypeViewQuery) {\n for (let i = 0; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeViewQuery) && (nodeDef.flags & NodeFlags.DynamicQuery)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\n\nexport function checkAndUpdateQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n let directiveInstance: any;\n let newValues: any[] = undefined !;\n if (nodeDef.flags & NodeFlags.TypeContentQuery) {\n const elementDef = nodeDef.parent !.parent !;\n newValues = calcQueryValues(\n view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query !,\n []);\n directiveInstance = asProviderData(view, nodeDef.parent !.nodeIndex).instance;\n } else if (nodeDef.flags & NodeFlags.TypeViewQuery) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query !, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues);\n const bindings = nodeDef.query !.bindings;\n let notify = false;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n let boundValue: any;\n switch (binding.bindingType) {\n case QueryBindingType.First:\n boundValue = queryList.first;\n break;\n case QueryBindingType.All:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\n\nfunction calcQueryValues(\n view: ViewData, startIndex: number, endIndex: number, queryDef: QueryDef,\n values: any[]): any[] {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n const valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & NodeFlags.TypeElement && nodeDef.element !.template &&\n (nodeDef.element !.template !.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n const elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n const embeddedView = embeddedViews[k];\n const dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n const projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (let k = 0; k < projectedViews.length; k++) {\n const projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\n\nexport function getQueryValue(\n view: ViewData, nodeDef: NodeDef, queryValueType: QueryValueType): any {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case QueryValueType.RenderElement:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case QueryValueType.ElementRef:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case QueryValueType.TemplateRef:\n return asElementData(view, nodeDef.nodeIndex).template;\n case QueryValueType.ViewContainerRef:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case QueryValueType.Provider:\n return asProviderData(view, nodeDef.nodeIndex).instance;\n }\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\nimport {NodeDef, NodeFlags, ViewData} from './types';\nimport {RenderNodeAction, getParentRenderElement, visitProjectedRenderNodes} from './util';\n\nexport function ngContentDef(ngContentIndex: null | number, index: number): NodeDef {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: NodeFlags.TypeNgContent,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: {index}\n };\n}\n\nexport function appendNgContent(view: ViewData, renderHost: any, def: NodeDef) {\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n const ngContentIndex = def.ngContent !.index;\n visitProjectedRenderNodes(\n view, ngContentIndex, RenderNodeAction.AppendChild, parentEl, null, undefined);\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\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, PureExpressionData, ViewData, asPureExpressionData} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding} from './util';\n\nexport function purePipeDef(checkIndex: number, argCount: number): NodeDef {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(NodeFlags.TypePurePipe, checkIndex, new Array(argCount + 1));\n}\n\nexport function pureArrayDef(checkIndex: number, argCount: number): NodeDef {\n return _pureExpressionDef(NodeFlags.TypePureArray, checkIndex, new Array(argCount));\n}\n\nexport function pureObjectDef(checkIndex: number, propToIndex: {[p: string]: number}): NodeDef {\n const keys = Object.keys(propToIndex);\n const nbKeys = keys.length;\n const propertyNames = new Array(nbKeys);\n for (let i = 0; i < nbKeys; i++) {\n const key = keys[i];\n const index = propToIndex[key];\n propertyNames[index] = key;\n }\n\n return _pureExpressionDef(NodeFlags.TypePureObject, checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(\n flags: NodeFlags, checkIndex: number, propertyNames: string[]): NodeDef {\n const bindings: BindingDef[] = new Array(propertyNames.length);\n for (let i = 0; i < propertyNames.length; i++) {\n const prop = propertyNames[i];\n bindings[i] = {\n flags: BindingFlags.TypeProperty,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createPureExpression(view: ViewData, def: NodeDef): PureExpressionData {\n return {value: undefined};\n}\n\nexport function checkAndUpdatePureExpressionInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindings = def.bindings;\n let changed = false;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = new Array(bindings.length);\n if (bindLen > 0) value[0] = v0;\n if (bindLen > 1) value[1] = v1;\n if (bindLen > 2) value[2] = v2;\n if (bindLen > 3) value[3] = v3;\n if (bindLen > 4) value[4] = v4;\n if (bindLen > 5) value[5] = v5;\n if (bindLen > 6) value[6] = v6;\n if (bindLen > 7) value[7] = v7;\n if (bindLen > 8) value[8] = v8;\n if (bindLen > 9) value[9] = v9;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n if (bindLen > 0) value[bindings[0].name !] = v0;\n if (bindLen > 1) value[bindings[1].name !] = v1;\n if (bindLen > 2) value[bindings[2].name !] = v2;\n if (bindLen > 3) value[bindings[3].name !] = v3;\n if (bindLen > 4) value[bindings[4].name !] = v4;\n if (bindLen > 5) value[bindings[5].name !] = v5;\n if (bindLen > 6) value[bindings[6].name !] = v6;\n if (bindLen > 7) value[bindings[7].name !] = v7;\n if (bindLen > 8) value[bindings[8].name !] = v8;\n if (bindLen > 9) value[bindings[9].name !] = v9;\n break;\n case NodeFlags.TypePurePipe:\n const pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\nexport function checkAndUpdatePureExpressionDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = values;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n for (let i = 0; i < values.length; i++) {\n value[bindings[i].name !] = values[i];\n }\n break;\n case NodeFlags.TypePurePipe:\n const pipe = values[0];\n const params = values.slice(1);\n value = (<any>pipe.transform)(...params);\n break;\n }\n data.value = value;\n }\n return changed;\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\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, TextData, ViewData, asTextData} from './types';\nimport {checkAndUpdateBinding, getParentRenderElement} from './util';\n\nexport function textDef(\n checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef {\n const bindings: BindingDef[] = new Array(staticText.length - 1);\n for (let i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: BindingFlags.TypeProperty,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags: NodeFlags.TypeText,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex,\n childCount: 0, bindings,\n bindingFlags: BindingFlags.TypeProperty,\n outputs: [],\n element: null,\n provider: null,\n text: {prefix: staticText[0]},\n query: null,\n ngContent: null,\n };\n}\n\nexport function createText(view: ViewData, renderHost: any, def: NodeDef): TextData {\n let renderNode: any;\n const renderer = view.renderer;\n renderNode = renderer.createText(def.text !.prefix);\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return {renderText: renderNode};\n}\n\nexport function checkAndUpdateTextInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n let changed = false;\n const bindings = def.bindings;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n let value = def.text !.prefix;\n if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nexport function checkAndUpdateTextDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n let value = '';\n for (let i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text !.prefix + value;\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nfunction _addInterpolationPart(value: any, binding: BindingDef): string {\n const valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\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\nimport {Renderer2} from '../render/api';\n\nimport {checkAndUpdateElementDynamic, checkAndUpdateElementInline, createElement, listenToElementOutputs} from './element';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {appendNgContent} from './ng_content';\nimport {callLifecycleHooksChildrenFirst, checkAndUpdateDirectiveDynamic, checkAndUpdateDirectiveInline, createDirectiveInstance, createPipeInstance, createProviderInstance} from './provider';\nimport {checkAndUpdatePureExpressionDynamic, checkAndUpdatePureExpressionInline, createPureExpression} from './pure_expression';\nimport {checkAndUpdateQuery, createQuery} from './query';\nimport {createTemplateData, createViewContainerData} from './refs';\nimport {checkAndUpdateTextDynamic, checkAndUpdateTextInline, createText} from './text';\nimport {ArgumentType, CheckType, ElementData, NodeData, NodeDef, NodeFlags, ProviderData, RootData, Services, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn, asElementData, asQueryList, asTextData, shiftInitState} from './types';\nimport {NOOP, checkBindingNoChanges, isComponentView, markParentViewsForCheckProjectedViews, resolveDefinition, tokenKey} from './util';\nimport {detachProjectedView} from './view_attach';\n\nexport function viewDef(\n flags: ViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn,\n updateRenderer?: null | ViewUpdateFn): ViewDefinition {\n // clone nodes and set auto calculated values\n let viewBindingCount = 0;\n let viewDisposableCount = 0;\n let viewNodeFlags = 0;\n let viewRootNodeFlags = 0;\n let viewMatchedQueries = 0;\n let currentParent: NodeDef|null = null;\n let currentRenderParent: NodeDef|null = null;\n let currentElementHasPublicProviders = false;\n let currentElementHasPrivateProviders = false;\n let lastRenderRootNode: NodeDef|null = null;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n\n if (node.element) {\n const elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element !.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n\n\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n\n if (!currentRenderParent && (node.flags & NodeFlags.CatRenderNode)) {\n lastRenderRootNode = node;\n }\n\n if (node.flags & NodeFlags.CatProvider) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent !.element !.publicProviders =\n Object.create(currentParent !.element !.publicProviders);\n currentParent !.element !.allProviders = currentParent !.element !.publicProviders;\n }\n const isPrivateService = (node.flags & NodeFlags.PrivateProvider) !== 0;\n const isComponent = (node.flags & NodeFlags.Component) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent !.element !.publicProviders ![tokenKey(node.provider !.token)] = node;\n } else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent !.element !.allProviders =\n Object.create(currentParent !.element !.publicProviders);\n }\n currentParent !.element !.allProviders ![tokenKey(node.provider !.token)] = node;\n }\n if (isComponent) {\n currentParent !.element !.componentProvider = node;\n }\n }\n\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n } else {\n viewRootNodeFlags |= node.flags;\n }\n\n if (node.childCount > 0) {\n currentParent = node;\n\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n } else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n const newParent: NodeDef|null = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n } else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n\n const handleEvent: ViewHandleEventFn = (view, nodeIndex, eventName, event) =>\n nodes[nodeIndex].element !.handleEvent !(view, eventName, event);\n\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode\n };\n}\n\nfunction isNgContainer(node: NodeDef): boolean {\n return (node.flags & NodeFlags.TypeElement) !== 0 && node.element !.name === null;\n}\n\nfunction validateNode(parent: NodeDef | null, node: NodeDef, nodeCount: number) {\n const template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & NodeFlags.EmbeddedViews) {\n throw new Error(\n `Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`);\n }\n }\n if (node.flags & NodeFlags.CatProvider) {\n const parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & NodeFlags.TypeElement) === 0) {\n throw new Error(\n `Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`);\n }\n }\n if (node.query) {\n if (node.flags & NodeFlags.TypeContentQuery &&\n (!parent || (parent.flags & NodeFlags.TypeDirective) === 0)) {\n throw new Error(\n `Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`);\n }\n if (node.flags & NodeFlags.TypeViewQuery && parent) {\n throw new Error(\n `Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`);\n }\n }\n if (node.childCount) {\n const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\n `Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n }\n }\n}\n\nexport function createEmbeddedView(\n parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createRootView(root: RootData, def: ViewDefinition, context?: any): ViewData {\n const view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const rendererType = nodeDef.element !.componentRendererType;\n let compRenderer: Renderer2;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n } else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(\n parentView.root, compRenderer, parentView, nodeDef.element !.componentProvider, viewDef);\n}\n\nfunction createView(\n root: RootData, renderer: Renderer2, parent: ViewData | null, parentNodeDef: NodeDef | null,\n def: ViewDefinition): ViewData {\n const nodes: NodeData[] = new Array(def.nodes.length);\n const disposables = def.outputCount ? new Array(def.outputCount) : null;\n const view: ViewData = {\n def,\n parent,\n viewContainerParent: null, parentNodeDef,\n context: null,\n component: null, nodes,\n state: ViewState.CatInit, root, renderer,\n oldValues: new Array(def.bindingCount), disposables,\n initIndex: -1\n };\n return view;\n}\n\nfunction initView(view: ViewData, component: any, context: any) {\n view.component = component;\n view.context = context;\n}\n\nfunction createViewNodes(view: ViewData) {\n let renderHost: any;\n if (isComponentView(view)) {\n const hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent !, hostDef !.parent !.nodeIndex).renderElement;\n }\n const def = view.def;\n const nodes = view.nodes;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n let nodeData: any;\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n const el = createElement(view, renderHost, nodeDef) as any;\n let componentView: ViewData = undefined !;\n if (nodeDef.flags & NodeFlags.ComponentView) {\n const compViewDef = resolveDefinition(nodeDef.element !.componentView !);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = <ElementData>{\n renderElement: el,\n componentView,\n viewContainer: null,\n template: nodeDef.element !.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case NodeFlags.TypeText:\n nodeData = createText(view, renderHost, nodeDef) as any;\n break;\n case NodeFlags.TypeClassProvider:\n case NodeFlags.TypeFactoryProvider:\n case NodeFlags.TypeUseExistingProvider:\n case NodeFlags.TypeValueProvider: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & NodeFlags.LazyProvider)) {\n const instance = createProviderInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n break;\n }\n case NodeFlags.TypePipe: {\n const instance = createPipeInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n break;\n }\n case NodeFlags.TypeDirective: {\n nodeData = nodes[i];\n if (!nodeData) {\n const instance = createDirectiveInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n if (nodeDef.flags & NodeFlags.Component) {\n const compView = asElementData(view, nodeDef.parent !.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n nodeData = createPureExpression(view, nodeDef) as any;\n break;\n case NodeFlags.TypeContentQuery:\n case NodeFlags.TypeViewQuery:\n nodeData = createQuery() as any;\n break;\n case NodeFlags.TypeNgContent:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n\n // fill static content and view queries\n execQueriesAction(\n view, NodeFlags.TypeContentQuery | NodeFlags.TypeViewQuery, NodeFlags.StaticQuery,\n CheckType.CheckAndUpdate);\n}\n\nexport function checkNoChangesView(view: ViewData) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckNoChanges);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, CheckType.CheckNoChanges);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n}\n\nexport function checkAndUpdateView(view: ViewData) {\n if (view.state & ViewState.BeforeFirstCheck) {\n view.state &= ~ViewState.BeforeFirstCheck;\n view.state |= ViewState.FirstCheck;\n } else {\n view.state &= ~ViewState.FirstCheck;\n }\n shiftInitState(view, ViewState.InitState_BeforeInit, ViewState.InitState_CallingOnInit);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckAndUpdate);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeContentQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n let callInit = shiftInitState(\n view, ViewState.InitState_CallingOnInit, ViewState.InitState_CallingAfterContentInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterContentChecked | (callInit ? NodeFlags.AfterContentInit : 0));\n\n Services.updateRenderer(view, CheckType.CheckAndUpdate);\n\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeViewQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n callInit = shiftInitState(\n view, ViewState.InitState_CallingAfterContentInit, ViewState.InitState_CallingAfterViewInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterViewChecked | (callInit ? NodeFlags.AfterViewInit : 0));\n\n if (view.def.flags & ViewFlags.OnPush) {\n view.state &= ~ViewState.ChecksEnabled;\n }\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit);\n}\n\nexport function checkAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n if (argStyle === ArgumentType.Inline) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\n\nfunction markProjectedViewsForCheck(view: ViewData) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ProjectedTemplate)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n const projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (let i = 0; i < projectedViews.length; i++) {\n const projectedView = projectedViews[i];\n projectedView.state |= ViewState.CheckProjectedView;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n } else if ((nodeDef.childFlags & NodeFlags.ProjectedTemplate) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction checkAndUpdateNodeInline(\n view: ViewData, nodeDef: NodeDef, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any,\n v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeText:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionInline(\n view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\n\nfunction checkAndUpdateNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case NodeFlags.TypeText:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\n\nexport function checkNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n if (argStyle === ArgumentType.Inline) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\n\nfunction checkNoChangesNodeInline(\n view: ViewData, nodeDef: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): void {\n const bindLen = nodeDef.bindings.length;\n if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);\n}\n\nfunction checkNoChangesNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): void {\n for (let i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, nodeDef.nodeIndex),\n `Query ${nodeDef.query!.id} not dirty`, `Query ${nodeDef.query!.id} dirty`,\n (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function destroyView(view: ViewData) {\n if (view.state & ViewState.Destroyed) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, NodeFlags.OnDestroy);\n if (view.disposables) {\n for (let i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= ViewState.Destroyed;\n}\n\nfunction destroyViewNodes(view: ViewData) {\n const len = view.def.nodes.length;\n for (let i = 0; i < len; i++) {\n const def = view.def.nodes[i];\n if (def.flags & NodeFlags.TypeElement) {\n view.renderer.destroyNode !(asElementData(view, i).renderElement);\n } else if (def.flags & NodeFlags.TypeText) {\n view.renderer.destroyNode !(asTextData(view, i).renderText);\n } else if (def.flags & NodeFlags.TypeContentQuery || def.flags & NodeFlags.TypeViewQuery) {\n asQueryList(view, i).destroy();\n }\n }\n}\n\nenum ViewAction {\n CreateViewNodes,\n CheckNoChanges,\n CheckNoChangesProjectedViews,\n CheckAndUpdate,\n CheckAndUpdateProjectedViews,\n Destroy\n}\n\nfunction execComponentViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ComponentView)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ComponentView) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n } else if ((nodeDef.childFlags & NodeFlags.ComponentView) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction execEmbeddedViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.EmbeddedViews)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n // a leaf\n const embeddedViews = asElementData(view, i).viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n } else if ((nodeDef.childFlags & NodeFlags.EmbeddedViews) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction callViewAction(view: ViewData, action: ViewAction) {\n const viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\n\nfunction execProjectedViewsAction(view: ViewData, action: ViewAction) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(\n view: ViewData, queryFlags: NodeFlags, staticDynamicQueryFlag: NodeFlags,\n checkType: CheckType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n const nodeCount = view.def.nodes.length;\n for (let i = 0; i < nodeCount; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case CheckType.CheckAndUpdate:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case CheckType.CheckNoChanges:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\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\nimport {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';\nimport {Injector} from '../di';\nimport {InjectableType} from '../di/injectable';\nimport {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {isDevMode} from '../util/is_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../util/ng_reflect';\n\nimport {isViewDebugError, viewDestroyedError, viewWrappedDebugError} from './errors';\nimport {resolveDep} from './provider';\nimport {dirtyParentQueries, getQueryValue} from './query';\nimport {createInjector, createNgModuleRef, getComponentViewDefinitionFactory} from './refs';\nimport {ArgumentType, BindingFlags, CheckType, DebugContext, ElementData, NgModuleDefinition, NodeDef, NodeFlags, NodeLogger, ProviderOverride, RootData, Services, ViewData, ViewDefinition, ViewState, asElementData, asPureExpressionData} from './types';\nimport {NOOP, isComponentView, renderNode, resolveDefinition, splitDepsDsl, tokenKey, viewParentEl} from './util';\nimport {checkAndUpdateNode, checkAndUpdateView, checkNoChangesNode, checkNoChangesView, createComponentView, createEmbeddedView, createRootView, destroyView} from './view';\n\n\nlet initialized = false;\n\nexport function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n const services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\n\nfunction createProdServices() {\n return {\n setCurrentNode: () => {},\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: (view: ViewData, nodeIndex: number, eventName: string, event: any) =>\n view.def.handleEvent(view, nodeIndex, eventName, event),\n updateDirectives: (view: ViewData, checkType: CheckType) => view.def.updateDirectives(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode,\n view),\n updateRenderer: (view: ViewData, checkType: CheckType) => view.def.updateRenderer(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode,\n view),\n };\n}\n\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\n\nfunction createProdRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n return createRootView(\n createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode),\n def, context);\n}\n\nfunction debugCreateRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n const root = createRootData(\n elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes,\n rootSelectorOrNode);\n const defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(\n DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(\n elInjector: Injector, ngModule: NgModuleRef<any>, rendererFactory: RendererFactory2,\n projectableNodes: any[][], rootSelectorOrNode: any): RootData {\n const sanitizer = ngModule.injector.get(Sanitizer);\n const errorHandler = ngModule.injector.get(ErrorHandler);\n const renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule,\n injector: elInjector, projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer, rendererFactory, renderer, errorHandler\n };\n}\n\nfunction debugCreateEmbeddedView(\n parentView: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n const defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(\n DebugAction.create, createEmbeddedView, null,\n [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const overrideComponentView =\n viewDefOverrides.get(nodeDef.element !.componentProvider !.provider !.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n } else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(\n DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(\n moduleType: Type<any>, parentInjector: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n const defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nconst providerOverrides = new Map<any, ProviderOverride>();\nconst providerOverridesWithScope = new Map<InjectableType<any>, ProviderOverride>();\nconst viewDefOverrides = new Map<any, ViewDefinition>();\n\nfunction debugOverrideProvider(override: ProviderOverride) {\n providerOverrides.set(override.token, override);\n let injectableDef: ɵɵInjectableDef<any>|null;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token as InjectableType<any>, override);\n }\n}\n\nfunction debugOverrideComponentView(comp: any, compFactory: ComponentFactory<any>) {\n const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n const compViewDef = resolveDefinition(hostViewDef.nodes[0].element !.componentView !);\n viewDefOverrides.set(comp, compViewDef);\n}\n\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def: ViewDefinition): ViewDefinition {\n if (providerOverrides.size === 0) {\n return def;\n }\n const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory !(() => NOOP);\n for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n\n function findElementIndicesWithOverwrittenProviders(def: ViewDefinition): number[] {\n const elIndicesWithOverwrittenProviders: number[] = [];\n let lastElementDef: NodeDef|null = null;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & NodeFlags.CatProviderNoDirective &&\n providerOverrides.has(nodeDef.provider !.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef !.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n\n function applyProviderOverridesToElement(viewDef: ViewDefinition, elIndex: number) {\n for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & NodeFlags.CatProviderNoDirective) {\n const provider = nodeDef.provider !;\n const override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def: NgModuleDefinition): NgModuleDefinition {\n const {hasOverrides, hasDeprecatedOverrides} = calcHasOverrides(def);\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory !(() => NOOP);\n applyProviderOverrides(def);\n return def;\n\n function calcHasOverrides(def: NgModuleDefinition):\n {hasOverrides: boolean, hasDeprecatedOverrides: boolean} {\n let hasOverrides = false;\n let hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return {hasOverrides, hasDeprecatedOverrides};\n }\n def.providers.forEach(node => {\n const override = providerOverrides.get(node.token);\n if ((node.flags & NodeFlags.CatProviderNoDirective) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(module => {\n providerOverridesWithScope.forEach((override, token) => {\n if (getInjectableDef(token) !.providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return {hasOverrides, hasDeprecatedOverrides};\n }\n\n function applyProviderOverrides(def: NgModuleDefinition) {\n for (let i = 0; i < def.providers.length; i++) {\n const provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= NodeFlags.LazyProvider;\n }\n const override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n let moduleSet = new Set<any>(def.modules);\n providerOverridesWithScope.forEach((override, token) => {\n if (moduleSet.has(getInjectableDef(token) !.providedIn)) {\n let provider = {\n token: token,\n flags:\n override.flags | (hasDeprecatedOverrides ? NodeFlags.LazyProvider : NodeFlags.None),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\n\nfunction prodCheckAndUpdateNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction prodCheckNoChangesNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction debugCheckAndUpdateView(view: ViewData) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view: ViewData) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view: ViewData) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nenum DebugAction {\n create,\n detectChanges,\n checkNoChanges,\n destroy,\n handleEvent\n}\n\nlet _currentAction: DebugAction;\nlet _currentView: ViewData;\nlet _currentNodeIndex: number|null;\n\nfunction debugSetCurrentNode(view: ViewData, nodeIndex: number | null) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view: ViewData, nodeIndex: number, eventName: string, event: any) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(\n DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n function debugCheckDirectivesFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugUpdateRenderer(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n function debugCheckRenderNodeFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugCheckAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, givenValues: any[]): void {\n const changed = (<any>checkAndUpdateNode)(view, nodeDef, argStyle, ...givenValues);\n if (changed) {\n const values = argStyle === ArgumentType.Dynamic ? givenValues[0] : givenValues;\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n const bindingValues: {[key: string]: string} = {};\n for (let i = 0; i < nodeDef.bindings.length; i++) {\n const binding = nodeDef.bindings[i];\n const value = values[i];\n if (binding.flags & BindingFlags.TypeProperty) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName !)] =\n normalizeDebugBindingValue(value);\n }\n }\n const elDef = nodeDef.parent !;\n const el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element !.name) {\n // a comment.\n view.renderer.setValue(el, `bindings=${JSON.stringify(bindingValues, null, 2)}`);\n } else {\n // a regular element.\n for (let attr in bindingValues) {\n const value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n } else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\n\nfunction debugCheckNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, values: any[]): void {\n (<any>checkNoChangesNode)(view, nodeDef, argStyle, ...values);\n}\n\nfunction nextDirectiveWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeDirective && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nfunction nextRenderNodeWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.CatRenderNode) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nclass DebugContext_ implements DebugContext {\n private nodeDef: NodeDef;\n private elView: ViewData;\n private elDef: NodeDef;\n\n constructor(public view: ViewData, public nodeIndex: number|null) {\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n let elDef = this.nodeDef;\n let elView = view;\n while (elDef && (elDef.flags & NodeFlags.TypeElement) === 0) {\n elDef = elDef.parent !;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView) !;\n elView = elView.parent !;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n\n private get elOrCompView() {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n }\n\n get injector(): Injector { return createInjector(this.elView, this.elDef); }\n\n get component(): any { return this.elOrCompView.component; }\n\n get context(): any { return this.elOrCompView.context; }\n\n get providerTokens(): any[] {\n const tokens: any[] = [];\n if (this.elDef) {\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n tokens.push(childDef.provider !.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n }\n\n get references(): {[key: string]: any} {\n const references: {[key: string]: any} = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n }\n\n get componentRenderElement() {\n const elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n }\n\n get renderNode(): any {\n return this.nodeDef.flags & NodeFlags.TypeText ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n }\n\n logError(console: Console, ...values: any[]) {\n let logViewDef: ViewDefinition;\n let logNodeIndex: number;\n if (this.nodeDef.flags & NodeFlags.TypeText) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n } else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n let currRenderNodeIndex = -1;\n let nodeLogger: NodeLogger = () => {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return console.error.bind(console, ...values);\n } else {\n return NOOP;\n }\n };\n logViewDef.factory !(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n (<any>console.error)(...values);\n }\n }\n}\n\nfunction getRenderNodeIndex(viewDef: ViewDefinition, nodeIndex: number): number {\n let renderNodeIndex = -1;\n for (let i = 0; i <= nodeIndex; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\n\nfunction findHostElement(view: ViewData): ElementData|null {\n while (view && !isComponentView(view)) {\n view = view.parent !;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view) !.nodeIndex);\n }\n return null;\n}\n\nfunction collectReferences(view: ViewData, nodeDef: NodeDef, references: {[key: string]: any}) {\n for (let refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\n\nfunction callWithDebugContext(action: DebugAction, fn: any, self: any, args: any[]) {\n const oldAction = _currentAction;\n const oldView = _currentView;\n const oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n const result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n } catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext() !);\n }\n}\n\nexport function getCurrentDebugContext(): DebugContext|null {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nexport class DebugRendererFactory2 implements RendererFactory2 {\n constructor(private delegate: RendererFactory2) {}\n\n createRenderer(element: any, renderData: RendererType2|null): Renderer2 {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n }\n\n begin() {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n end() {\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n\n whenRenderingDone(): Promise<any> {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n }\n}\n\nexport class DebugRenderer2 implements Renderer2 {\n readonly data: {[key: string]: any};\n\n private createDebugContext(nativeElement: any) { return this.debugContextFactory(nativeElement); }\n\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n debugContextFactory: (nativeElement?: any) => DebugContext | null = getCurrentDebugContext;\n\n constructor(private delegate: Renderer2) { this.data = this.delegate.data; }\n\n destroyNode(node: any) {\n removeDebugNodeFromIndex(getDebugNode(node) !);\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n }\n\n destroy() { this.delegate.destroy(); }\n\n createElement(name: string, namespace?: string): any {\n const el = this.delegate.createElement(name, namespace);\n const debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n (debugEl as{name: string}).name = name;\n indexDebugNode(debugEl);\n }\n return el;\n }\n\n createComment(value: string): any {\n const comment = this.delegate.createComment(value);\n const debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n }\n\n createText(value: string): any {\n const text = this.delegate.createText(value);\n const debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n }\n\n appendChild(parent: any, newChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n const debugRefEl = getDebugNode(refChild) !;\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n\n this.delegate.insertBefore(parent, newChild, refChild);\n }\n\n removeChild(parent: any, oldChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n }\n\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n const debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n }\n\n listen(\n target: 'document'|'windows'|'body'|any, eventName: string,\n callback: (event: any) => boolean): () => void {\n if (typeof target !== 'string') {\n const debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n\n return this.delegate.listen(target, eventName, callback);\n }\n\n parentNode(node: any): any { return this.delegate.parentNode(node); }\n nextSibling(node: any): any { return this.delegate.nextSibling(node); }\n setValue(node: any, value: string): void { return this.delegate.setValue(node, value); }\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\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\n\nimport {initServicesIfNeeded} from './services';\nimport {NgModuleDefinition, NgModuleDefinitionFactory, NgModuleProviderDef, ProviderOverride, Services, ViewDefinition} from './types';\nimport {resolveDefinition} from './util';\n\nexport function overrideProvider(override: ProviderOverride) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\n\nexport function overrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\n\nexport function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createNgModuleFactory(\n ngModuleType: Type<any>, bootstrapComponents: Type<any>[],\n defFactory: NgModuleDefinitionFactory): NgModuleFactory<any> {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def: NgModuleDefinition): NgModuleDefinition {\n const providers = Array.from(def.providers);\n const modules = Array.from(def.modules);\n const providersByKey: {[tokenKey: string]: NgModuleProviderDef} = {};\n for (const key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n\n return {\n factory: def.factory,\n isRoot: def.isRoot, providers, modules, providersByKey,\n };\n}\n\nclass NgModuleFactory_ extends NgModuleFactory<any> {\n constructor(\n public readonly moduleType: Type<any>, private _bootstrapComponents: Type<any>[],\n private _ngModuleDefFactory: NgModuleDefinitionFactory) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n }\n\n create(parentInjector: Injector|null): NgModuleRef<any> {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(\n this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_r,_iterableDiffersFactory as ɵangular_packages_core_core_o,_keyValueDiffersFactory as ɵangular_packages_core_core_p,_localeFactory as ɵangular_packages_core_core_q,zoneSchedulerFactory as ɵangular_packages_core_core_s} from './src/application_module';\nexport {_appIdRandomProviderFactory as ɵangular_packages_core_core_f} from './src/application_tokens';\nexport {DefaultIterableDifferFactory as ɵangular_packages_core_core_m} from './src/change_detection/differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory as ɵangular_packages_core_core_n} from './src/change_detection/differs/default_keyvalue_differ';\nexport {DebugElement__PRE_R3__ as ɵangular_packages_core_core_l,DebugNode__PRE_R3__ as ɵangular_packages_core_core_k} from './src/debug/debug_node';\nexport {NullInjector as ɵangular_packages_core_core_b,injectInjectorOnly as ɵangular_packages_core_core_a} from './src/di/injector_compatibility';\nexport {ReflectiveInjector_ as ɵangular_packages_core_core_c} from './src/di/reflective_injector';\nexport {ReflectiveDependency as ɵangular_packages_core_core_d,resolveReflectiveProviders as ɵangular_packages_core_core_e} from './src/di/reflective_provider';\nexport {getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j} from './src/linker/ng_module_factory_loader';\nexport {wtfEnabled as ɵangular_packages_core_core_t} from './src/profile/profile';\nexport {createScope as ɵangular_packages_core_core_v,detectWTF as ɵangular_packages_core_core_u,endTimeRange as ɵangular_packages_core_core_y,leave as ɵangular_packages_core_core_w,startTimeRange as ɵangular_packages_core_core_x} from './src/profile/wtf_impl';\nexport {SCHEDULER as ɵangular_packages_core_core_bb} from './src/render3/component_ref';\nexport {injectAttributeImpl as ɵangular_packages_core_core_bc} from './src/render3/di';\nexport {TElementNode as ɵangular_packages_core_core_bg} from './src/render3/interfaces/node';\nexport {PlayerFactoryBuildFn as ɵangular_packages_core_core_bi} from './src/render3/interfaces/player';\nexport {LView as ɵangular_packages_core_core_bm} from './src/render3/interfaces/view';\nexport {getLView as ɵangular_packages_core_core_bd,getPreviousOrParentTNode as ɵangular_packages_core_core_be,nextContextImpl as ɵangular_packages_core_core_bf} from './src/render3/state';\nexport {BoundPlayerFactory as ɵangular_packages_core_core_bj} from './src/render3/styling/player_factory';\nexport {getRootContext as ɵangular_packages_core_core_bp} from './src/render3/util/view_traversal_utils';\nexport {loadInternal as ɵangular_packages_core_core_bo} from './src/render3/util/view_utils';\nexport {createElementRef as ɵangular_packages_core_core_g,createTemplateRef as ɵangular_packages_core_core_h,createViewRef as ɵangular_packages_core_core_i} from './src/render3/view_engine_compatibility';\nexport {getUrlSanitizer as ɵangular_packages_core_core_bh} from './src/sanitization/sanitization';\nexport {noSideEffects as ɵangular_packages_core_core_bn} from './src/util/closure';\nexport {makeParamDecorator as ɵangular_packages_core_core_bk,makePropDecorator as ɵangular_packages_core_core_bl} from './src/util/decorators';\nexport {getClosureSafeProperty as ɵangular_packages_core_core_bq} from './src/util/property';\nexport {_def as ɵangular_packages_core_core_z} from './src/view/provider';\nexport {DebugContext as ɵangular_packages_core_core_ba} from './src/view/types';"],"names":["global","USE_VALUE","render3CompileInjectable","EMPTY_ARRAY","CIRCULAR","NO_NEW_LINE","INJECTOR","allowHostInstructionsQueueFlush","flushHostInstructionsQueue","getOldSinglePropIndexValue","getOldProp","getProp","hasValueChanged","setClass","setStyle","initializeStaticStylingContext","isOldStylingContext","getActiveDirectiveStylingIndex","newStylingInit","resolveStylePropValue","updatestyleProp","newStyleProp","updateclassProp","newClassProp","newStyleMap","newClassMap","newStylingApply","getContext","resolveProvider","viewEngine_NgModuleRef","render3InjectElementRef","render3InjectRenderer2","render3InjectChangeDetectorRef","render3InjectTemplateRef","render3InjectViewContainerRef","_renderCompCount","renderDetachView","createInjector","RendererV1","InjectorRefTokenKey","INJECTORRefTokenKey","_createProviderInstance","ComponentFactoryResolver","viewEngine_ComponentFactoryResolver","ComponentFactory","viewEngine_ComponentFactory","ComponentRef","viewEngine_ElementRef","viewEngine_ComponentRef","NgModuleRef","NgModuleFactory","viewEngine_NgModuleFactory","getPipeDef","unwrapValue","insertView","removeView","ViewEngine_ElementRef","ViewEngine_TemplateRef","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineBase","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetFactoryOf","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵtemplateRefExtractor","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵcontainer","r3.ɵɵnextContext","r3.ɵɵcontainerRefreshStart","r3.ɵɵcontainerRefreshEnd","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵallocHostVars","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵinterpolation1","r3.ɵɵinterpolation2","r3.ɵɵinterpolation3","r3.ɵɵinterpolation4","r3.ɵɵinterpolation5","r3.ɵɵinterpolation6","r3.ɵɵinterpolation7","r3.ɵɵinterpolation8","r3.ɵɵinterpolationV","r3.ɵɵlistener","r3.ɵɵload","r3.ɵɵprojection","r3.ɵɵupdateSyntheticHostBinding","r3.ɵɵcomponentHostSyntheticListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵviewQuery","r3.ɵɵstaticViewQuery","r3.ɵɵstaticContentQuery","r3.ɵɵloadViewQuery","r3.ɵɵcontentQuery","r3.ɵɵloadContentQuery","r3.ɵɵreference","r3.ɵɵelementHostAttrs","r3.ɵɵclassMap","r3.ɵɵstyling","r3.ɵɵstyleMap","r3.ɵɵstyleProp","r3.ɵɵstyleSanitizer","r3.ɵɵstylingApply","r3.ɵɵclassProp","r3.ɵɵselect","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextBinding","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵembeddedViewStart","r3.ɵɵembeddedViewEnd","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵi18nLocalize","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵdefaultStyleSanitizer","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","render3CompileComponent","render3CompileDirective","render3CompilePipe","render3CompileNgModule","LOCALE_ID","TRANSLATIONS","NgModuleFactoryR3","ComponentFactoryR3","noop","R3NgModuleFactory","merge","ViewRef"],"mappings":";;;;;;;;;AAAA;;;;;;;AAkCA,AAAO,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,AAAO,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC3C,AAAO,MAAM,aAAa,GAAG,oBAAoB,CAAC;;;;AAKlD,SAAgB,aAAa,CACzB,IAAY,EAAE,KAA+B,EAAE,WAAiB,EAChE,oBAA8C,EAC9C,MAAgD;IAElD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEzC,SAAS,gBAAgB,CAAC,GAAG,IAAW;QACtC,IAAI,IAAI,YAAY,gBAAgB,EAAE;YACpC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,kBAAkB,GAAG,IAAK,gBAAwB,CAAC,GAAG,IAAI,CAAC,CAAC;QAClE,OAAO,SAAS,aAAa,CAAC,GAAY;YACxC,IAAI,MAAM;gBAAE,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;;;YAGjC,MAAM,WAAW,GAAG,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC;gBAC9C,GAAW,CAAC,WAAW,CAAC;gBACzB,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,WAAW,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC,CAAC,WAA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