1 | {"version":3,"file":"testing.mjs","sources":["../../../../../../packages/core/testing/src/async.ts","../../../../../../packages/core/testing/src/component_fixture.ts","../../../../../../packages/core/testing/src/fake_async.ts","../../../../../../packages/core/testing/src/test_bed_common.ts","../../../../../../packages/core/src/metadata/resource_loading.ts","../../../../../../packages/core/src/util/global.ts","../../../../../../packages/core/src/compiler/compiler_facade_interface.ts","../../../../../../packages/core/src/compiler/compiler_facade.ts","../../../../../../packages/core/src/util/property.ts","../../../../../../packages/core/src/util/stringify.ts","../../../../../../packages/core/src/di/forward_ref.ts","../../../../../../packages/core/src/di/interface/defs.ts","../../../../../../packages/core/src/error_details_base_url.ts","../../../../../../packages/core/src/errors.ts","../../../../../../packages/core/src/interface/type.ts","../../../../../../packages/core/src/util/assert.ts","../../../../../../packages/core/src/util/array_utils.ts","../../../../../../packages/core/src/util/closure.ts","../../../../../../packages/core/src/util/decorators.ts","../../../../../../packages/core/src/reflection/reflection_capabilities.ts","../../../../../../packages/core/src/util/ng_dev_mode.ts","../../../../../../packages/core/src/di/interface/provider.ts","../../../../../../packages/core/src/render3/util/stringify_utils.ts","../../../../../../packages/core/src/render3/errors_di.ts","../../../../../../packages/core/src/di/interface/injector.ts","../../../../../../packages/core/src/di/inject_switch.ts","../../../../../../packages/core/src/di/injector_compatibility.ts","../../../../../../packages/core/src/di/metadata.ts","../../../../../../packages/core/src/change_detection/constants.ts","../../../../../../packages/core/src/metadata/view.ts","../../../../../../packages/core/src/util/empty.ts","../../../../../../packages/core/src/render3/fields.ts","../../../../../../packages/core/src/render3/definition.ts","../../../../../../packages/core/src/render3/interfaces/view.ts","../../../../../../packages/core/src/render3/interfaces/container.ts","../../../../../../packages/core/src/render3/interfaces/type_checks.ts","../../../../../../packages/core/src/render3/assert.ts","../../../../../../packages/core/src/render3/definition_factory.ts","../../../../../../packages/core/src/interface/simple_change.ts","../../../../../../packages/core/src/render3/features/ng_onchanges_feature.ts","../../../../../../packages/core/src/render3/profiler.ts","../../../../../../packages/core/src/render3/namespaces.ts","../../../../../../packages/core/src/render3/util/view_utils.ts","../../../../../../packages/core/src/render3/state.ts","../../../../../../packages/core/src/render3/hooks.ts","../../../../../../packages/core/src/render3/interfaces/injector.ts","../../../../../../packages/core/src/render3/interfaces/node.ts","../../../../../../packages/core/src/render3/node_assert.ts","../../../../../../packages/core/src/render3/util/attrs_utils.ts","../../../../../../packages/core/src/render3/util/injector_utils.ts","../../../../../../packages/core/src/render3/di.ts","../../../../../../packages/core/src/render3/instructions/di_attr.ts","../../../../../../packages/core/src/di/metadata_attr.ts","../../../../../../packages/core/src/di/jit/util.ts","../../../../../../packages/core/src/linker/ng_module_registration.ts","../../../../../../packages/core/src/render3/util/misc_utils.ts","../../../../../../packages/core/src/metadata/schema.ts","../../../../../../packages/core/src/render3/instructions/element_validation.ts","../../../../../../packages/core/src/render/api_flags.ts","../../../../../../packages/core/src/util/dom.ts","../../../../../../packages/core/src/render3/interfaces/lview_tracking.ts","../../../../../../packages/core/src/render3/interfaces/context.ts","../../../../../../packages/core/src/render3/context_discovery.ts","../../../../../../packages/core/src/render3/i18n/i18n_tree_shaking.ts","../../../../../../packages/core/src/render3/util/view_traversal_utils.ts","../../../../../../packages/core/src/render3/node_manipulation.ts","../../../../../../packages/core/src/util/security/trusted_types.ts","../../../../../../packages/core/src/sanitization/iframe_attrs_validation.ts","../../../../../../packages/core/src/render3/interfaces/document.ts","../../../../../../packages/core/src/util/security/trusted_types_bypass.ts","../../../../../../packages/core/src/sanitization/bypass.ts","../../../../../../packages/core/src/sanitization/inert_body.ts","../../../../../../packages/core/src/sanitization/url_sanitizer.ts","../../../../../../packages/core/src/sanitization/html_sanitizer.ts","../../../../../../packages/core/src/sanitization/security.ts","../../../../../../packages/core/src/sanitization/sanitization.ts","../../../../../../packages/core/src/di/injection_token.ts","../../../../../../packages/core/src/di/initializer_token.ts","../../../../../../packages/core/src/di/injector_token.ts","../../../../../../packages/core/src/di/internal_tokens.ts","../../../../../../packages/core/src/di/null_injector.ts","../../../../../../packages/core/src/di/provider_collection.ts","../../../../../../packages/core/src/di/scope.ts","../../../../../../packages/core/src/di/r3_injector.ts","../../../../../../packages/core/src/linker/component_factory.ts","../../../../../../packages/core/src/linker/component_factory_resolver.ts","../../../../../../packages/core/src/linker/element_ref.ts","../../../../../../packages/core/src/render/api.ts","../../../../../../packages/core/src/sanitization/sanitizer.ts","../../../../../../packages/core/src/version.ts","../../../../../../packages/core/src/view/provider_flags.ts","../../../../../../packages/core/src/util/errors.ts","../../../../../../packages/core/src/error_handler.ts","../../../../../../packages/core/src/util/ng_reflect.ts","../../../../../../packages/core/src/render3/errors.ts","../../../../../../packages/core/src/render3/styling/class_differ.ts","../../../../../../packages/core/src/render3/node_selector_matcher.ts","../../../../../../packages/core/src/render3/tokens.ts","../../../../../../packages/core/src/render3/instructions/advance.ts","../../../../../../packages/core/src/di/jit/environment.ts","../../../../../../packages/core/src/di/jit/injectable.ts","../../../../../../packages/core/src/di/injectable.ts","../../../../../../packages/core/src/di/create_injector.ts","../../../../../../packages/core/src/di/injector.ts","../../../../../../packages/core/src/di/reflective_errors.ts","../../../../../../packages/core/src/di/reflective_key.ts","../../../../../../packages/core/src/di/reflective_provider.ts","../../../../../../packages/core/src/di/reflective_injector.ts","../../../../../../packages/core/src/di/index.ts","../../../../../../packages/core/src/di.ts","../../../../../../packages/core/src/render3/instructions/di.ts","../../../../../../packages/core/src/render3/instructions/shared.ts","../../../../../../packages/core/src/render3/styling/static_styling.ts","../../../../../../packages/core/src/render3/collect_native_nodes.ts","../../../../../../packages/core/src/render3/view_ref.ts","../../../../../../packages/core/src/render3/component_ref.ts","../../../../../../packages/core/src/render3/features/inherit_definition_feature.ts","../../../../../../packages/core/src/render3/features/copy_definition_feature.ts","../../../../../../packages/core/src/render3/features/host_directives_feature.ts","../../../../../../packages/core/src/util/symbol.ts","../../../../../../packages/core/src/util/iterable.ts","../../../../../../packages/core/src/util/comparison.ts","../../../../../../packages/core/src/render3/bindings.ts","../../../../../../packages/core/src/render3/instructions/attribute.ts","../../../../../../packages/core/src/render3/instructions/interpolation.ts","../../../../../../packages/core/src/render3/instructions/attribute_interpolation.ts","../../../../../../packages/core/src/render3/instructions/change_detection.ts","../../../../../../packages/core/src/render3/instructions/template.ts","../../../../../../packages/core/src/render3/instructions/storage.ts","../../../../../../packages/core/src/render3/instructions/property.ts","../../../../../../packages/core/src/render3/instructions/element.ts","../../../../../../packages/core/src/render3/instructions/element_container.ts","../../../../../../packages/core/src/render3/instructions/get_current_view.ts","../../../../../../packages/core/src/util/lang.ts","../../../../../../packages/core/src/render3/instructions/listener.ts","../../../../../../packages/core/src/render3/instructions/next_context.ts","../../../../../../packages/core/src/render3/instructions/projection.ts","../../../../../../packages/core/src/render3/instructions/property_interpolation.ts","../../../../../../packages/core/src/render3/interfaces/styling.ts","../../../../../../packages/core/src/render3/styling/style_binding_list.ts","../../../../../../packages/core/src/render3/styling/styling_parser.ts","../../../../../../packages/core/src/render3/instructions/styling.ts","../../../../../../packages/core/src/render3/instructions/text.ts","../../../../../../packages/core/src/render3/instructions/text_interpolation.ts","../../../../../../packages/core/src/render3/instructions/class_map_interpolation.ts","../../../../../../packages/core/src/render3/instructions/style_map_interpolation.ts","../../../../../../packages/core/src/render3/instructions/style_prop_interpolation.ts","../../../../../../packages/core/src/render3/instructions/host_property.ts","../../../../../../packages/core/src/util/ng_i18n_closure_mode.ts","../../../../../../packages/core/src/i18n/locale_en.ts","../../../../../../packages/core/src/i18n/locale_data_api.ts","../../../../../../packages/core/src/i18n/localization.ts","../../../../../../packages/core/src/render3/interfaces/i18n.ts","../../../../../../packages/core/src/render3/i18n/i18n_locale_id.ts","../../../../../../packages/core/src/render3/node_manipulation_i18n.ts","../../../../../../packages/core/src/render3/i18n/i18n_insert_before_index.ts","../../../../../../packages/core/src/render3/i18n/i18n_util.ts","../../../../../../packages/core/src/render3/i18n/i18n_apply.ts","../../../../../../packages/core/src/render3/instructions/i18n_icu_container_visitor.ts","../../../../../../packages/core/src/render3/i18n/i18n_debug.ts","../../../../../../packages/core/src/render3/i18n/i18n_parse.ts","../../../../../../packages/core/src/render3/i18n/i18n_postprocess.ts","../../../../../../packages/core/src/render3/instructions/i18n.ts","../../../../../../packages/core/src/render3/instructions/all.ts","../../../../../../packages/core/src/render3/di_setup.ts","../../../../../../packages/core/src/render3/features/providers_feature.ts","../../../../../../packages/core/src/linker/ng_module_factory.ts","../../../../../../packages/core/src/render3/ng_module_ref.ts","../../../../../../packages/core/src/render3/features/standalone_feature.ts","../../../../../../packages/core/src/render3/util/discovery_utils.ts","../../../../../../packages/core/src/render3/metadata.ts","../../../../../../packages/core/src/render3/pure_function.ts","../../../../../../packages/core/src/render3/pipe.ts","../../../../../../packages/core/src/event_emitter.ts","../../../../../../packages/core/src/linker/query_list.ts","../../../../../../packages/core/src/linker/template_ref.ts","../../../../../../packages/core/src/linker/view_container_ref.ts","../../../../../../packages/core/src/render3/query.ts","../../../../../../packages/core/src/render3/view_engine_compatibility_prebound.ts","../../../../../../packages/core/src/render3/jit/environment.ts","../../../../../../packages/core/src/render3/jit/module_patch.ts","../../../../../../packages/core/src/render3/jit/util.ts","../../../../../../packages/core/src/render3/jit/module.ts","../../../../../../packages/core/testing/src/metadata_overrider.ts","../../../../../../packages/core/testing/src/resolvers.ts","../../../../../../packages/core/testing/src/test_bed_compiler.ts","../../../../../../packages/core/testing/src/test_bed.ts","../../../../../../packages/core/testing/src/test_hooks.ts","../../../../../../packages/core/testing/src/testing.ts","../../../../../../packages/core/testing/public_api.ts","../../../../../../packages/core/testing/index.ts","../../../../../../packages/core/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', waitForAsync(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n * @publicApi\n */\nexport function waitForAsync(fn: Function): (done: any) => any {\n const _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\n if (!_Zone) {\n return function() {\n return Promise.reject(\n 'Zone is needed for the waitForAsync() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js');\n };\n }\n const asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n return function() {\n return Promise.reject(\n 'zone-testing.js is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/testing');\n };\n}\n\n/**\n * @deprecated use `waitForAsync()`, (expected removal in v12)\n * @see {@link waitForAsync}\n * @publicApi\n * */\nexport function async(fn: Function): (done: any) => any {\n return waitForAsync(fn);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, getDebugNode, NgZone, RendererFactory2} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\n\n/**\n * Fixture for debugging and testing a component.\n *\n * @publicApi\n */\nexport class ComponentFixture<T> {\n /**\n * The DebugElement associated with the root element of this component.\n */\n debugElement: DebugElement;\n\n /**\n * The instance of the root component class.\n */\n componentInstance: T;\n\n /**\n * The native element at the root of the component.\n */\n nativeElement: any;\n\n /**\n * The ElementRef for the element at the root of the component.\n */\n elementRef: ElementRef;\n\n /**\n * The ChangeDetectorRef for the component\n */\n changeDetectorRef: ChangeDetectorRef;\n\n private _renderer: RendererFactory2|null|undefined;\n private _isStable: boolean = true;\n private _isDestroyed: boolean = false;\n private _resolve: ((result: boolean) => void)|null = null;\n private _promise: Promise<boolean>|null = null;\n private _onUnstableSubscription: Subscription|null = null;\n private _onStableSubscription: Subscription|null = null;\n private _onMicrotaskEmptySubscription: Subscription|null = null;\n private _onErrorSubscription: Subscription|null = null;\n\n constructor(\n public componentRef: ComponentRef<T>, public ngZone: NgZone|null,\n private _autoDetect: boolean) {\n this.changeDetectorRef = componentRef.changeDetectorRef;\n this.elementRef = componentRef.location;\n this.debugElement = <DebugElement>getDebugNode(this.elementRef.nativeElement);\n this.componentInstance = componentRef.instance;\n this.nativeElement = this.elementRef.nativeElement;\n this.componentRef = componentRef;\n this.ngZone = ngZone;\n\n if (ngZone) {\n // Create subscriptions outside the NgZone so that the callbacks run oustide\n // of NgZone.\n ngZone.runOutsideAngular(() => {\n this._onUnstableSubscription = ngZone.onUnstable.subscribe({\n next: () => {\n this._isStable = false;\n }\n });\n this._onMicrotaskEmptySubscription = ngZone.onMicrotaskEmpty.subscribe({\n next: () => {\n if (this._autoDetect) {\n // Do a change detection run with checkNoChanges set to true to check\n // there are no changes on the second run.\n this.detectChanges(true);\n }\n }\n });\n this._onStableSubscription = ngZone.onStable.subscribe({\n next: () => {\n this._isStable = true;\n // Check whether there is a pending whenStable() completer to resolve.\n if (this._promise !== null) {\n // If so check whether there are no pending macrotasks before resolving.\n // Do this check in the next tick so that ngZone gets a chance to update the state of\n // pending macrotasks.\n scheduleMicroTask(() => {\n if (!ngZone.hasPendingMacrotasks) {\n if (this._promise !== null) {\n this._resolve!(true);\n this._resolve = null;\n this._promise = null;\n }\n }\n });\n }\n }\n });\n\n this._onErrorSubscription = ngZone.onError.subscribe({\n next: (error: any) => {\n throw error;\n }\n });\n });\n }\n }\n\n private _tick(checkNoChanges: boolean) {\n this.changeDetectorRef.detectChanges();\n if (checkNoChanges) {\n this.checkNoChanges();\n }\n }\n\n /**\n * Trigger a change detection cycle for the component.\n */\n detectChanges(checkNoChanges: boolean = true): void {\n if (this.ngZone != null) {\n // Run the change detection inside the NgZone so that any async tasks as part of the change\n // detection are captured by the zone and can be waited for in isStable.\n this.ngZone.run(() => {\n this._tick(checkNoChanges);\n });\n } else {\n // Running without zone. Just do the change detection.\n this._tick(checkNoChanges);\n }\n }\n\n /**\n * Do a change detection run to make sure there were no changes.\n */\n checkNoChanges(): void {\n this.changeDetectorRef.checkNoChanges();\n }\n\n /**\n * Set whether the fixture should autodetect changes.\n *\n * Also runs detectChanges once so that any existing change is detected.\n */\n autoDetectChanges(autoDetect: boolean = true) {\n if (this.ngZone == null) {\n throw new Error('Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set');\n }\n this._autoDetect = autoDetect;\n this.detectChanges();\n }\n\n /**\n * Return whether the fixture is currently stable or has async tasks that have not been completed\n * yet.\n */\n isStable(): boolean {\n return this._isStable && !this.ngZone!.hasPendingMacrotasks;\n }\n\n /**\n * Get a promise that resolves when the fixture is stable.\n *\n * This can be used to resume testing after events have triggered asynchronous activity or\n * asynchronous change detection.\n */\n whenStable(): Promise<any> {\n if (this.isStable()) {\n return Promise.resolve(false);\n } else if (this._promise !== null) {\n return this._promise;\n } else {\n this._promise = new Promise(res => {\n this._resolve = res;\n });\n return this._promise;\n }\n }\n\n\n private _getRenderer() {\n if (this._renderer === undefined) {\n this._renderer = this.componentRef.injector.get(RendererFactory2, null);\n }\n return this._renderer as RendererFactory2 | null;\n }\n\n /**\n * Get a promise that resolves when the ui state is stable following animations.\n */\n whenRenderingDone(): Promise<any> {\n const renderer = this._getRenderer();\n if (renderer && renderer.whenRenderingDone) {\n return renderer.whenRenderingDone();\n }\n return this.whenStable();\n }\n\n /**\n * Trigger component destruction.\n */\n destroy(): void {\n if (!this._isDestroyed) {\n this.componentRef.destroy();\n if (this._onUnstableSubscription != null) {\n this._onUnstableSubscription.unsubscribe();\n this._onUnstableSubscription = null;\n }\n if (this._onStableSubscription != null) {\n this._onStableSubscription.unsubscribe();\n this._onStableSubscription = null;\n }\n if (this._onMicrotaskEmptySubscription != null) {\n this._onMicrotaskEmptySubscription.unsubscribe();\n this._onMicrotaskEmptySubscription = null;\n }\n if (this._onErrorSubscription != null) {\n this._onErrorSubscription.unsubscribe();\n this._onErrorSubscription = null;\n }\n this._isDestroyed = true;\n }\n }\n}\n\nfunction scheduleMicroTask(fn: Function) {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n\nconst fakeAsyncTestModuleNotLoadedErrorMessage =\n `zone-testing.js is needed for the fakeAsync() test helper but could not be found.\n Please make sure that your environment includes zone.js/testing`;\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @publicApi\n */\nexport function resetFakeAsyncZone(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.resetFakeAsyncZone();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Wraps a function to be executed in the `fakeAsync` zone:\n * - Microtasks are manually executed by calling `flushMicrotasks()`.\n * - Timers are synchronous; `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception is thrown.\n *\n * Can be used to wrap `inject()` calls.\n *\n * @param fn The function that you want to wrap in the `fakeAysnc` zone.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n *\n * @returns The function wrapped to be executed in the `fakeAsync` zone.\n * Any arguments passed when calling this returned function will be passed through to the `fn`\n * function in the parameters when it is called.\n *\n * @publicApi\n */\nexport function fakeAsync(fn: Function): (...args: any[]) => any {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.fakeAsync(fn);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the `fakeAsync` zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @param millis The number of milliseconds to advance the virtual timer.\n * @param tickOptions The options to pass to the `tick()` function.\n *\n * @usageNotes\n *\n * The `tick()` option is a flag called `processNewMacroTasksSynchronously`,\n * which determines whether or not to invoke new macroTasks.\n *\n * If you provide a `tickOptions` object, but do not specify a\n * `processNewMacroTasksSynchronously` property (`tick(100, {})`),\n * then `processNewMacroTasksSynchronously` defaults to true.\n *\n * If you omit the `tickOptions` parameter (`tick(100))`), then\n * `tickOptions` defaults to `{processNewMacroTasksSynchronously: true}`.\n *\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * The following example includes a nested timeout (new macroTask), and\n * the `tickOptions` parameter is allowed to default. In this case,\n * `processNewMacroTasksSynchronously` defaults to true, and the nested\n * function is executed on each tick.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n * let nestedTimeoutInvoked = false;\n * function funcWithNestedTimeout() {\n * setTimeout(() => {\n * nestedTimeoutInvoked = true;\n * });\n * };\n * setTimeout(funcWithNestedTimeout);\n * tick();\n * expect(nestedTimeoutInvoked).toBe(true);\n * }));\n * ```\n *\n * In the following case, `processNewMacroTasksSynchronously` is explicitly\n * set to false, so the nested timeout function is not invoked.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n * let nestedTimeoutInvoked = false;\n * function funcWithNestedTimeout() {\n * setTimeout(() => {\n * nestedTimeoutInvoked = true;\n * });\n * };\n * setTimeout(funcWithNestedTimeout);\n * tick(0, {processNewMacroTasksSynchronously: false});\n * expect(nestedTimeoutInvoked).toBe(false);\n * }));\n * ```\n *\n *\n * @publicApi\n */\nexport function tick(\n millis: number = 0, tickOptions: {processNewMacroTasksSynchronously: boolean} = {\n processNewMacroTasksSynchronously: true\n }): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis, tickOptions);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Flushes any pending microtasks and simulates the asynchronous passage of time for the timers in\n * the `fakeAsync` zone by\n * draining the macrotask queue until it is empty.\n *\n * @param maxTurns The maximum number of times the scheduler attempts to clear its queue before\n * throwing an error.\n * @returns The simulated time elapsed, in milliseconds.\n *\n * @publicApi\n */\nexport function flush(maxTurns?: number): number {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flush(maxTurns);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\nexport function discardPeriodicTasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\nexport function flushMicrotasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken, SchemaMetadata} from '@angular/core';\n\n\n/** Whether test modules should be torn down by default. */\nexport const TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT = true;\n\n/** Whether unknown elements in templates should throw by default. */\nexport const THROW_ON_UNKNOWN_ELEMENTS_DEFAULT = false;\n\n/** Whether unknown properties in templates should throw by default. */\nexport const THROW_ON_UNKNOWN_PROPERTIES_DEFAULT = false;\n\n/**\n * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @publicApi\n */\nexport class TestComponentRenderer {\n insertRootElement(rootElementId: string) {}\n removeAllRootElements?() {}\n}\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureAutoDetect =\n new InjectionToken<boolean[]>('ComponentFixtureAutoDetect');\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('ComponentFixtureNoNgZone');\n\n/**\n * @publicApi\n */\nexport interface TestModuleMetadata {\n providers?: any[];\n declarations?: any[];\n imports?: any[];\n schemas?: Array<SchemaMetadata|any[]>;\n teardown?: ModuleTeardownOptions;\n /**\n * Whether NG0304 runtime errors should be thrown when unknown elements are present in component's\n * template. Defaults to `false`, where the error is simply logged. If set to `true`, the error is\n * thrown.\n * @see https://angular.io/errors/NG8001 for the description of the problem and how to fix it\n */\n errorOnUnknownElements?: boolean;\n /**\n * Whether errors should be thrown when unknown properties are present in component's template.\n * Defaults to `false`, where the error is simply logged.\n * If set to `true`, the error is thrown.\n * @see https://angular.io/errors/NG8002 for the description of the error and how to fix it\n */\n errorOnUnknownProperties?: boolean;\n}\n\n/**\n * @publicApi\n */\nexport interface TestEnvironmentOptions {\n /**\n * Configures the test module teardown behavior in `TestBed`.\n */\n teardown?: ModuleTeardownOptions;\n /**\n * Whether errors should be thrown when unknown elements are present in component's template.\n * Defaults to `false`, where the error is simply logged.\n * If set to `true`, the error is thrown.\n * @see https://angular.io/errors/NG8001 for the description of the error and how to fix it\n */\n errorOnUnknownElements?: boolean;\n /**\n * Whether errors should be thrown when unknown properties are present in component's template.\n * Defaults to `false`, where the error is simply logged.\n * If set to `true`, the error is thrown.\n * @see https://angular.io/errors/NG8002 for the description of the error and how to fix it\n */\n errorOnUnknownProperties?: boolean;\n}\n\n/**\n * Configures the test module teardown behavior in `TestBed`.\n * @publicApi\n */\nexport interface ModuleTeardownOptions {\n /** Whether the test module should be destroyed after every test. Defaults to `true`. */\n destroyAfterEach: boolean;\n\n /** Whether errors during test module destruction should be re-thrown. Defaults to `true`. */\n rethrowErrors?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 ɵcmp 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any;\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;\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. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global: any = (/* @__PURE__ */ (\n () => (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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 (main)\n * - packages/core/src/compiler/compiler_facade_interface.ts (replica)\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/compiler/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade {\n ɵcompilerFacade: CompilerFacade;\n}\n\nexport interface CompilerFacade {\n compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n any;\n compilePipeDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclarePipeFacade): any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n compileInjectableDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareInjectableFacade): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n compileInjectorDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareInjectorFacade): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n compileNgModuleDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareNgModuleFacade): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n compileDirectiveDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareDirectiveFacade): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n compileComponentDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareComponentFacade): any;\n compileFactory(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3FactoryDefMetadataFacade): any;\n compileFactoryDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareFactoryFacade): any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n FactoryTarget: typeof FactoryTarget;\n // Note that we do not use `{new(): ResourceLoader}` here because\n // the resource loader class is abstract and not constructable.\n ResourceLoader: Function&{prototype: ResourceLoader};\n}\n\nexport interface CoreEnvironment {\n [name: string]: Function;\n}\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 = unknown;\nexport type Type = Function;\nexport type OpaqueValue = unknown;\n\nexport enum FactoryTarget {\n Directive = 0,\n Component = 1,\n Injectable = 2,\n Pipe = 3,\n NgModule = 4,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: OpaqueValue;\n attribute: string|null;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3DeclareDependencyMetadataFacade {\n token: OpaqueValue;\n attribute?: boolean;\n host?: boolean;\n optional?: boolean;\n self?: boolean;\n skipSelf?: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: Type;\n pipeName: string;\n pure: boolean;\n isStandalone: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: Type;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n schemas: {name: string}[]|null;\n id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: Type;\n providers: Provider[];\n imports: OpaqueValue[];\n}\n\nexport interface R3HostDirectiveMetadataFacade {\n directive: Type;\n inputs?: string[];\n outputs?: string[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: Type;\n typeSourceSpan: ParseSourceSpan;\n selector: string|null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: OpaqueValue[]};\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 isStandalone: boolean;\n hostDirectives: R3HostDirectiveMetadataFacade[]|null;\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: OpaqueValue[]|undefined;\n declarations: R3TemplateDependencyFacade[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[]|null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3DeclareDirectiveFacade {\n selector?: string;\n type: Type;\n inputs?: {[classPropertyName: string]: string|[string, string]};\n outputs?: {[classPropertyName: string]: string};\n host?: {\n attributes?: {[key: string]: OpaqueValue};\n listeners?: {[key: string]: string};\n properties?: {[key: string]: string};\n classAttribute?: string;\n styleAttribute?: string;\n };\n queries?: R3DeclareQueryMetadataFacade[];\n viewQueries?: R3DeclareQueryMetadataFacade[];\n providers?: OpaqueValue;\n exportAs?: string[];\n usesInheritance?: boolean;\n usesOnChanges?: boolean;\n isStandalone?: boolean;\n hostDirectives?: R3HostDirectiveMetadataFacade[]|null;\n}\n\nexport interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {\n template: string;\n isInline?: boolean;\n styles?: string[];\n\n // Post-standalone libraries use a unified dependencies field.\n dependencies?: R3DeclareTemplateDependencyFacade[];\n\n // Pre-standalone libraries have separate component/directive/pipe fields:\n components?: R3DeclareDirectiveDependencyFacade[];\n directives?: R3DeclareDirectiveDependencyFacade[];\n pipes?: {[pipeName: string]: OpaqueValue|(() => OpaqueValue)};\n\n\n viewProviders?: OpaqueValue;\n animations?: OpaqueValue;\n changeDetection?: ChangeDetectionStrategy;\n encapsulation?: ViewEncapsulation;\n interpolation?: [string, string];\n preserveWhitespaces?: boolean;\n}\n\nexport type R3DeclareTemplateDependencyFacade = {\n kind: string\n}&(R3DeclareDirectiveDependencyFacade|R3DeclarePipeDependencyFacade|\n R3DeclareNgModuleDependencyFacade);\n\nexport interface R3DeclareDirectiveDependencyFacade {\n kind?: 'directive'|'component';\n selector: string;\n type: OpaqueValue|(() => OpaqueValue);\n inputs?: string[];\n outputs?: string[];\n exportAs?: string[];\n}\n\nexport interface R3DeclarePipeDependencyFacade {\n kind?: 'pipe';\n name: string;\n type: OpaqueValue|(() => OpaqueValue);\n}\n\nexport interface R3DeclareNgModuleDependencyFacade {\n kind: 'ngmodule';\n type: OpaqueValue|(() => OpaqueValue);\n}\n\nexport enum R3TemplateDependencyKind {\n Directive = 0,\n Pipe = 1,\n NgModule = 2,\n}\n\nexport interface R3TemplateDependencyFacade {\n kind: R3TemplateDependencyKind;\n type: OpaqueValue|(() => OpaqueValue);\n}\nexport interface R3FactoryDefMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n deps: R3DependencyMetadataFacade[]|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareFactoryFacade {\n type: Type;\n deps: R3DeclareDependencyMetadataFacade[]|'invalid'|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareInjectableFacade {\n type: Type;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DeclareDependencyMetadataFacade[];\n}\n\nexport enum ViewEncapsulation {\n Emulated = 0,\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n None = 2,\n ShadowDom = 3\n}\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: OpaqueValue|string[];\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n read: OpaqueValue|null;\n static: boolean;\n}\n\nexport interface R3DeclareQueryMetadataFacade {\n propertyName: string;\n first?: boolean;\n predicate: OpaqueValue|string[];\n descendants?: boolean;\n read?: OpaqueValue;\n static?: boolean;\n emitDistinctChangesOnly?: boolean;\n}\n\nexport interface R3DeclareInjectorFacade {\n type: Type;\n imports?: OpaqueValue[];\n providers?: OpaqueValue[];\n}\n\nexport interface R3DeclareNgModuleFacade {\n type: Type;\n bootstrap?: OpaqueValue[]|(() => OpaqueValue[]);\n declarations?: OpaqueValue[]|(() => OpaqueValue[]);\n imports?: OpaqueValue[]|(() => OpaqueValue[]);\n exports?: OpaqueValue[]|(() => OpaqueValue[]);\n schemas?: OpaqueValue[];\n id?: OpaqueValue;\n}\n\nexport interface R3DeclarePipeFacade {\n type: Type;\n name: string;\n pure?: boolean;\n isStandalone?: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n fullStart: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade, Type} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport const enum JitCompilerUsage {\n Decorator,\n PartialDeclaration,\n}\n\ninterface JitCompilerUsageRequest {\n usage: JitCompilerUsage;\n kind: 'directive'|'component'|'pipe'|'injectable'|'NgModule';\n type: Type;\n}\n\nexport function getCompilerFacade(request: JitCompilerUsageRequest): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n\n let message = `The ${request.kind} '${\n request\n .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === JitCompilerUsage.PartialDeclaration) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message +=\n `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message +=\n `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message +=\n `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message +=\n `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message +=\n `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\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/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nexport function concatStringsWithSpace(before: string|null, after: string|null): string {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 {\n (): any;\n}\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() {\n return stringify(this());\n };\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 return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is() => any {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\n\nimport {ClassProvider, ConstructorProvider, EnvironmentProviders, 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 * `Injector`, `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 * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n * deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<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'|'platform'|'any'|'environment'|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 * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\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 ɵprov property for example).\n providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|EnvironmentProviders|any[])[];\n\n imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`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 ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n ɵfac?: unknown;\n ɵinj: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` 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|EnvironmentProviders|any[])[];\n}\n\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` 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 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown,\n providedIn?: Type<any>|'root'|'platform'|'any'|'environment'|null, factory: () => T,\n}): unknown {\n return {\n token: opts.token,\n providedIn: opts.providedIn as any || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only by 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 injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\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 a `ɵprov` 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 * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: {providers?: any[], imports?: any[]}): unknown {\n return {providers: options.providers || [], imports: options.imports || []};\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n\nexport function isInjectable(type: any): boolean {\n return getInjectableDef(type) !== null;\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T>|null {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n const typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${\n typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${\n typeName}\" class.`);\n return def;\n } else {\n return null;\n }\n}\n\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type: any): string {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n\n const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n (type as any)[NG_INJ_DEF] :\n null;\n}\n\nexport const NG_PROV_DEF = getClosureSafeProperty({ɵprov: getClosureSafeProperty});\nexport const NG_INJ_DEF = getClosureSafeProperty({ɵinj: getClosureSafeProperty});\n\n// We need to keep these around so we can read off old defs if new defs are unavailable\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nexport const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n\n/**\n * URL for the XSS security documentation.\n */\nexport const XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ERROR_DETAILS_PAGE_BASE_URL} from './error_details_base_url';\n\n/**\n * The list of error codes used in runtime code of the `core` package.\n * Reserved error code range: 100-999.\n *\n * Note: the minus sign denotes the fact that a particular code has a detailed guide on\n * angular.io. This extra annotation is needed to avoid introducing a separate set to store\n * error codes which have guides, which might leak into runtime code.\n *\n * Full list of available error guides can be found at https://angular.io/errors.\n */\nexport const enum RuntimeErrorCode {\n // Change Detection Errors\n EXPRESSION_CHANGED_AFTER_CHECKED = -100,\n RECURSIVE_APPLICATION_REF_TICK = 101,\n\n // Dependency Injection Errors\n CYCLIC_DI_DEPENDENCY = -200,\n PROVIDER_NOT_FOUND = -201,\n INVALID_FACTORY_DEPENDENCY = 202,\n MISSING_INJECTION_CONTEXT = -203,\n INVALID_INJECTION_TOKEN = 204,\n INJECTOR_ALREADY_DESTROYED = 205,\n PROVIDER_IN_WRONG_CONTEXT = 207,\n MISSING_INJECTION_TOKEN = 208,\n INVALID_MULTI_PROVIDER = -209,\n\n // Template Errors\n MULTIPLE_COMPONENTS_MATCH = -300,\n EXPORT_NOT_FOUND = -301,\n PIPE_NOT_FOUND = -302,\n UNKNOWN_BINDING = 303,\n UNKNOWN_ELEMENT = 304,\n TEMPLATE_STRUCTURE_ERROR = 305,\n INVALID_EVENT_BINDING = 306,\n HOST_DIRECTIVE_UNRESOLVABLE = 307,\n HOST_DIRECTIVE_NOT_STANDALONE = 308,\n DUPLICATE_DIRECTITVE = 309,\n HOST_DIRECTIVE_COMPONENT = 310,\n HOST_DIRECTIVE_UNDEFINED_BINDING = 311,\n HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,\n\n // Bootstrap Errors\n MULTIPLE_PLATFORMS = 400,\n PLATFORM_NOT_FOUND = 401,\n ERROR_HANDLER_NOT_FOUND = 402,\n BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,\n PLATFORM_ALREADY_DESTROYED = 404,\n ASYNC_INITIALIZERS_STILL_RUNNING = 405,\n APPLICATION_REF_ALREADY_DESTROYED = 406,\n RENDERER_NOT_FOUND = 407,\n\n // Styling Errors\n\n // Declarations Errors\n\n // i18n Errors\n INVALID_I18N_STRUCTURE = 700,\n MISSING_LOCALE_DATA = 701,\n\n // standalone errors\n IMPORT_PROVIDERS_FROM_STANDALONE = 800,\n\n // JIT Compilation Errors\n // Other\n INVALID_DIFFER_INPUT = 900,\n NO_SUPPORTING_DIFFER_FACTORY = 901,\n VIEW_ALREADY_ATTACHED = 902,\n INVALID_INHERITANCE = 903,\n UNSAFE_VALUE_IN_RESOURCE_URL = 904,\n UNSAFE_VALUE_IN_SCRIPT = 905,\n MISSING_GENERATED_DEF = 906,\n TYPE_IS_NOT_STANDALONE = 907,\n MISSING_ZONEJS = 908,\n UNEXPECTED_ZONE_STATE = 909,\n UNSAFE_IFRAME_ATTRS = -910,\n}\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.\n */\nexport class RuntimeError<T extends number = RuntimeErrorCode> extends Error {\n constructor(public code: T, message: null|false|string) {\n super(formatRuntimeError<T>(code, message));\n }\n}\n\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nexport function formatRuntimeError<T extends number = RuntimeErrorCode>(\n code: T, message: null|false|string): string {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n\n let errorMessage = `${fullCode}${message ? ': ' + message.trim() : ''}`;\n\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage =\n `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @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 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 * instantiable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function {\n prototype: T;\n}\n\nexport interface Type<T> extends Function {\n new(...args: any[]): T;\n}\n\nexport type Mutable<T extends {[x: string]: any}, K extends string> = {\n [P in K]: T[P];\n};\n\n/**\n * Returns a writable type version of type.\n *\n * USAGE:\n * Given:\n * ```\n * interface Person {readonly name: string}\n * ```\n *\n * We would like to get a read/write version of `Person`.\n * ```\n * const WritablePerson = Writable<Person>;\n * ```\n *\n * The result is that you can do:\n *\n * ```\n * const readonlyPerson: Person = {name: 'Marry'};\n * readonlyPerson.name = 'John'; // TypeError\n * (readonlyPerson as WritablePerson).name = 'John'; // OK\n *\n * // Error: Correctly detects that `Person` did not have `age` property.\n * (readonlyPerson as WritablePerson).age = 30;\n * ```\n */\nexport type Writable<T> = {\n -readonly[K in keyof T]: T[K];\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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): asserts actual is number {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\nexport function assertNumberInRange(\n actual: any, minInclusive: number, maxInclusive: number): asserts actual is number {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\n\nexport function assertString(actual: any, msg: string): asserts actual is string {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\nexport function assertFunction(actual: any, msg: string): asserts actual is Function {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\n\nexport function assertLessThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\n\nexport function assertGreaterThanOrEqual<T>(\n actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\n\nexport function assertDefined<T>(actual: T|null|undefined, msg: string): asserts actual is T {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\n\nexport function throwError(msg: string): never;\nexport function throwError(msg: string, actual: any, expected: any, comparison: string): never;\nexport function throwError(msg: string, actual?: any, expected?: any, comparison?: string): never {\n throw new Error(\n `ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\n\nexport function assertDomNode(node: any): asserts node is Node {\n // If we're in a worker, `Node` will not be defined.\n if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n !(typeof node === 'object' && node != null &&\n node.constructor.name === 'WebWorkerRenderNode')) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\n\n\nexport function assertIndexInRange(arr: any[], index: number) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\n\n\nexport function assertOneOf(value: any, ...validValues: any[]) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${\n JSON.stringify(value)}.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, assertLessThanOrEqual} from './assert';\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA) as any;\n valueB = identityAccessor(valueB) as any;\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[]): any[] {\n return list.flat(Number.POSITIVE_INFINITY);\n}\n\nexport function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\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\nexport function removeFromArray(arr: any[], index: number): any {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n const list: T[] = [];\n for (let i = 0; i < size; i++) {\n list.push(value!);\n }\n return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n return _arrayIndexOfSorted(array, value, 0);\n}\n\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE|string> {\n __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(\n keyValueArray: KeyValueArray<V>, key: string, value: V): number {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V|undefined {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1] as V;\n }\n return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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<T>(fn: () => T): T {\n return {toString: fn}.toString() as unknown as T;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {noSideEffects} from './closure';\n\n\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 return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(\n this: unknown|typeof DecoratorFactory, ...args: any[]): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this as typeof DecoratorFactory;\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: []}) as any)[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}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(this: any, ...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 return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(\n this: unknown|typeof 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}\n\nexport function makePropDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(this: unknown|typeof 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 because it creates a non-enumerable property\n // which prevents the property from being 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isType, Type} from '../interface/type';\nimport {newArray} from '../util/array_utils';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\n\n\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nexport const ES5_DELEGATE_CTOR =\n /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nexport const ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nexport const ES2015_INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nexport const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\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 ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) {\n this._reflect = reflect || global['Reflect'];\n }\n\n factory<T>(t: Type<T>): (args: any[]) => T {\n return (...args: any[]) => new t(...args);\n }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(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 newArray<any[]>(type.length);\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\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n /**\n * Values of ngDevMode\n * Depending on the current state of the application, ngDevMode may have one of several values.\n *\n * For convenience, the “truthy” value which enables dev mode is also an object which contains\n * Angular’s performance counters. This is not necessary, but cuts down on boilerplate for the\n * perf counters.\n *\n * ngDevMode may also be set to false. This can happen in one of a few ways:\n * - The user explicitly sets `window.ngDevMode = false` somewhere in their app.\n * - The user calls `enableProdMode()`.\n * - The URL contains a `ngDevMode=false` text.\n * Finally, ngDevMode may not have been defined at all.\n */\n const ngDevMode: null|NgDevModePerfCounters;\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstCreatePass: 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 }\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 firstCreatePass: 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 };\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 function 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 * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nexport function initNgDevMode(): boolean {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\n\n/**\n * Configures the `Injector` to return a value for a token.\n * Base for `ValueProvider` decorator.\n *\n * @publicApi\n */\nexport interface ValueSansProvider {\n /**\n * The value to inject.\n */\n useValue: any;\n}\n\n/**\n * Configures the `Injector` to return a value for a token.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ValueProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ValueProvider extends ValueSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * Base for `StaticClassProvider` decorator.\n *\n * @publicApi\n */\nexport interface StaticClassSansProvider {\n /**\n * An optional class to instantiate for the `token`. By default, the `provide`\n * class is instantiated.\n */\n useClass: Type<any>;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useClass` constructor.\n */\n deps: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface StaticClassProvider extends StaticClassSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * ```ts\n * @Injectable(SomeModule, {deps: []})\n * class MyService {}\n * ```\n *\n * @publicApi\n */\nexport interface ConstructorSansProvider {\n /**\n * A list of `token`s to be resolved by the injector.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ConstructorProvider extends ConstructorSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: Type<any>;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see `ExistingProvider`\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @publicApi\n */\nexport interface ExistingSansProvider {\n /**\n * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)\n */\n useExisting: any;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ExistingProvider extends ExistingSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n *\n * @see `FactoryProvider`\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @publicApi\n */\nexport interface FactorySansProvider {\n /**\n * A function to invoke to create a value for this `token`. The function is invoked with\n * resolved values of `token`s in the `deps` field.\n */\n useFactory: Function;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useFactory` function.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}\n *\n * Dependencies can also be marked as optional:\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface FactoryProvider extends FactorySansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how an `Injector` should be configured as static (that is, without reflection).\n * A static provider provides tokens to an injector for various types of dependencies.\n *\n * @see `Injector.create()`.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection-providers).\n *\n * @publicApi\n */\nexport type StaticProvider =\n ValueProvider|ExistingProvider|StaticClassProvider|ConstructorProvider|FactoryProvider|any[];\n\n\n/**\n * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.\n *\n * Create an instance by invoking the `new` operator and supplying additional arguments.\n * This form is a short form of `TypeProvider`;\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='TypeProvider'}\n *\n * @publicApi\n */\nexport interface TypeProvider extends Type<any> {}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useClass` function.\n * Base for `ClassProvider` decorator.\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @publicApi\n */\nexport interface ClassSansProvider {\n /**\n * Class to instantiate for the `token`.\n */\n useClass: Type<any>;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ClassProvider extends ClassSansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how the `Injector` should be configured.\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @see `StaticProvider`\n *\n * @publicApi\n */\nexport type Provider = TypeProvider|ValueProvider|ClassProvider|ConstructorProvider|\n ExistingProvider|FactoryProvider|any[];\n\n/**\n * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.\n * in an `NgModule`).\n *\n * Using this wrapper type prevents providers which are only designed to work in\n * application/environment injectors from being accidentally included in\n * `@Component.providers` and ending up in a component injector.\n *\n * This wrapper type prevents access to the `Provider`s inside.\n *\n * @see `makeEnvironmentProviders`\n * @see `importProvidersFrom`\n *\n * @publicApi\n */\nexport type EnvironmentProviders = {\n ɵbrand: 'EnvironmentProviders';\n};\n\nexport interface InternalEnvironmentProviders extends EnvironmentProviders {\n ɵproviders: (Provider|EnvironmentProviders)[];\n\n /**\n * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.\n *\n * This is used to produce clearer error messages.\n */\n ɵfromNgModule?: true;\n}\n\nexport function isEnvironmentProviders(\n value: Provider|EnvironmentProviders|\n InternalEnvironmentProviders): value is InternalEnvironmentProviders {\n return value && !!(value as InternalEnvironmentProviders).ɵproviders;\n}\n\n/**\n * Describes a function that is used to process provider lists (such as provider\n * overrides).\n */\nexport type ProcessProvidersFunction = (providers: Provider[]) => Provider[];\n\n\n/**\n * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider\n * \"Definition\"). Usage without a generic type is deprecated.\n *\n * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n ngModule: Type<T>;\n providers?: Array<Provider|EnvironmentProviders>;\n}\n\n/**\n * Providers that were imported from NgModules via the `importProvidersFrom` function.\n *\n * These providers are meant for use in an application injector (or other environment injectors) and\n * should not be used in component injectors.\n *\n * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function\n * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.\n *\n * @see `importProvidersFrom`\n *\n * @publicApi\n * @deprecated replaced by `EnvironmentProviders`\n */\nexport type ImportedNgModuleProviders = EnvironmentProviders;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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 * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isEnvironmentProviders} from '../di/interface/provider';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {stringifyForError} from './util/stringify_utils';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: string, path?: string[]): never {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n `Circular dependency in DI detected for ${token}${depPath}`);\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: Type<unknown>, providers?: any[], provider?: any): never {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${\n stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${\n providerDetail.join(', ')}]`);\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\n\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(token: any, injectorName?: string): never {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_NOT_FOUND,\n ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n Inject = -1\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for `inject` instead.\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\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\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\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\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n\n /**\n * This token is being injected into a pipe.\n *\n * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n * the compiler and is not a developer applicable flag.\n */\n ForPipe = 0b10000,\n}\n\n/**\n * Type of the options argument to `inject`.\n *\n * @publicApi\n */\nexport interface InjectOptions {\n /**\n * Use optional injection, and return `null` if the requested token is not found.\n */\n optional?: boolean;\n\n /**\n * Start injection at the parent of the current injector.\n */\n skipSelf?: boolean;\n\n /**\n * Only query the current injector for the token, and don't fall back to the parent injector if\n * it's not found.\n */\n self?: boolean;\n\n /**\n * Stop injection at the host component's injector. Only relevant when injecting from an element\n * injector, and a no-op for environment injectors.\n */\n host?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {throwProviderNotFoundError} from '../render3/errors_di';\nimport {assertNotEqual} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {getInjectableDef, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\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: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined;\nexport function getInjectImplementation() {\n return _injectImplementation;\n}\n\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined): (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\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 * injectable definition.\n */\nexport function injectRootLimpMode<T>(\n token: ProviderToken<T>, notFoundValue: T|undefined, flags: InjectFlags): T|null {\n const injectableDef: ɵɵInjectableDeclaration<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 throwProviderNotFoundError(stringify(token), 'Injector');\n}\n\n\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nexport function assertInjectImplementationNotEqual(\n fn: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {getInjectImplementation, injectRootLimpMode} from './inject_switch';\nimport {Injector} from './injector';\nimport {DecoratorFlags, InjectFlags, InjectOptions, InternalInjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\n\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\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\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\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|\n null {\n if (_currentInjector === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n ngDevMode &&\n `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`EnvironmentInjector#runInContext\\`.`);\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 * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): never {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY,\n ngDevMode &&\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${\n index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${\n index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\n\n/**\n * @param token A token that represents a dependency that should be injected.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param flags Control how injection is executed. The flags correspond to injection strategies that\n * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n * @deprecated prefer an options object instead of `InjectFlags`\n */\nexport function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful.\n * @throws if called outside of a supported context, or if the token is not found.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions&{optional?: false}): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful, `null` if the token is not\n * found and optional injection has been requested.\n * @throws if called outside of a supported context, or if the token is not found and optional\n * injection was not requested.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions): T|null;\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported during instantiation of a dependency by the DI system. It can be used\n * during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n *\n * @param token A token that represents a dependency that should 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`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport function inject<T>(\n token: ProviderToken<T>, flags: InjectFlags|InjectOptions = InjectFlags.Default): T|null {\n return ɵɵinject(token, convertToBitFlags(flags));\n}\n\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nexport function convertToBitFlags(flags: InjectOptions|InjectFlags|undefined): InjectFlags|\n undefined {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return (InternalInjectFlags.Default | // comment to force a line break in the formatter\n ((flags.optional && InternalInjectFlags.Optional) as number) |\n ((flags.host && InternalInjectFlags.Host) as number) |\n ((flags.self && InternalInjectFlags.Self) as number) |\n ((flags.skipSelf && InternalInjectFlags.SkipSelf) as number)) as InjectFlags;\n}\n\nexport function injectArgs(types: (ProviderToken<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 RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode && '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 const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === DecoratorFlags.Inject) {\n type = meta.token;\n } else {\n flags |= flag;\n }\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/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags|DecoratorFlags): any {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number|undefined {\n return token[DI_DECORATOR_FLAG];\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.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\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}]: ${\n text.replace(NEW_LINE, '\\n ')}`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {makeParamDecorator} from '../util/decorators';\n\nimport {attachInjectFlag} from './injector_compatibility';\nimport {DecoratorFlags, InternalInjectFlags} from './interface/injector';\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 * @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\" region=\"InjectWithoutDecorator\">\n * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection)\n *\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 = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n makeParamDecorator('Inject', (token: any) => ({token})), DecoratorFlags.Inject);\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 * @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 * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\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 =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.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 * </code-example>\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 =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.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 * </code-example>\n *\n * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).\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 =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.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 * @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 * </code-example>\n *\n * For an extended example, see [\"Dependency Injection\n * Guide\"](guide/dependency-injection-in-action#optional).\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 =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), InternalInjectFlags.Host);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\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 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\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 // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n Emulated = 0,\n\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n None = 2,\n\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ShadowDom = 3\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {initNgDevMode} from './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) && initNgDevMode()) {\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMP_DEF = getClosureSafeProperty({ɵcmp: getClosureSafeProperty});\nexport const NG_DIR_DEF = getClosureSafeProperty({ɵdir: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ɵpipe: getClosureSafeProperty});\nexport const NG_MOD_DEF = getClosureSafeProperty({ɵmod: getClosureSafeProperty});\nexport const NG_FACTORY_DEF = getClosureSafeProperty({ɵfac: 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module_def';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../util/empty';\nimport {initNgDevMode} from '../util/ng_dev_mode';\nimport {stringify} from '../util/stringify';\n\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_MOD_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DependencyTypeList, DirectiveDef, DirectiveDefFeature, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, TypeOrFactory, ViewQueriesFunction} from './interfaces/definition';\nimport {TAttributes, TConstantsOrFactory} from './interfaces/node';\nimport {CssSelectorList} from './interfaces/projection';\n\n\n/** Counter used to generate unique IDs for component definitions. */\nlet componentDefCount = 0;\n\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 ɵcmp = 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 * 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 decls: 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 * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values, the\n * `hostAttrs` array must include the values in 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 hostAttrs?: TAttributes;\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 * Constants for the nodes in the component's view.\n * Includes attribute arrays, local definition arrays etc.\n */\n consts?: TConstantsOrFactory;\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, components, and pipes that may be found in this component's view.\n *\n * This property is either an array of types or a function that returns the array of types. This\n * function may be necessary to support forward declarations.\n */\n dependencies?: TypeOrFactory<DependencyTypeList>;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n\n /**\n * Whether this directive/component is standalone.\n */\n standalone?: boolean;\n}): unknown {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n const type = componentDefinition.type;\n const standalone = componentDefinition.standalone === true;\n const declaredInputs: {[key: string]: string} = {} as any;\n const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null!,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || 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 onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null!, // assigned in noSideEffects\n pipeDefs: null!, // assigned in noSideEffects\n standalone,\n dependencies: standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features as DirectiveDefFeature[] || null,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: `c${componentDefCount++}`,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n };\n const dependencies = componentDefinition.dependencies;\n const feature = componentDefinition.features;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(extractDirectiveDef)\n .filter(nonNull)) :\n null;\n def.pipeDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(getPipeDef)\n .filter(nonNull)) :\n null;\n\n return def;\n });\n}\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>, directives: Type<any>[]|(() => Type<any>[]),\n pipes: Type<any>[]|(() => Type<any>[])): void {\n const def = (type.ɵcmp as ComponentDef<any>);\n def.directiveDefs = () =>\n (typeof directives === 'function' ? directives() : directives).map(extractDirectiveDef) as\n DirectiveDefList;\n def.pipeDefs = () =>\n (typeof pipes === 'function' ? pipes() : pipes).map(getPipeDef) as PipeDefList;\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any>|ComponentDef<any>|null {\n return getComponentDef(type) || getDirectiveDef(type);\n}\n\nfunction nonNull<T>(value: T|null): value is T {\n return value !== null;\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}): unknown {\n return noSideEffects(() => {\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;\n });\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}): unknown {\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 });\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 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 ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵdefineDirective =\n ɵɵ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 * 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 * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values,\n * the `hostAttrs` array must include the values in 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 hostAttrs?: TAttributes;\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 ɵpipe = 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 /** Whether the pipe is pure. */\n pure?: boolean,\n\n /**\n * Whether the pipe is standalone.\n */\n standalone?: boolean,\n}): unknown {\n return (<PipeDef<T>>{\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n });\n}\n\n/**\n * The following getter methods retrieve the definition from 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[NG_COMP_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n return type[NG_DIR_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n return type[NG_PIPE_DEF] || null;\n}\n\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See this guide for additional information: https://angular.io/guide/standalone-components\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nexport function isStandalone(type: Type<unknown>): boolean {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n return def !== null ? def.standalone : false;\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[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../../di/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\n\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n, TIcu} from './i18n';\nimport {TConstants, TNode} from './node';\nimport {LQueries, TQueries} from './query';\nimport {Renderer, RendererFactory} from './renderer';\nimport {RElement} from './renderer_dom';\nimport {TStylingKey, TStylingRange} 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 TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nexport const T_HOST = 6;\nexport const CLEANUP = 7;\nexport const CONTEXT = 8;\nexport const INJECTOR = 9;\nexport const RENDERER_FACTORY = 10;\nexport const RENDERER = 11;\nexport const SANITIZER = 12;\nexport const CHILD_HEAD = 13;\nexport const CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nexport const DECLARATION_VIEW = 15;\nexport const DECLARATION_COMPONENT_VIEW = 16;\nexport const DECLARATION_LCONTAINER = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\nexport const QUERIES = 19;\nexport const ID = 20;\nexport const EMBEDDED_VIEW_INJECTOR = 21;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nexport const HEADER_OFFSET = 22;\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<T = unknown> extends Array<any> {\n /**\n * The node into which this `LView` is inserted.\n */\n [HOST]: RElement|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 * Store the `TNode` of the location where the current `LView` is inserted into.\n *\n * Given:\n * ```\n * <div>\n * <ng-template><span></span></ng-template>\n * </div>\n * ```\n *\n * We end up with two `TView`s.\n * - `parent` `TView` which contains `<div><!-- anchor --></div>`\n * - `child` `TView` which contains `<span></span>`\n *\n * Typically the `child` is inserted into the declaration location of the `parent`, but it can be\n * inserted anywhere. Because it can be inserted anywhere it is not possible to store the\n * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.\n *\n * So to determine where is our insertion parent we would execute:\n * ```\n * const parentLView = lView[PARENT];\n * const parentTNode = lView[T_HOST];\n * const insertionParent = parentLView[parentTNode.index];\n * ```\n *\n *\n * If `null`, this is the root view of an application (root component is in this view) and it has\n * no parents.\n */\n [T_HOST]: TNode|null;\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 * After `LView` is created it is possible to attach additional instance specific functions at the\n * end of the `lView[CLEANUP]` because we know that no more `T` level cleanup functions will be\n * added here.\n */\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 it's a reference to the component instance itself.\n * - For components, the context is a reference to the component instance itself.\n * - For inline views, the context is null.\n */\n [CONTEXT]: T;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly[INJECTOR]: Injector|null;\n\n /** Factory to be used for creating Renderer. */\n [RENDERER_FACTORY]: RendererFactory;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer;\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 * View where this view's template was declared.\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 /**\n * Points to the declaration component view, used to track transplanted `LView`s.\n *\n * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas\n * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as\n * `DECLARATION_VIEW`.\n *\n * Example:\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"true\">\n * <ng-template #myTmpl>...</ng-template>\n * </div>\n * </#VIEW>\n * ```\n * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas\n * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.\n *\n * The reason for this is that all embedded views are always check-always whereas the component\n * view can be check-always or on-push. When we have a transplanted view it is important to\n * determine if we have transplanted a view from check-always declaration to on-push insertion\n * point. In such a case the transplanted view needs to be added to the `LContainer` in the\n * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion\n * point.) (Any transplanted views which are intra Component are of no interest because the CD\n * strategy of declaration and insertion will always be the same, because it is the same\n * component.)\n *\n * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and\n * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same\n * component `LView`. Transplanted views are a subset of moved views, and we use\n * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.\n *\n * Example showing intra component `LView` movement.\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * </#VIEW>\n * ```\n * The `thenBlock` and `elseBlock` is moved but not transplanted.\n *\n * Example showing inter component `LView` movement (transplanted view).\n * ```\n * <#VIEW #myComp>\n * <ng-template #myTmpl>...</ng-template>\n * <insertion-component [template]=\"myTmpl\"></insertion-component>\n * </#VIEW>\n * ```\n * In the above example `myTmpl` is passed into a different component. If `insertion-component`\n * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be\n * marked as containing transplanted views and those views need to be CD as part of the\n * declaration CD.\n *\n *\n * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where\n * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match\n * (it has been transplanted across components.)\n *\n * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the\n * simplest / most common case).\n *\n * see also:\n * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem\n * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.\n * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted\n * - `LView[DECLARATION_LCONTAINER]` similar problem for queries\n * - `LContainer[MOVED_VIEWS]` similar problem for queries\n */\n [DECLARATION_COMPONENT_VIEW]: LView;\n\n /**\n * A declaration point of embedded views (ones instantiated based on the content of a\n * <ng-template>), null for other types of views.\n *\n * We need to track all embedded views created from a given declaration point so we can prepare\n * query matches in a proper order (query matches are ordered based on their declaration point and\n * _not_ the insertion point).\n */\n [DECLARATION_LCONTAINER]: LContainer|null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n\n /**\n * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n\n /** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */\n [ID]: number;\n\n /**\n * Optional injector assigned to embedded views that takes\n * precedence over the element and module injectors.\n */\n readonly[EMBEDDED_VIEW_INJECTOR]: Injector|null;\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 /** Whether or not this view is currently dirty (needing check) */\n Dirty = 0b00000100000,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 0b000001000000,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 0b000010000000,\n\n /** Whether or not this view is the root view */\n IsRoot = 0b000100000000,\n\n /**\n * Whether this moved LView was needs to be refreshed at the insertion location because the\n * declaration was dirty.\n */\n RefreshTransplantedView = 0b001000000000,\n\n /** Indicates that the view **or any of its ancestors** have an embedded view injector. */\n HasEmbeddedViewInjector = 0b0010000000000,\n\n /**\n * Index of the current init phase on last 21 bits\n */\n IndexWithinInitPhaseIncrementer = 0b0100000000000,\n IndexWithinInitPhaseShift = 11,\n IndexWithinInitPhaseReset = 0b0011111111111,\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[PREORDER_HOOK_FLAGS]) */\nexport const enum PreOrderHookFlags {\n /**\n The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits\n */\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 * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.\n *\n * In order to invoke `HostBindingsFunction` we need:\n * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.\n * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will\n * become the context for the `HostBindingsFunction` invocation.)\n * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally\n * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to\n * it.\n * 4. `HostBindingsFunction`: A host binding function to execute.\n *\n * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.\n *\n * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);\n * 2. `directiveIdx`\n * 3. `bindingRootIdx`\n * 4. `HostBindingsFunction` is passed in as is.\n *\n * The `HostBindingOpCodes` array contains:\n * - negative number to select the element index.\n * - followed by 1 or more of:\n * - a number to select the directive index\n * - a number to select the bindingRoot index\n * - and a function to invoke.\n *\n * ## Example\n *\n * ```\n * const hostBindingOpCodes = [\n * ~30, // Select element 30\n * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;\n * // directiveIdx = 40; bindingRootIdx = 45;\n * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30\n * // directiveIdx = 50; bindingRootIdx = 55;\n * ]\n * ```\n *\n * ## Pseudocode\n * ```\n * const hostBindingOpCodes = tView.hostBindingOpCodes;\n * if (hostBindingOpCodes === null) return;\n * for (let i = 0; i < hostBindingOpCodes.length; i++) {\n * const opCode = hostBindingOpCodes[i] as number;\n * if (opCode < 0) {\n * // Negative numbers are element indexes.\n * setSelectedIndex(~opCode);\n * } else {\n * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n * const directiveIdx = opCode;\n * const bindingRootIndx = hostBindingOpCodes[++i] as number;\n * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n * const context = lView[directiveIdx];\n * hostBindingFn(RenderFlags.Update, context);\n * }\n * }\n * ```\n *\n */\nexport interface HostBindingOpCodes extends Array<number|HostBindingsFunction<any>> {\n __brand__: 'HostBindingOpCodes';\n debug?: string[];\n}\n\n/**\n * Explicitly marks `TView` as a specific type in `ngDevMode`\n *\n * It is useful to know conceptually what time of `TView` we are dealing with when\n * debugging an application (even if the runtime does not need it.) For this reason\n * we store this information in the `ngDevMode` `TView` and than use it for\n * better debugging experience.\n */\nexport const enum TViewType {\n /**\n * Root `TView` is the used to bootstrap components into. It is used in conjunction with\n * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`\n * so that other components can be loaded into it.\n */\n Root = 0,\n\n /**\n * `TView` associated with a Component. This would be the `TView` directly associated with the\n * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)\n */\n Component = 1,\n\n /**\n * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`\n * can have zero or more `Embedded` `TView`s.\n */\n Embedded = 2,\n}\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 * Type of `TView` (`Root`|`Component`|`Embedded`).\n */\n type: TViewType;\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 * A `TNode` representing the declaration location of this `TView` (not part of this TView).\n */\n declTNode: TNode|null;\n\n // FIXME(misko): Why does `TView` not have `declarationTView` property?\n\n /** Whether or not this template has been processed in creation mode. */\n firstCreatePass: boolean;\n\n /**\n * Whether or not this template has been processed in update mode (e.g. change detected)\n *\n * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling\n * instructions. (Mainly to build up a linked list of styling priority order.)\n *\n * Typically this function gets cleared after first execution. If exception is thrown then this\n * flag can remain turned un until there is first successful (no exception) pass. This means that\n * individual styling instructions keep track of if they have already been added to the linked\n * list to prevent double adding.\n */\n firstUpdatePass: 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 * -1 means that it has not been initialized.\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 \"decls\" 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 * A reference to the first child node located in the view.\n */\n firstChild: TNode|null;\n\n /**\n * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`\n *\n * See `HostBindingOpCodes` for encoding details.\n */\n hostBindingOpCodes: HostBindingOpCodes|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 * This array has a flat structure and contains TNode indices, directive indices (where an\n * instance can be found in `LView`) and hook functions. TNode index is followed by the directive\n * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is\n * not repeated and the next lifecycle hook information is stored right after the previous hook\n * function. This is done so that at runtime the system can efficiently iterate over all of the\n * functions to invoke without having to make any decisions/lookups.\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 * This array has the same structure as the `preOrderHooks` one.\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: DestroyHookData|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 collection of queries tracked in a given view.\n */\n queries: TQueries|null;\n\n /**\n * An array of indices pointing to directives with content queries alongside with the\n * corresponding query index. Each entry in this array is a tuple of:\n * - index of the first content query index declared by a given directive;\n * - index of a directive.\n *\n * We are storing those indexes so we can refresh content queries as part of a view refresh\n * process.\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 /**\n * Array of constants for the view. Includes attribute arrays, local definition arrays etc.\n * Used for directive matching, attribute bindings, local definitions and more.\n */\n consts: TConstants|null;\n\n /**\n * Indicates that there was an error before we managed to complete the first create pass of the\n * view. This means that the view is likely corrupted and we should try to recover it.\n */\n incompleteFirstPass: boolean;\n}\n\n/** Single hook callback function. */\nexport type HookFn = () => void;\n\n/**\n * Information necessary to call a hook. E.g. the callback that\n * needs to invoked and the index at which to find its context.\n */\nexport type HookEntry = number|HookFn;\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 = HookEntry[];\n\n/**\n * Array of destroy hooks that should be executed for a view and their directive indices.\n *\n * The array is set up as a series of number/function or number/(number|function)[]:\n * - Even indices represent the context with which hooks should be called.\n * - Odd indices are the hook functions themselves. If a value at an odd index is an array,\n * it represents the destroy hooks of a `multi` provider where:\n * - Even indices represent the index of the provider for which we've registered a destroy hook,\n * inside of the `multi` provider array.\n * - Odd indices are the destroy hook functions.\n * For example:\n * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`\n * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`\n *\n * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,\n * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`\n * have an `ngOnDestroy` hook.\n */\nexport type DestroyHookData = (HookEntry|HookData)[];\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 = (TNode|PipeDef<any>|DirectiveDef<any>|ComponentDef<any>|number|TStylingRange|\n TStylingKey|ProviderToken<any>|TI18n|I18nUpdateOpCodes|TIcu|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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer_dom';\nimport {HOST, LView, NEXT, PARENT, T_HOST, TRANSPLANTED_VIEWS_TO_REFRESH} from './view';\n\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/**\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 */\n\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nexport const HAS_TRANSPLANTED_VIEWS = 2;\n\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\n\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\nexport const MOVED_VIEWS = 9;\n\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 = 10;\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 readonly[HOST]: RElement|RComment|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 * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n [HAS_TRANSPLANTED_VIEWS]: boolean;\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 * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n\n /**\n * A collection of views created based on the underlying `<ng-template>` element but inserted into\n * a different `LContainer`. We need to track views created from a given declaration point since\n * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n */\n [MOVED_VIEWS]: LView[]|null;\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 * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and\n * doing so creates circular dependency.\n */\n [VIEW_REFS]: unknown[]|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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LContainer, TYPE} from './container';\nimport {ComponentDef, DirectiveDef} from './definition';\nimport {TNode, TNodeFlags} from './node';\nimport {RNode} from './renderer_dom';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLView(value: RNode|LView|LContainer|{}|null): 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`\n */\nexport function isLContainer(value: RNode|LView|LContainer|{}|null): value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponentHost(tNode: TNode): boolean {\n return tNode.componentOffset > -1;\n}\n\nexport function isDirectiveHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isDirectiveHost) === TNodeFlags.isDirectiveHost;\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, assertNumber, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {LContainer} from './interfaces/container';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TIcu} from './interfaces/i18n';\nimport {NodeInjectorOffset} from './interfaces/injector';\nimport {TNode} from './interfaces/node';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, T_HOST, TVIEW, TView} from './interfaces/view';\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\n\nexport function assertTNodeForLView(tNode: TNode, lView: LView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\n\nexport function assertTNodeForTView(tNode: TNode, tView: TView) {\n assertTNode(tNode);\n tNode.hasOwnProperty('tView_') &&\n assertEqual(\n (tNode as any as {tView_: TView}).tView_, tView,\n 'This TNode does not belong to this TView.');\n}\n\nexport function assertTNode(tNode: TNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\n\n\nexport function assertTIcu(tIcu: TIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\n\nexport function assertComponentType(\n actual: any,\n msg: string = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertCurrentTNodeIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode|null) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode!.parent, 'currentTNode should have a parent');\n}\n\nexport function assertLContainer(value: any): asserts value is LContainer {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): asserts value is LView|null|undefined {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any): asserts value is LView {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nexport function assertFirstCreatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\n\nexport function assertFirstUpdatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nexport function assertDirectiveDef<T>(obj: any): asserts obj is DirectiveDef<T> {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\n `Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\n\nexport function assertIndexInDeclRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nexport function assertIndexInExpandoRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nexport function assertBetween(lower: number, upper: number, index: number) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\n\nexport function assertProjectionSlots(lView: LView, errMessage?: string) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(\n lView[DECLARATION_COMPONENT_VIEW][T_HOST]!.projection,\n errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\n\nexport function assertParentView(lView: LView|null, errMessage?: string) {\n assertDefined(\n lView,\n errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n\n\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nexport function assertNodeInjector(lView: LView, injectorIndex: number) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + NodeInjectorOffset.PARENT);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(\n lView[injectorIndex + NodeInjectorOffset.PARENT],\n 'injectorIndex should point to parent injector');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\nimport {NG_FACTORY_DEF} from './fields';\n\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n /**\n * Subclasses without an explicit constructor call through to the factory of their base\n * definition, providing it with their own constructor to instantiate.\n */\n <U extends T>(t?: Type<U>): U;\n\n /**\n * If no constructor to instantiate is provided, an instance of type T itself is created.\n */\n (t?: undefined): T;\n};\n\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T>|null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T>|null {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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 {\n return this.firstChange;\n }\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 {\n [propName: string]: SimpleChange;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {assertString} from '../../util/assert';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\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 ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n return NgOnChangesFeatureImpl;\n}\n\nexport function NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n(ɵɵNgOnChangesFeature as DirectiveDefFeature).ngInherit = true;\n\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = 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 declaredName = (this.declaredInputs as {[key: string]: string})[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\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 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\n/**\n * Data structure which is monkey-patched on the component instance and used by `ngOnChanges`\n * life-cycle hook to track previous input values.\n */\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges|null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Profiler events is an enum used by the profiler to distinguish between different calls of user\n * code invoked throughout the application lifecycle.\n */\nexport const enum ProfilerEvent {\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookStart,\n\n /**\n * Corresponds to the point in time after the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookEnd,\n\n /**\n * Corresponds to the point in time before the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputStart,\n\n /**\n * Corresponds to the point in time after the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputEnd,\n}\n\n/**\n * Profiler function which the runtime will invoke before and after user code.\n */\nexport interface Profiler {\n (event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any): void;\n}\n\n\nlet profilerCallback: Profiler|null = null;\n\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setProfiler = (profiler: Profiler|null) => {\n profilerCallback = profiler;\n};\n\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nexport const profiler: Profiler = function(\n event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SVG_NAMESPACE = 'svg';\nexport const MATH_ML_NAMESPACE = 'math';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertGreaterThan, assertGreaterThanOrEqual, assertIndexInRange, assertLessThan} from '../../util/assert';\nimport {assertTNode, assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {TConstants, TNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TView} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such 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] === 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`\n */\nexport function unwrapRNode(value: RNode|LView|LContainer): 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`\n */\nexport function unwrapLView(value: RNode|LView|LContainer): 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 * 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 ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node: RNode = unwrapRNode(lView[tNode.index]);\n return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode|null, lView: LView): RNode|null {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode!, lView);\n const node: RNode|null = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n\n\n// fixme(misko): The return Type should be `TNode|null`\nexport function getTNode(tView: TView, index: number): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index] as TNode;\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function load<T>(view: LView|TData, index: number): T {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\n\nexport function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\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/** Returns a constant from `TConstants` instance. */\nexport function getConstant<T>(consts: TConstants|null, index: null|undefined): null;\nexport function getConstant<T>(consts: TConstants, index: number): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts!, index);\n return consts![index] as unknown as T;\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/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nexport function updateTransplantedViewCount(lContainer: LContainer, amount: 1|- 1) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n let viewOrContainer: LView|LContainer = lContainer;\n let parent: LView|LContainer|null = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags} from '../di/interface/injector';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertLessThan, assertNotEqual, throwError} from '../util/assert';\n\nimport {assertLViewOrUndefined, assertTNodeForLView, assertTNodeForTView} from './assert';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode, TNodeType} from './interfaces/node';\nimport {CONTEXT, DECLARATION_VIEW, HEADER_OFFSET, LView, OpaqueViewState, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {getTNode} from './util/view_utils';\n\n\n/**\n *\n */\ninterface LFrame {\n /**\n * Parent LFrame.\n *\n * This is needed when `leaveView` is called to restore the previous state.\n */\n parent: LFrame;\n\n /**\n * Child LFrame.\n *\n * This is used to cache existing LFrames to relieve the memory pressure.\n */\n child: LFrame|null;\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 */\n lView: LView;\n\n /**\n * Current `TView` associated with the `LFrame.lView`.\n *\n * One can get `TView` from `lFrame[TVIEW]` however because it is so common it makes sense to\n * store it in `LFrame` for perf reasons.\n */\n tView: TView;\n\n /**\n * Used to set the parent property when nodes are created and track query results.\n *\n * This is used in conjunction with `isParent`.\n */\n currentTNode: TNode|null;\n\n /**\n * If `isParent` is:\n * - `true`: then `currentTNode` points to a parent node.\n * - `false`: then `currentTNode` points to previous node (sibling).\n */\n isParent: boolean;\n\n /**\n * Index of currently selected element in LView.\n *\n * Used by binding instructions. Updated as part of advance instruction.\n */\n selectedIndex: number;\n\n /**\n * Current pointer to the binding index.\n */\n bindingIndex: number;\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 */\n contextLView: LView|null;\n\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can then attach patch data `LView` to only those elements. We know that those\n * are the only places where the patch data could change, this way we will save on number\n * of places where tha patching occurs.\n */\n elementDepthCount: number;\n\n /**\n * Current namespace to be used when creating elements\n */\n currentNamespace: string|null;\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 */\n bindingRootIndex: number;\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 */\n currentQueryIndex: number;\n\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[currentDirectiveIndex]` is `DirectiveDef`\n * `LView[currentDirectiveIndex]` is directive instance.\n */\n currentDirectiveIndex: number;\n\n /**\n * Are we currently in i18n block as denoted by `ɵɵelementStart` and `ɵɵelementEnd`.\n *\n * This information is needed because while we are in i18n block all elements must be pre-declared\n * in the translation. (i.e. `Hello �#2�World�/#2�!` pre-declares element at `�#2�` location.)\n * This allocates `TNodeType.Placeholder` element at location `2`. If translator removes `�#2�`\n * from translation than the runtime must also ensure tha element at `2` does not get inserted\n * into the DOM. The translation does not carry information about deleted elements. Therefor the\n * only way to know that an element is deleted is that it was not pre-declared in the translation.\n *\n * This flag works by ensuring that elements which are created without pre-declaration\n * (`TNodeType.Placeholder`) are not inserted into the DOM render tree. (It does mean that the\n * element still gets instantiated along with all of its behavior [directives])\n */\n inI18n: boolean;\n}\n\n/**\n * All implicit instruction state is stored here.\n *\n * It is useful to have a single object where all of the state is stored as a mental model\n * (rather it being spread across many different variables.)\n *\n * PERF NOTE: Turns out that writing to a true global variable is slower than\n * having an intermediate object with properties.\n */\ninterface InstructionState {\n /**\n * Current `LFrame`\n *\n * `null` if we have not called `enterView`\n */\n lFrame: LFrame;\n\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` then we need to prevent the runtime from 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 */\n bindingsEnabled: boolean;\n}\n\nconst instructionState: InstructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n};\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nexport function specOnlyIsInstructionStateEmpty(): boolean {\n return instructionState.lFrame.parent === null;\n}\n\n\nexport function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nexport function getBindingsEnabled(): boolean {\n return instructionState.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 instructionState.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 instructionState.bindingsEnabled = false;\n}\n\n/**\n * Return the current `LView`.\n */\nexport function getLView<T>(): LView<T> {\n return instructionState.lFrame.lView as LView<T>;\n}\n\n/**\n * Return the current `TView`.\n */\nexport function getTView(): TView {\n return instructionState.lFrame.tView;\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 * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T {\n instructionState.lFrame.contextLView = viewToRestore as any as LView;\n return (viewToRestore as any as LView)[CONTEXT] as unknown as T;\n}\n\n\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nexport function ɵɵresetView<T>(value?: T): T|undefined {\n instructionState.lFrame.contextLView = null;\n return value;\n}\n\n\nexport function getCurrentTNode(): TNode|null {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === TNodeType.Placeholder) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\n\nexport function getCurrentTNodePlaceholderOk(): TNode|null {\n return instructionState.lFrame.currentTNode;\n}\n\nexport function getCurrentParentTNode(): TNode|null {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode!.parent;\n}\n\nexport function setCurrentTNode(tNode: TNode|null, isParent: boolean) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\n\nexport function isCurrentTNodeParent(): boolean {\n return instructionState.lFrame.isParent;\n}\n\nexport function setCurrentTNodeAsNotParent(): void {\n instructionState.lFrame.isParent = false;\n}\n\nexport function getContextLView(): LView {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView!;\n}\n\nexport function isInCheckNoChangesMode(): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\n\nexport function setIsInCheckNoChangesMode(mode: boolean): void {\n !ngDevMode && throwError('Must never be called in production mode');\n _isInCheckNoChangesMode = mode;\n}\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\n\nexport function getBindingIndex(): number {\n return instructionState.lFrame.bindingIndex;\n}\n\nexport function setBindingIndex(value: number): number {\n return instructionState.lFrame.bindingIndex = value;\n}\n\nexport function nextBindingIndex(): number {\n return instructionState.lFrame.bindingIndex++;\n}\n\nexport function incrementBindingIndex(count: number): number {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nexport function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\n\nexport function setInI18nBlock(isInI18nBlock: boolean): void {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nexport function setBindingRootForHostBindings(\n bindingRootIndex: number, currentDirectiveIndex: number) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nexport function getCurrentDirectiveIndex(): number {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nexport function setCurrentDirectiveIndex(currentDirectiveIndex: number): void {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nexport function getCurrentDirectiveDef(tData: TData): DirectiveDef<any>|null {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex] as DirectiveDef<any>;\n}\n\nexport function getCurrentQueryIndex(): number {\n return instructionState.lFrame.currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n instructionState.lFrame.currentQueryIndex = value;\n}\n\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView: LView): TNode|null {\n const tView = lView[TVIEW];\n\n // Return the declaration parent for embedded views\n if (tView.type === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === TViewType.Component) {\n return lView[T_HOST];\n }\n\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nexport function enterDI(lView: LView, tNode: TNode, flags: InjectFlags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n\n let parentTNode = tNode as TNode | null;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode!.parent as TNode | null;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]!;\n\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (TNodeType.Element | TNodeType.ElementContainer)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n\n return true;\n}\n\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView 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 lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nexport function enterView(newView: LView): void {\n ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild!;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\n\nfunction createLFrame(parent: LFrame|null): LFrame {\n const lFrame: LFrame = {\n currentTNode: null,\n isParent: true,\n lView: null!,\n tView: null!,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent!,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight(): LFrame {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null!;\n oldLFrame.lView = null!;\n return oldLFrame;\n}\n\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nexport const leaveDI: () => void = leaveViewLight;\n\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nexport function leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null!;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\n\nexport function nextContextImpl<T = any>(level: number): T {\n const contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView!);\n return contextLView[CONTEXT] as unknown as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode &&\n 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 * Gets the currently selected element index.\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 instructionState.lFrame.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 *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nexport function setSelectedIndex(index: number) {\n ngDevMode && index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(\n index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nexport function getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\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 instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\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 instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n return instructionState.lFrame.currentNamespace;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from '../interface/lifecycle_hooks';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\nimport {assertFirstCreatePass} from './assert';\nimport {NgOnChangesFeatureImpl} from './features/ng_onchanges_feature';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {isInCheckNoChangesMode} from './state';\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 */\nexport function registerPreOrderHooks(\n directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView): void {\n ngDevMode && assertFirstCreatePass(tView);\n const {ngOnChanges, ngOnInit, ngDoCheck} =\n directiveDef.type.prototype as OnChanges & OnInit & DoCheck;\n\n if (ngOnChanges as Function | undefined) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\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 ngDevMode && assertFirstCreatePass(tView);\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 ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks: AfterContentInit&AfterContentChecked&AfterViewInit&AfterViewChecked&\n OnDestroy = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\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/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on 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 executeCheckHooks(lView: LView, hooks: HookData, nodeIndex?: number|null) {\n callHooks(lView, hooks, InitPhaseState.InitPhaseCompleted, nodeIndex);\n}\n\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on 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 executeInitAndCheckHooks(\n lView: LView, hooks: HookData, initPhase: InitPhaseState, nodeIndex?: number|null) {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nexport function incrementInitPhaseFlags(lView: LView, initPhase: InitPhaseState): void {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & LViewFlags.InitPhaseStateMask) === initPhase) {\n flags &= LViewFlags.IndexWithinInitPhaseReset;\n flags += LViewFlags.InitPhaseStateIncrementer;\n lView[FLAGS] = flags;\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 on 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 ngDevMode &&\n assertEqual(\n isInCheckNoChangesMode(), false,\n 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1] as number | (() => 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 updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags} from '../../di/interface/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {assertDefined, assertEqual} from '../../util/assert';\n\nimport {TDirectiveHostNode} from './node';\nimport {LView, TData} from './view';\n\n/**\n * Offsets of the `NodeInjector` data structure in the expando.\n *\n * `NodeInjector` is stored in both `LView` as well as `TView.data`. All storage requires 9 words.\n * First 8 are reserved for bloom filter and the 9th is reserved for the associated `TNode` as well\n * as parent `NodeInjector` pointer. All indexes are starting with `index` and have an offset as\n * shown.\n *\n * `LView` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + PARENT: Index to the parent injector. See `RelativeInjectorLocation`\n * `const parent = lView[index + NodeInjectorOffset.PARENT]`\n * ```\n *\n * `TViewData` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + TNODE: TNode associated with this `NodeInjector`\n * `const tNode = tView.data[index + NodeInjectorOffset.TNODE]`\n * ```\n */\nexport const enum NodeInjectorOffset {\n TNODE = 8,\n PARENT = 8,\n BLOOM_SIZE = 8,\n SIZE = 9,\n}\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 {\n __brand__: 'RelativeInjectorLocationFlags';\n}\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: ProviderToken<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 * providers: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * providers: [ {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 `providers` and `viewProviders` it is\n * possible for `viewProviders` to shadow the `providers`. 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 * providers: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProviders: [ {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 `viewProviders`\n * `Factory` has a pointer to the shadowed `providers` 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, _: undefined,\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: TDirectiveHostNode) => 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: ProviderToken<T>, flags?: InjectFlags) => T)) {\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n return obj instanceof NodeInjectorFactory;\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {KeyValueArray} from '../../util/array_utils';\nimport {TStylingRange} from '../interfaces/styling';\n\nimport {TIcu} from './i18n';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer_dom';\nimport {LView, TView} from './view';\n\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n *\n * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily\n * check if the `TNode` is of more than one type.\n *\n * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`\n * can be written as:\n * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`\n *\n * However any given `TNode` can only be of one type.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about a DOM element aka {@link RText}.\n */\n Text = 0b1,\n\n /**\n * The TNode contains information about a DOM element aka {@link RElement}.\n */\n Element = 0b10,\n\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0b100,\n\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 0b1000,\n\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 0b10000,\n\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n Icu = 0b100000,\n\n /**\n * Special node type representing a placeholder for future `TNode` at this location.\n *\n * I18n translation blocks are created before the element nodes which they contain. (I18n blocks\n * can span over many elements.) Because i18n `TNode`s (representing text) are created first they\n * often may need to point to element `TNode`s which are not yet created. In such a case we create\n * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together\n * without knowing any information about the future nodes which will be at that location.\n *\n * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that\n * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse\n * existing `TNode` (rather than create a new one) and just update the missing information.\n */\n Placeholder = 0b1000000,\n\n // Combined Types These should never be used for `TNode.type` only as a useful way to check\n // if `TNode.type` is one of several choices.\n\n // See: https://github.com/microsoft/TypeScript/issues/35875 why we can't refer to existing enum.\n AnyRNode = 0b11, // Text | Element,\n AnyContainer = 0b1100, // Container | ElementContainer, // See:\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nexport function toTNodeTypeAsString(tNodeType: TNodeType): string {\n let text = '';\n (tNodeType & TNodeType.Text) && (text += '|Text');\n (tNodeType & TNodeType.Element) && (text += '|Element');\n (tNodeType & TNodeType.Container) && (text += '|Container');\n (tNodeType & TNodeType.ElementContainer) && (text += '|ElementContainer');\n (tNodeType & TNodeType.Projection) && (text += '|Projection');\n (tNodeType & TNodeType.Icu) && (text += '|IcuContainer');\n (tNodeType & TNodeType.Placeholder) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */\n isDirectiveHost = 0x1,\n\n /** Bit #2 - This bit is set if the node has been projected */\n isProjected = 0x2,\n\n /** Bit #3 - This bit is set if any directive on this node has content queries */\n hasContentQuery = 0x4,\n\n /** Bit #4 - This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0x8,\n\n /** Bit #5 - This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0x10,\n\n /** Bit #6 This bit is set if the node has been detached by i18n */\n isDetached = 0x20,\n\n /**\n * Bit #7 - This bit is set if the node has directives with host bindings.\n *\n * This flags allows us to guard host-binding logic and invoke it only on nodes\n * that actually have directives with host bindings.\n */\n hasHostBindings = 0x40,\n}\n\n/**\n * Corresponds to the TNode.providerIndexes property.\n */\nexport const enum TNodeProviderIndexes {\n /** The index of the first provider on this node is encoded on the least significant bits. */\n ProvidersStartIndexMask = 0b00000000000011111111111111111111,\n\n /**\n * The count of view providers from the component on this node is\n * encoded on the 20 most significant bits.\n */\n CptViewProvidersCountShift = 20,\n CptViewProvidersCountShifter = 0b00000000000100000000000000000000,\n}\n\n/**\n * A set of marker values to be used in the attributes arrays. These markers indicate that some\n * items are not regular attributes and the processing should be adapted accordingly.\n */\nexport const enum AttributeMarker {\n /**\n * An implicit marker which indicates that the value in the array are of `attributeKey`,\n * `attributeValue` format.\n *\n * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that\n * it should not be present at runtime by the negative number.\n */\n ImplicitAttributes = -1,\n\n /**\n * Marker indicates that the following 3 values in the attributes array are:\n * namespaceUri, attributeName, attributeValue\n * in that order.\n */\n NamespaceURI = 0,\n\n /**\n * Signals class declaration.\n *\n * Each value following `Classes` designates a class name to include on the element.\n * ## Example:\n *\n * Given:\n * ```\n * <div class=\"foo bar baz\">...<d/vi>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];\n * ```\n */\n Classes = 1,\n\n /**\n * Signals style declaration.\n *\n * Each pair of values following `Styles` designates a style name and value to include on the\n * element.\n * ## Example:\n *\n * Given:\n * ```\n * <div style=\"width:100px; height:200px; color:red\">...</div>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];\n * ```\n */\n Styles = 2,\n\n /**\n * Signals that the following attribute names were extracted from input or output bindings.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" [foo]=\"exp\" (bar)=\"doSth()\">\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];\n * ```\n */\n Bindings = 3,\n\n /**\n * Signals that the following attribute names were hoisted from an inline-template declaration.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div *ngFor=\"let value of values; trackBy:trackBy\" dirA [dirB]=\"value\">\n * ```\n *\n * the generated code for the `template()` instruction would include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',\n * 'ngForTrackBy', 'let-value']\n * ```\n *\n * while the generated code for the `element()` instruction inside the template function would\n * include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB']\n * ```\n */\n Template = 4,\n\n /**\n * Signals that the following attribute is `ngProjectAs` and its value is a parsed\n * `CssSelector`.\n *\n * For example, given the following HTML:\n *\n * ```\n * <h1 attr=\"value\" ngProjectAs=\"[title]\">\n * ```\n *\n * the generated code for the `element()` instruction would include:\n *\n * ```\n * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]\n * ```\n */\n ProjectAs = 5,\n\n /**\n * Signals that the following attribute will be translated by runtime i18n\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" foo=\"value\" i18n-foo [bar]=\"binding\" i18n-bar>\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];\n */\n I18n = 6,\n}\n\n/**\n * A combination of:\n * - Attribute names and values.\n * - Special markers acting as flags to alter attributes processing.\n * - Parsed ngProjectAs selectors.\n */\nexport type TAttributes = (string|AttributeMarker|CssSelector)[];\n\n/**\n * Constants that are associated with a view. Includes:\n * - Attribute arrays.\n * - Local definition arrays.\n * - Translated messages (i18n).\n */\nexport type TConstants = (TAttributes|string)[];\n\n/**\n * Factory function that returns an array of consts. Consts can be represented as a function in\n * case any additional statements are required to define consts in the list. An example is i18n\n * where additional i18n calls are generated, which should be executed when consts are requested\n * for the first time.\n */\nexport type TConstantsFactory = () => TConstants;\n\n/**\n * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be\n * either an array or a factory function that returns that array.\n */\nexport type TConstantsOrFactory = TConstants|TConstantsFactory;\n\n/**\n * Binding data (flyweight) for a particular node that is shared between all templates\n * of a specific type.\n *\n * If a property is:\n * - PropertyAliases: that property's data was generated and this is it\n * - Null: that property's data was already generated and nothing was found.\n * - Undefined: that property's data has not yet been generated\n *\n * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern\n */\nexport interface TNode {\n /** The type of the TNode. See TNodeType. */\n type: TNodeType;\n\n /**\n * Index of the TNode in TView.data and corresponding native element in LView.\n *\n * This is necessary to get from any TNode to its corresponding native element when\n * traversing the node tree.\n *\n * If index is -1, this is a dynamically created container node or embedded view node.\n */\n index: number;\n\n /**\n * Insert before existing DOM node index.\n *\n * When DOM nodes are being inserted, normally they are being appended as they are created.\n * Under i18n case, the translated text nodes are created ahead of time as part of the\n * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead\n * needs to be inserted using `insertBeforeIndex` semantics.\n *\n * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In\n * such a case the value stores an array of text nodes to insert.\n *\n * Example:\n * ```\n * <div i18n>\n * Hello <span>World</span>!\n * </div>\n * ```\n * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text\n * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't\n * insert `World` because the `<span>` node has not yet been created. In such a case the\n * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert\n * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into\n * `<span>` itself.\n *\n * Pseudo code:\n * ```\n * if (insertBeforeIndex === null) {\n * // append as normal\n * } else if (Array.isArray(insertBeforeIndex)) {\n * // First insert current `TNode` at correct location\n * const currentNode = lView[this.index];\n * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);\n * // Now append all of the children\n * for(let i=1; i<this.insertBeforeIndex; i++) {\n * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);\n * }\n * } else {\n * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])\n * }\n * ```\n * - null: Append as normal using `parentNode.appendChild`\n * - `number`: Append using\n * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`\n *\n * *Initialization*\n *\n * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not\n * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`\n * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`\n * `TNode` at that location. See `TNodeType.Placeholder` for more information.\n */\n insertBeforeIndex: InsertBeforeIndex;\n\n /**\n * The index of the closest injector in this node's LView.\n *\n * If the index === -1, there is no injector on this node or any ancestor node in this view.\n *\n * If the index !== -1, it is the index of this node's injector OR the index of a parent\n * injector in the same view. We pass the parent injector index down the node tree of a view so\n * it's possible to find the parent injector without walking a potentially deep node tree.\n * Injector indices are not set across view boundaries because there could be multiple component\n * hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /** Stores starting index of the directives. */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n *\n * The area right behind the `directiveStart-directiveEnd` range is used to allocate the\n * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set\n * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.\n */\n directiveEnd: number;\n\n /**\n * Offset from the `directiveStart` at which the component (one at most) of the node is stored.\n * Set to -1 if no components have been applied to the node. Component index can be found using\n * `directiveStart + componentOffset`.\n */\n componentOffset: number;\n\n /**\n * Stores the last directive which had a styling instruction.\n *\n * Initial value of this is `-1` which means that no `hostBindings` styling instruction has\n * executed. As `hostBindings` instructions execute they set the value to the index of the\n * `DirectiveDef` which contained the last `hostBindings` styling instruction.\n *\n * Valid values are:\n * - `-1` No `hostBindings` instruction has executed.\n * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of\n * the last styling instruction which executed in the `hostBindings`.\n *\n * This data is needed so that styling instructions know which static styling data needs to be\n * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data\n * since last styling instruction.\n */\n directiveStylingLast: number;\n\n /**\n * Stores indexes of property bindings. This field is only set in the ngDevMode and holds\n * indexes of property bindings so TestBed can get bound property metadata for a given node.\n */\n propertyBindings: number[]|null;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\n * etc.\n */\n flags: TNodeFlags;\n\n /**\n * This number stores two values using its bits:\n *\n * - the index of the first provider on that node (first 16 bits)\n * - the count of view providers from the component on this node (last 16 bits)\n */\n // TODO(misko): break this into actual vars.\n providerIndexes: TNodeProviderIndexes;\n\n /**\n * The value name associated with this node.\n * if type:\n * `TNodeType.Text`: text value\n * `TNodeType.Element`: tag name\n * `TNodeType.ICUContainer`: `TIcu`\n */\n value: any;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various\n * use-cases (attribute injection, content projection with selectors, directives matching).\n * Attributes are stored statically because reading them from the DOM would be way too slow for\n * content projection and queries.\n *\n * Since attrs will always be calculated first, they will never need to be marked undefined by\n * other instructions.\n *\n * For regular attributes a name of an attribute and its value alternate in the array.\n * e.g. ['role', 'checkbox']\n * This array can contain flags that will indicate \"special attributes\" (attributes with\n * namespaces, attributes extracted from bindings and outputs).\n */\n attrs: TAttributes|null;\n\n /**\n * Same as `TNode.attrs` but contains merged data across all directive host bindings.\n *\n * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.\n * We merge attrs here so that it can be used in a performant way for initial rendering.\n *\n * The `attrs` are merged in first pass in following order:\n * - Component's `hostAttrs`\n * - Directives' `hostAttrs`\n * - Template `TNode.attrs` associated with the current `TNode`.\n */\n mergedAttrs: TAttributes|null;\n\n /**\n * A set of local names under which a given element is exported in a template and\n * visible to queries. An entry in this array can be created for different reasons:\n * - an element itself is referenced, ex.: `<div #foo>`\n * - a component is referenced, ex.: `<my-cmpt #foo>`\n * - a directive is referenced, ex.: `<my-cmpt #foo=\"directiveExportAs\">`.\n *\n * A given element might have different local names and those names can be associated\n * with a directive. We store local names at even indexes while odd indexes are reserved\n * for directive index in a view (or `-1` if there is no associated directive).\n *\n * Some examples:\n * - `<div #foo>` => `[\"foo\", -1]`\n * - `<my-cmpt #foo>` => `[\"foo\", myCmptIdx]`\n * - `<my-cmpt #foo #bar=\"directiveExportAs\">` => `[\"foo\", myCmptIdx, \"bar\", directiveIdx]`\n * - `<div #foo #bar=\"directiveExportAs\">` => `[\"foo\", -1, \"bar\", directiveIdx]`\n */\n localNames: (string|number)[]|null;\n\n /** Information about input properties that need to be set once from attribute data. */\n initialInputs: InitialInputData|null|undefined;\n\n /**\n * Input data for all directives on this node. `null` means that there are no directives with\n * inputs on this node.\n */\n inputs: PropertyAliases|null;\n\n /**\n * Output data for all directives on this node. `null` means that there are no directives with\n * outputs on this node.\n */\n outputs: PropertyAliases|null;\n\n /**\n * The TView or TViews attached to this node.\n *\n * If this TNode corresponds to an LContainer with inline views, the container will\n * need to store separate static data for each of its view blocks (TView[]). Otherwise,\n * nodes in inline views with the same index as nodes in their parent views will overwrite\n * each other, as they are in the same template.\n *\n * Each index in this array corresponds to the static data for a certain\n * view. So if you had V(0) and V(1) in a container, you might have:\n *\n * [\n * [{tagName: 'div', attrs: ...}, null], // V(0) TView\n * [{tagName: 'button', attrs ...}, null] // V(1) TView\n *\n * If this TNode corresponds to an LContainer with a template (e.g. structural\n * directive), the template's TView will be stored here.\n *\n * If this TNode corresponds to an element, tViews will be null .\n */\n tViews: TView|TView[]|null;\n\n /**\n * The next sibling node. Necessary so we can propagate through the root nodes of a view\n * to insert them or remove them from the DOM.\n */\n next: TNode|null;\n\n /**\n * The next projected sibling. Since in Angular content projection works on the node-by-node\n * basis the act of projecting nodes might change nodes relationship at the insertion point\n * (target view). At the same time we need to keep initial relationship between nodes as\n * expressed in content view.\n */\n projectionNext: TNode|null;\n\n /**\n * First child of the current node.\n *\n * For component nodes, the child will always be a ContentChild (in same view).\n * For embedded view nodes, the child will be in their child view.\n */\n child: TNode|null;\n\n /**\n * Parent node (in the same view only).\n *\n * We need a reference to a node's parent so we can append the node to its parent's native\n * element at the appropriate time.\n *\n * If the parent would be in a different view (e.g. component host), this property will be null.\n * It's important that we don't try to cross component boundaries when retrieving the parent\n * because the parent will change (e.g. index, attrs) depending on where the component was\n * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through\n * LView.node instead (which will be instance-specific).\n *\n * If this is an inline view node (V), the parent will be its container.\n */\n parent: TElementNode|TContainerNode|null;\n\n /**\n * List of projected TNodes for a given component host element OR index into the said nodes.\n *\n * For easier discussion assume this example:\n * `<parent>`'s view definition:\n * ```\n * <child id=\"c1\">content1</child>\n * <child id=\"c2\"><span>content2</span></child>\n * ```\n * `<child>`'s view definition:\n * ```\n * <ng-content id=\"cont1\"></ng-content>\n * ```\n *\n * If `Array.isArray(projection)` then `TNode` is a host element:\n * - `projection` stores the content nodes which are to be projected.\n * - The nodes represent categories defined by the selector: For example:\n * `<ng-content/><ng-content select=\"abc\"/>` would represent the heads for `<ng-content/>`\n * and `<ng-content select=\"abc\"/>` respectively.\n * - The nodes we store in `projection` are heads only, we used `.next` to get their\n * siblings.\n * - The nodes `.next` is sorted/rewritten as part of the projection setup.\n * - `projection` size is equal to the number of projections `<ng-content>`. The size of\n * `c1` will be `1` because `<child>` has only one `<ng-content>`.\n * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)\n * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and\n * as a result have different set of nodes to project.\n * - without `projection` it would be difficult to efficiently traverse nodes to be projected.\n *\n * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:\n * - `projection` is an index of the host's `projection`Nodes.\n * - This would return the first head node to project:\n * `getHost(currentTNode).projection[currentTNode.projection]`.\n * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case\n * the process is recursive in nature.\n *\n * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as\n * projectable nodes during dynamic component creation.\n */\n projection: (TNode|RNode[])[]|number|null;\n\n /**\n * A collection of all `style` static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial `style`s on an element (e.g. `<div style=\"width:200px;\">`)\n * - There are one or more initial `style`s on a directive/component host\n * (e.g. `@Directive({host: {style: \"width:200px;\" } }`)\n */\n styles: string|null;\n\n\n /**\n * A collection of all `style` static values for an element excluding host sources.\n *\n * Populated when there are one or more initial `style`s on an element\n * (e.g. `<div style=\"width:200px;\">`)\n * Must be stored separately from `tNode.styles` to facilitate setting directive\n * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,\n * we would feed host styles back into directives as \"inputs\". If we used `tNode.attrs`, we\n * would have to concatenate the attributes on every template pass. Instead, we process once on\n * first create pass and store here.\n */\n stylesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `styles`.\n *\n * When there are styling instructions than each instruction stores the static styling\n * which is of lower priority than itself. This means that there may be a higher priority\n * styling than the instruction.\n *\n * Imagine:\n * ```\n * <div style=\"color: highest;\" my-dir>\n *\n * @Directive({\n * host: {\n * style: 'color: lowest; ',\n * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case:\n * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction\n * - `color: highest` is the residual and is stored here.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `styles` is `null`\n * - `KeyValueArray`: parsed version of `styles`.\n */\n residualStyles: KeyValueArray<any>|undefined|null;\n\n /**\n * A collection of all class static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial classes on an element (e.g. `<div class=\"one two three\">`)\n * - There are one or more initial classes on an directive/component host\n * (e.g. `@Directive({host: {class: \"SOME_CLASS\" } }`)\n */\n classes: string|null;\n\n /**\n * A collection of all class static values for an element excluding host sources.\n *\n * Populated when there are one or more initial classes on an element\n * (e.g. `<div class=\"SOME_CLASS\">`)\n * Must be stored separately from `tNode.classes` to facilitate setting directive\n * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed\n * inputs, we would feed host classes back into directives as \"inputs\". If we used\n * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,\n * we process once on first create pass and store here.\n */\n classesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `classes`.\n *\n * Same as `TNode.residualStyles` but for classes.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `classes` is `null`\n * - `KeyValueArray`: parsed version of `classes`.\n */\n residualClasses: KeyValueArray<any>|undefined|null;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the class bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"class\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n classBindings: TStylingRange;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the style bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"style\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n styleBindings: TStylingRange;\n}\n\n/**\n * See `TNode.insertBeforeIndex`\n */\nexport type InsertBeforeIndex = null|number|number[];\n\n/** Static data for an element */\nexport interface TElementNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: TElementNode|TTextNode|TElementContainerNode|TContainerNode|TProjectionNode|null;\n /**\n * Element nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using viewData[HOST_NODE]).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /**\n * If this is a component TNode with projection, this will be an array of projected\n * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node\n * or a component without projection, it will be null.\n */\n projection: (TNode|RNode[])[]|null;\n\n /**\n * Stores TagName\n */\n value: string;\n}\n\n/** Static data for a text node */\nexport interface TTextNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: null;\n /**\n * Text nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an LContainer */\nexport interface TContainerNode extends TNode {\n /**\n * Index in the data[] array.\n *\n * If it's -1, this is a dynamically created container node that isn't stored in\n * data[] (e.g. when you inject ViewContainerRef) .\n */\n index: number;\n child: null;\n\n /**\n * Container nodes will have parents unless:\n *\n * - They are the first node of a component or embedded view\n * - They are dynamically created\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: TView|TView[]|null;\n projection: null;\n value: null;\n}\n\n/** Static data for an <ng-container> */\nexport interface TElementContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: TElementNode|TTextNode|TContainerNode|TElementContainerNode|TProjectionNode|null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an ICU expression */\nexport interface TIcuContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n value: TIcu;\n}\n\n/** Static data for an LProjectionNode */\nexport interface TProjectionNode extends TNode {\n /** Index in the data[] array */\n child: null;\n /**\n * Projection nodes will have parents unless they are the first node of a component\n * or embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /** Index of the projection node. (See TNode.projection for more info.) */\n projection: number;\n value: null;\n}\n\n/**\n * A union type representing all TNode types that can host a directive.\n */\nexport type TDirectiveHostNode = TElementNode|TContainerNode|TElementContainerNode;\n\n/**\n * This mapping is necessary so we can set input properties and output listeners\n * properly at runtime when property names are minified or aliased.\n *\n * Key: unminified / public input or output name\n * Value: array containing minified / internal name and related directive index\n *\n * The value must be an array to support inputs and outputs with the same name\n * on the same node.\n */\nexport type PropertyAliases = {\n // This uses an object map because using the Map type would be too slow\n [key: string]: PropertyAliasValue\n};\n\n/**\n * Store the runtime input or output names for all the directives.\n *\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change-minified']\n */\nexport type PropertyAliasValue = (number|string)[];\n\n/**\n * This array contains information about input properties that\n * need to be set once from attribute data. It's ordered by\n * directive index (relative to element) so it's simple to\n * look up a specific directive's initial input data.\n *\n * Within each sub-array:\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * If a directive on a node does not have any input properties\n * that should be set from attributes, its index is set to null\n * to avoid a sparse array.\n *\n * e.g. [null, ['role-min', 'minified-input', 'button']]\n */\nexport type InitialInputData = (InitialInputs|null)[];\n\n/**\n * Used by InitialInputData to store input properties\n * that should be set once from attributes.\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * e.g. ['role-min', 'minified-input', 'button']\n */\nexport type InitialInputs = 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/**\n * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.\n */\nexport type TNodeWithLocalRefs = TContainerNode|TElementNode|TElementContainerNode;\n\n/**\n * Type for a function that extracts a value for a local refs.\n * Example:\n * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;\n * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;\n */\nexport type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, throwError} from '../util/assert';\nimport {TNode, TNodeType, toTNodeTypeAsString} from './interfaces/node';\n\nexport function assertTNodeType(\n tNode: TNode|null, expectedTypes: TNodeType, message?: string): void {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(\n message ||\n `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${\n toTNodeTypeAsString(tNode.type)}.`);\n }\n}\n\nexport function assertPureTNodeType(type: TNodeType) {\n if (!(type === TNodeType.Element || //\n type === TNodeType.Text || //\n type === TNodeType.Container || //\n type === TNodeType.ElementContainer || //\n type === TNodeType.Icu || //\n type === TNodeType.Projection || //\n type === TNodeType.Placeholder)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${\n toTNodeTypeAsString(type)}.`);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CharCode} from '../../util/char_code';\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\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 * @param renderer The renderer to be used\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(renderer: Renderer, native: RElement, attrs: TAttributes): number {\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 renderer.setAttribute(native, attrName, attrVal, namespaceURI);\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 renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, 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/**\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\nexport function isAnimationProp(name: string): boolean {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === CharCode.AT_SIGN;\n}\n\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nexport function mergeHostAttrs(dst: TAttributes|null, src: TAttributes|null): TAttributes|null {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker: AttributeMarker = AttributeMarker.ImplicitAttributes;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === AttributeMarker.NamespaceURI) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (\n srcMarker === AttributeMarker.ImplicitAttributes ||\n srcMarker === AttributeMarker.Styles) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, src[++i] as string);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, null);\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nexport function mergeHostAttribute(\n dst: TAttributes, marker: AttributeMarker, key1: string, key2: string|null,\n value: string|null): void {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === AttributeMarker.ImplicitAttributes) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value!;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertGreaterThan, assertNotEqual, assertNumber} from '../../util/assert';\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, HEADER_OFFSET, LView} from '../interfaces/view';\n\n\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 ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation as any, -1, 'Not a valid state.');\n const parentInjectorIndex =\n (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n ngDevMode &&\n assertGreaterThan(\n parentInjectorIndex, HEADER_OFFSET,\n 'Parent injector must be pointing past HEADER_OFFSET.');\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/inject_switch';\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectorMarkers} from '../di/injector_marker';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\n\nimport {assertDirectiveDef, assertNodeInjector, assertTNodeForLView} from './assert';\nimport {FactoryFn, getFactoryDef} from './definition_factory';\nimport {throwCyclicDependencyError, throwProviderNotFoundError} from './errors_di';\nimport {NG_ELEMENT_ID, NG_FACTORY_DEF} from './fields';\nimport {registerPreOrderHooks} from './hooks';\nimport {DirectiveDef} from './interfaces/definition';\nimport {isFactory, NO_PARENT_INJECTOR, NodeInjectorFactory, NodeInjectorOffset, RelativeInjectorLocation, RelativeInjectorLocationFlags} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNode, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {isComponentDef, isComponentHost} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, EMBEDDED_VIEW_INJECTOR, FLAGS, INJECTOR, LView, LViewFlags, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {enterDI, getCurrentTNode, getLView, leaveDI} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/stringify_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\nexport function 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/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\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: ProviderToken<any>|string): void {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id: number|undefined;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = (type as any)[NG_ELEMENT_ID];\n }\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 bloomHash = 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 << bloomHash;\n\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n (tView.data as number[])[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\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 lView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode|TContainerNode|TElementContainerNode, lView: LView): number {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\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 parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\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 < NodeInjectorOffset.BLOOM_SIZE; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + NodeInjectorOffset.PARENT] = 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, lView: 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 lView[tNode.injectorIndex + NodeInjectorOffset.PARENT] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\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 Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nexport function getParentInjectorLocation(tNode: TNode, lView: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex as any; // ViewOffset is 0\n }\n\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode: TNode|null = null;\n let lViewCursor: LView|null = lView;\n\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode!, lViewCursor[DECLARATION_VIEW]!);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset << RelativeInjectorLocationFlags.ViewOffsetShift)) as any;\n }\n }\n return NO_PARENT_INJECTOR;\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, tView: TView, token: ProviderToken<any>): void {\n bloomAdd(injectorIndex, 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.ɵcmp = 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 && assertTNodeType(tNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\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 while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\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\nfunction notFoundValueOrThrow<T>(\n notFoundValue: T|null, token: ProviderToken<T>, flags: InjectFlags): T|null {\n if ((flags & InjectFlags.Optional) || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\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 or throws an exception\n */\nfunction lookupTokenUsingModuleInjector<T>(\n lView: LView, token: ProviderToken<T>, flags: InjectFlags, notFoundValue?: any): T|null {\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 return notFoundValueOrThrow<T>(notFoundValue, token, flags);\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. `-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: TDirectiveHostNode|null, lView: LView, token: ProviderToken<T>,\n flags: InjectFlags = InjectFlags.Default, notFoundValue?: any): T|null {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & LViewFlags.HasEmbeddedViewInjector) {\n const embeddedInjectorValue =\n lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n}\n\n/**\n * Returns the value associated to the given token from the node injector.\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 */\nfunction lookupTokenUsingNodeInjector<T>(\n tNode: TDirectiveHostNode, lView: LView, token: ProviderToken<T>, flags: InjectFlags,\n notFoundValue?: any) {\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 if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return (flags & InjectFlags.Host) ?\n notFoundValueOrThrow<T>(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n }\n try {\n const value = bloomHash(flags);\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\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 ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + NodeInjectorOffset.PARENT];\n\n if (parentLocation === NO_PARENT_INJECTOR || !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 ngDevMode && assertNodeInjector(lView, injectorIndex);\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode, lView);\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 parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(\n flags,\n lView[TVIEW].data[injectorIndex + NodeInjectorOffset.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 return notFoundValue;\n}\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number, lView: LView, token: ProviderToken<T>, previousTView: TView|null,\n flags: InjectFlags, hostTElementNode: TNode|null) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\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 (isComponentHost(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.AnyRNode) !== 0));\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(lView, currentTView, 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: ProviderToken<T>|string, 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 ProviderToken<any>| DirectiveDef<any>| string;\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 `LView` 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 lView: LView, tView: TView, index: number, tNode: TDirectiveHostNode): any {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n const previousInjectImplementation =\n factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(\n success, true,\n 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index] as DirectiveDef<any>, tView);\n }\n } finally {\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\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: ProviderToken<any>|string): number|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 =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? (token as any)[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode &&\n assertEqual(tokenId, InjectorMarkers.Injector, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\n\nexport function bloomHasToken(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\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\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, flags?: InjectFlags|InjectOptions): any {\n return getOrCreateInjectable(\n this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\n\n/** Creates a `NodeInjector` for the current node. */\nexport function createNodeInjector(): Injector {\n return new NodeInjector(getCurrentTNode()! as TDirectiveHostNode, getLView()) as any;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\n }\n\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\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null)|null {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf<T>(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef<T>(type);\n}\n\n/**\n * Returns a value from the closest embedded or node injector.\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 */\nfunction lookupTokenUsingEmbeddedInjector<T>(\n tNode: TDirectiveHostNode, lView: LView, token: ProviderToken<T>, flags: InjectFlags,\n notFoundValue?: any) {\n let currentTNode: TDirectiveHostNode|null = tNode;\n let currentLView: LView|null = lView;\n\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null &&\n (currentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector) &&\n !(currentLView[FLAGS] & LViewFlags.IsRoot)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(\n currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode: TElementNode|TContainerNode|null = currentTNode.parent;\n\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue =\n embeddedViewInjector.get(token, NOT_FOUND as T | {}, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n\n currentTNode = parentTNode;\n }\n\n return notFoundValue;\n}\n\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView: LView): TElementNode|TElementContainerNode|null {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n\n // The parent pointer differs based on `TView.type`.\n if (tViewType === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode as TElementContainerNode;\n } else if (tViewType === TViewType.Component) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST] as TElementNode;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {injectAttributeImpl} from '../di';\nimport {getCurrentTNode} from '../state';\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string|null {\n return injectAttributeImpl(getCurrentTNode()!, attrNameToInject);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\nimport {makeParamDecorator} from '../util/decorators';\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` in a directive.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * The following example uses the decorator in a component constructor.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory'}\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 = makeParamDecorator(\n 'Attribute',\n (attributeName?: string) =>\n ({attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName!)}));\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3DependencyMetadataFacade} from '../../compiler/compiler_facade';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Host, Inject, Optional, Self, SkipSelf} from '../metadata';\nimport {Attribute} from '../metadata_attr';\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 return deps.map(dep => reflectDependency(dep));\n}\n\nfunction reflectDependency(dep: any|any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n\n if (Array.isArray(dep) && dep.length > 0) {\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 }\n\n const proto = Object.getPrototypeOf(param);\n\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || 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 RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {getNgModuleDef} from '../render3/definition';\nimport {stringify} from '../util/stringify';\n\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = new Map<string, NgModuleType>();\n\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>|null, incoming: Type<any>): void {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nexport function registerNgModuleType(ngModuleType: NgModuleType, id: string): void {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string): NgModuleType|undefined {\n return modules.get(id);\n}\n\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nexport function setAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RElement} from '../interfaces/renderer_dom';\n\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument.defaultView;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement&{ownerDocument: Document}) {\n return 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 * 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\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 {\n name: string;\n}\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 * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema'\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {throwError} from '../../util/assert';\nimport {getComponentDef} from '../definition';\nimport {ComponentDef} from '../interfaces/definition';\nimport {TNodeType} from '../interfaces/node';\nimport {RComment, RElement} from '../interfaces/renderer_dom';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW, LView} from '../interfaces/view';\nimport {isAnimationProp} from '../util/attrs_utils';\n\nlet shouldThrowErrorOnUnknownElement = false;\n\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nexport function ɵsetUnknownElementStrictMode(shouldThrow: boolean) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n\n/**\n * Gets the current value of the strict mode.\n */\nexport function ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\n\nlet shouldThrowErrorOnUnknownProperty = false;\n\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nexport function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n\n/**\n * Gets the current value of the strict mode.\n */\nexport function ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nexport function validateElementIsKnown(\n element: RElement, lView: LView, tagName: string|null, schemas: SchemaMetadata[]|null,\n hasDirectives: boolean): void {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${\n isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message +=\n `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${\n schemas} of this component to suppress this message.`;\n } else {\n message +=\n `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message);\n } else {\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message));\n }\n }\n }\n}\n\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nexport function isPropertyValid(\n element: RElement|RComment, propName: string, tagName: string|null,\n schemas: SchemaMetadata[]|null): boolean {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return true;\n\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful with `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nexport function handleUnknownPropertyError(\n propName: string, tagName: string|null, nodeType: TNodeType, lView: LView): void {\n // Special-case a situation when a structural directive is applied to\n // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === TNodeType.Container) {\n tagName = 'ng-template';\n }\n\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${\n templateLocation}.`;\n\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ?\n 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` +\n `please make sure that either the '${\n correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n } else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` +\n `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n } else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n }\n\n reportUnknownPropertyError(message);\n}\n\nexport function reportUnknownPropertyError(message: string) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message);\n } else {\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message));\n }\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView: LView): ComponentDef<unknown>|null {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n\n // Unable to obtain a context.\n if (!context) return null;\n\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nexport function isHostComponentStandalone(lView: LView): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nexport function getTemplateLocationDetails(lView: LView): string {\n !ngDevMode && throwError('Must never be called in production mode');\n\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nexport const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([\n ['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'],\n ['ngSwitchDefault', 'NgSwitchDefault']\n]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nexport function matchingSchemas(schemas: SchemaMetadata[]|null, tagName: string|null): boolean {\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\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/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nexport function escapeCommentText(value: string): string {\n return value.replace(\n COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertNumber} from '../../util/assert';\n\nimport {ID, LView} from './view';\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map<number, LView>();\n\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n\n/** Gets a unique ID that can be assigned to an LView. */\nexport function getUniqueLViewId(): number {\n return uniqueIdCounter++;\n}\n\n/** Starts tracking an LView. */\nexport function registerLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n\n/** Gets an LView by its unique ID. */\nexport function getLViewById(id: number): LView|null {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n\n/** Stops tracking an LView. */\nexport function unregisterLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {getLViewById} from './lview_tracking';\nimport {RNode} from './renderer_dom';\nimport {LView} from './view';\n\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 class LContext {\n /**\n * The instance of the Component node.\n */\n public component: {}|null|undefined;\n\n /**\n * The list of active directives that exist on this element.\n */\n public directives: any[]|null|undefined;\n\n /**\n * The map of local references (local reference name => element or directive instance) that\n * exist on this element.\n */\n public localRefs: {[key: string]: any}|null|undefined;\n\n /** Component's parent view data. */\n get lView(): LView|null {\n return getLViewById(this.lViewId);\n }\n\n constructor(\n /**\n * ID of the component's parent view data.\n */\n private lViewId: number,\n\n /**\n * The index instance of the node.\n */\n public nodeIndex: number,\n\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n public native: RNode) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertDomNode} from '../util/assert';\nimport {EMPTY_ARRAY} from '../util/empty';\n\nimport {assertLView} from './assert';\nimport {LContext} from './interfaces/context';\nimport {getLViewById, registerLView} from './interfaces/lview_tracking';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {isLView} from './interfaces/type_checks';\nimport {CONTEXT, HEADER_OFFSET, HOST, ID, LView, TVIEW} from './interfaces/view';\nimport {getComponentLViewByIndex, unwrapRNode} from './util/view_utils';\n\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 (isLView(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);\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 const lView = Array.isArray(parentContext) ? parentContext as LView : parentContext.lView;\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 new LContext(lView[ID], nodeIndex, native);\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 patchedData = readPatchedData(componentInstance);\n let lView: LView;\n\n if (isLView(patchedData)) {\n const contextLView: LView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData as unknown as LContext;\n const contextLView = context.lView!;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\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 ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\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 const data = target[MONKEY_PATCH_KEY_NAME];\n return (typeof data === 'number') ? getLViewById(data) : data || null;\n}\n\nexport function readPatchedLView<T>(target: any): LView<T>|null {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(value) ? value : value.lView) as LView<T>;\n }\n return null;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵdir;\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 const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\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 = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(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 applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nexport function getDirectivesAtNodeIndex(nodeIndex: number, lView: LView): any[]|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results: any[] = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n const {directiveStart, componentOffset} = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @fileoverview\n *\n * This file provides mechanism by which code relevant to the `TIcuContainerNode` is only loaded if\n * ICU is present in the template.\n */\n\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView} from '../interfaces/view';\n\n\nlet _icuContainerIterate: (tIcuContainerNode: TIcuContainerNode, lView: LView) =>\n (() => RNode | null);\n\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nexport function icuContainerIterate(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nexport function ensureIcuContainerVisitorLoaded(\n loader: () => ((tIcuContainerNode: TIcuContainerNode, lView: LView) => (() => RNode | null))) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {readPatchedLView} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CONTEXT, FLAGS, LView, LViewFlags, NEXT, PARENT} from '../interfaces/view';\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<T>(componentOrLView: LView|{}): LView<T> {\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 as LView<T>;\n}\n\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext<T>(viewOrComponent: LView<T>|{}): T {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as T;\n}\n\n\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nexport function getFirstLContainer(lView: LView): LContainer|null {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nexport function getNextLContainer(container: LContainer): LContainer|null {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer: LContainer|LView|null) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer as LContainer | null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererStyleFlags2} from '../render/api_flags';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertEqual, assertFunction, assertNumber, assertString} from '../util/assert';\nimport {escapeCommentText} from '../util/dom';\n\nimport {assertLContainer, assertLView, assertParentView, assertProjectionSlots, assertTNodeForLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS, NATIVE} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {unregisterLView} from './interfaces/lview_tracking';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RComment, RElement, RNode, RTemplate, RText} from './interfaces/renderer_dom';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {CHILD_HEAD, CLEANUP, DECLARATION_COMPONENT_VIEW, DECLARATION_LCONTAINER, DestroyHookData, FLAGS, HookData, HookFn, HOST, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, T_HOST, TVIEW, TView, TViewType} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, unwrapRNode, updateTransplantedViewCount} from './util/view_utils';\n\nconst enum WalkTNodeTreeAction {\n /** node create in the native environment. Run on initial creation. */\n Create = 0,\n\n /**\n * node insert in the native environment.\n * Run when existing node has been detached and needs to be re-attached.\n */\n Insert = 1,\n\n /** node detach from the native environment */\n Detach = 2,\n\n /** node destruction using the renderer's API */\n Destroy = 3,\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 applyToElementOrContainer(\n action: WalkTNodeTreeAction, renderer: Renderer, parent: RElement|null,\n lNodeToHandle: RNode|LContainer|LView, beforeNode?: RNode|null) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\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\n // wrapped 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\n if (action === WalkTNodeTreeAction.Create && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === WalkTNodeTreeAction.Insert && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode!(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\nexport function createTextNode(renderer: Renderer, value: string): RText {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\n\nexport function updateTextNode(renderer: Renderer, rNode: RText, value: string): void {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\n\nexport function createCommentNode(renderer: Renderer, value: string): RComment {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nexport function createElementNode(\n renderer: Renderer, name: string, namespace: string|null): RElement {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n\n\n/**\n * 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 tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nexport function removeViewFromContainer(tView: TView, lView: LView): void {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Detach, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n\n/**\n * Adds 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 add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addViewToContainer(\n tView: TView, parentTNode: TNode, renderer: Renderer, lView: LView, parentNativeNode: RElement,\n beforeNode: RNode|null): void {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Insert, parentNativeNode, beforeNode);\n}\n\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(tView: TView, lView: LView) {\n applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, 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[TVIEW], 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 if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\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 tView The `TView' of the `LView` to insert\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(tView: TView, 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 addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT]![DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n\nfunction detachMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(\n declarationContainer[MOVED_VIEWS],\n 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS]!;\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n\n movedViews.splice(declarationViewIndex, 1);\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes 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\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\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 * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(tView: TView, lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Destroy, null, null);\n }\n\n destroyViewTree(lView);\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 tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView: TView, lView: LView): void {\n if (!(lView[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 lView[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 lView[FLAGS] |= LViewFlags.Destroyed;\n\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === TViewType.Component) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView: TView, lView: LView): void {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]!;\n // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n // information appended at the end. We need to know where the end of the `TCleanup` information\n // is, and we track this with `lastLCleanupIndex`.\n let lastLCleanupIndex = -1;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = targetIdx]();\n } else {\n // Subscription\n lCleanup[lastLCleanupIndex = -targetIdx].unsubscribe();\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[lastLCleanupIndex = tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n const instanceCleanupFn = lCleanup[i];\n ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n instanceCleanupFn();\n }\n lView[CLEANUP] = null;\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView: TView, lView: LView): void {\n let destroyHooks: DestroyHookData|null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1] as HookFn | HookData;\n\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j] as number];\n const hook = toCall[j + 1] as HookFn;\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\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 *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nexport function getParentRElement(tView: TView, tNode: TNode, lView: LView): RElement|null {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nexport function getClosestRElement(tView: TView, tNode: TNode|null, lView: LView): RElement|null {\n let parentTNode: TNode|null = tNode;\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 while (parentTNode !== null &&\n (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu))) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\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 lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, TNodeType.AnyRNode | TNodeType.Container);\n const {componentOffset} = parentTNode;\n if (componentOffset > -1) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {encapsulation} =\n (tView.data[parentTNode.directiveStart + componentOffset] as ComponentDef<unknown>);\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.None ||\n encapsulation === ViewEncapsulation.Emulated) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView) as RElement;\n }\n}\n\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nexport function nativeInsertBefore(\n renderer: Renderer, parent: RElement, child: RNode, beforeNode: RNode|null,\n isMove: boolean): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\n\nfunction nativeAppendChild(renderer: Renderer, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer, parent: RElement, child: RNode, beforeNode: RNode|null, isMove: boolean) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\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: Renderer, parent: RElement, child: RNode, isHostElement?: boolean): void {\n renderer.removeChild(parent, child, isHostElement);\n}\n\n/** Checks if an element is a `<template>` node. */\nfunction isTemplateNode(node: RElement): node is RTemplate {\n return node.tagName === 'TEMPLATE' && (node as RTemplate).content !== undefined;\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer, node: RNode): RElement|null {\n return renderer.parentNode(node);\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer, node: RNode): RNode|null {\n return renderer.nextSibling(node);\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|\n null {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithNoI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n if (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null = getInsertInFrontOfRNodeWithNoI18n;\n\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore: (\n renderer: Renderer, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void;\n\nexport function setI18nHandling(\n getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null,\n processI18nInsertBefore: (\n renderer: Renderer, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nexport function appendChild(\n tView: TView, lView: LView, childRNode: RNode|RNode[], childTNode: TNode): void {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode: TNode = childTNode.parent || lView[T_HOST]!;\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView: LView, tNode: TNode|null): RNode|null {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu | TNodeType.Projection);\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.AnyRNode) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & TNodeType.Container) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & TNodeType.ElementContainer) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & TNodeType.Icu) {\n let nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView!, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n\n return null;\n}\n\nexport function getProjectionNodes(lView: LView, tNode: TNode|null): TNode|RNode[]|null {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const slotIdx = tNode.projection as number;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection![slotIdx];\n }\n return null;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode|\n null {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n\n return lContainer[NATIVE];\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: Renderer, rNode: RNode, isHostElement?: boolean): void {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n\n\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(\n renderer: Renderer, action: WalkTNodeTreeAction, tNode: TNode|null, lView: LView,\n parentRElement: RElement|null, beforeNode: RNode|null, isProjection: boolean) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === WalkTNodeTreeAction.Create) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= TNodeFlags.isProjected;\n }\n }\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n if (tNodeType & TNodeType.ElementContainer) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Projection) {\n applyProjectionRecursive(\n renderer, action, lView, tNode as TProjectionNode, parentRElement, beforeNode);\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.Container);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n\n\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, 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. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param parentRElement parent DOM element for insertion (Removal does not need it).\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer, action: WalkTNodeTreeAction.Destroy,\n parentRElement: null, beforeNode: null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n\n/**\n * `applyProjection` performs operation on the projection.\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 tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nexport function applyProjection(tView: TView, lView: LView, tProjectionNode: TProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST]!;\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(\n renderer, WalkTNodeTreeAction.Create, lView, tProjectionNode, parentRNode, beforeNode);\n}\n\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * 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 Render 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 tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(\n renderer: Renderer, action: WalkTNodeTreeAction, lView: LView, tProjectionNode: TProjectionNode,\n parentRElement: RElement|null, beforeNode: RNode|null) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST] as TElementNode;\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection![tProjectionNode.projection]!;\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n } else {\n let nodeToProject: TNode|null = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT] as LView;\n applyNodes(\n renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n}\n\n\n/**\n * `applyContainer` 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 parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(\n renderer: Renderer, action: WalkTNodeTreeAction, lContainer: LContainer,\n parentRElement: 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\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nexport function applyStyling(\n renderer: Renderer, isClassBased: boolean, rNode: RElement, prop: string, value: any) {\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer.removeClass(rNode, prop);\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer.addClass(rNode, prop);\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase as number;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer.removeStyle(rNode, prop, flags);\n } else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags! |= RendererStyleFlags2.Important;\n }\n\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer.setStyle(rNode, prop, value, flags);\n }\n }\n}\n\n\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectStyle(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n renderer.setAttribute(element, 'style', newValue);\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectClass(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\n}\n\n/** Sets up the static DOM attributes on an `RNode`. */\nexport function setupStaticAttributes(renderer: Renderer, element: RElement, tNode: TNode) {\n const {mergedAttrs, classes, styles} = tNode;\n\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, element, mergedAttrs);\n }\n\n if (classes !== null) {\n writeDirectClass(renderer, element, classes);\n }\n\n if (styles !== null) {\n writeDirectStyle(renderer, element, styles);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy('angular', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nexport function trustedScriptFromString(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function trustedScriptURLFromString(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nexport function newTrustedFunctionForDev(...args: string[]): Function {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\n if (!global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = global['eval'](trustedScriptFromString(body) as string) as Function;\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(global);\n\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getTemplateLocationDetails} from '../render3/instructions/element_validation';\nimport {TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {RENDERER} from '../render3/interfaces/view';\nimport {nativeRemoveNode} from '../render3/node_manipulation';\nimport {getLView, getSelectedTNode} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\n\n/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an <iframe>.\n * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the\n * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list\n * of such attributes.\n *\n * @codeGenApi\n */\nexport function ɵɵvalidateIframeAttribute(attrValue: any, tagName: string, attrName: string) {\n const lView = getLView();\n const tNode = getSelectedTNode()!;\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n\n // Restrict any dynamic bindings of security-sensitive attributes/properties\n // on an <iframe> for security reasons.\n if (tNode.type === TNodeType.Element && tagName.toLowerCase() === 'iframe') {\n const iframe = element as HTMLIFrameElement;\n\n // Unset previously applied `src` and `srcdoc` if we come across a situation when\n // a security-sensitive attribute is set later via an attribute/property binding.\n iframe.src = '';\n iframe.srcdoc = trustedHTMLFromString('') as unknown as string;\n\n // Also remove the <iframe> from the document.\n nativeRemoveNode(lView[RENDERER], iframe);\n\n const errorMessage = ngDevMode &&\n `Angular has detected that the \\`${attrName}\\` was applied ` +\n `as a binding to an <iframe>${getTemplateLocationDetails(lView)}. ` +\n `For security reasons, the \\`${attrName}\\` can be set on an <iframe> ` +\n `as a static attribute only. \\n` +\n `To fix this, switch the \\`${attrName}\\` binding to a static attribute ` +\n `in a template or in host bindings section.`;\n throw new RuntimeError(RuntimeErrorCode.UNSAFE_IFRAME_ATTRS, errorMessage);\n }\n return attrValue;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT: Document|undefined = undefined;\n\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nexport function setDocument(document: Document|undefined): void {\n DOCUMENT = document;\n}\n\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nexport function getDocument(): Document {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return undefined!;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory)\n .createPolicy('angular#unsafe-bypass', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedHTMLFromStringBypass(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptFromStringBypass(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptURLFromStringBypass(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\n\nexport const enum BypassType {\n Url = 'URL',\n Html = 'HTML',\n ResourceUrl = 'ResourceURL',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n\nabstract class SafeValueImpl implements SafeValue {\n constructor(public changingThisBreaksApplicationSecurity: string) {}\n\n abstract getTypeName(): string;\n\n toString() {\n return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see ${XSS_SECURITY_URL})`;\n }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n override getTypeName() {\n return BypassType.Html;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n override getTypeName() {\n return BypassType.Style;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n override getTypeName() {\n return BypassType.Script;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n override getTypeName() {\n return BypassType.Url;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n override getTypeName() {\n return BypassType.ResourceUrl;\n }\n}\n\nexport function unwrapSafeValue(value: SafeValue): string;\nexport function unwrapSafeValue<T>(value: T): T;\nexport function unwrapSafeValue<T>(value: T|SafeValue): T {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity as any as T :\n value as any as T;\n}\n\n\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Html): value is SafeHtml;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.ResourceUrl): value is SafeResourceUrl;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Script): value is SafeScript;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Style): value is SafeStyle;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType.Url): value is SafeUrl;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === BypassType.ResourceUrl && type === BypassType.Url) return true;\n throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n }\n return actualType === type;\n}\n\nexport function getSanitizationBypassType(value: any): BypassType|null {\n return value instanceof SafeValueImpl && value.getTypeName() as BypassType || null;\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` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): SafeHtml {\n return new SafeHtmlImpl(trustedHtml);\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` hich has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): SafeStyle {\n return new SafeStyleImpl(trustedStyle);\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` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): SafeScript {\n return new SafeScriptImpl(trustedScript);\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` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): SafeUrl {\n return new SafeUrlImpl(trustedUrl);\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` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string): SafeResourceUrl {\n return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * This helper 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 use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nexport function getInertBodyHelper(defaultDoc: Document): InertBodyHelper {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n\nexport interface InertBodyHelper {\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n}\n\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper implements InertBodyHelper {\n constructor(private inertDocumentHelper: InertBodyHelper) {}\n\n getInertBodyElement(html: string): HTMLElement|null {\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. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser()\n .parseFromString(trustedHTMLFromString(html) as string, 'text/html')\n .body as HTMLBodyElement;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.removeChild(body.firstChild!);\n return body;\n } catch {\n return null;\n }\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 fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper implements InertBodyHelper {\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n\n if (this.inertDocument.body == 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 const inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n\n getInertBodyElement(html: string): HTMLElement|null {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html) as string;\n return templateEl;\n }\n\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n const inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html) as string;\n\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if ((this.defaultDoc as any).documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n\n return inertBody;\n }\n\n /**\n * When IE11 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 and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nexport function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(\n trustedHTMLFromString('') as string, 'text/html');\n } catch {\n return false;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\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. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN)) return url;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n\n return 'unsafe:' + url;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {TrustedHTML} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\nimport {getInertBodyHelper, InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl} 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// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#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// https://html.spec.whatwg.org/#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\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,srcset,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, 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 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) {\n this.buf.push(encodeEntities(chars));\n }\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(`Failed to sanitize html because the element is clobbered: ${\n (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, '&')\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) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\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): TrustedHTML|string {\n let inertBodyElement: HTMLElement|null = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(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 ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n }\n\n return trustedHTMLFromString(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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getDocument} from '../render3/interfaces/document';\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString, trustedScriptURLFromString} from '../util/security/trusted_types';\nimport {trustedHTMLFromStringBypass, trustedScriptFromStringBypass, trustedScriptURLFromStringBypass} from '../util/security/trusted_types_bypass';\n\nimport {allowSanitizationBypassAndThrow, BypassType, unwrapSafeValue} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer} from './sanitizer';\nimport {SecurityContext} from './security';\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 * @codeGenApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\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.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, BypassType.Style)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return 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 * @codeGenApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, BypassType.Url)) {\n return unwrapSafeValue(unsafeUrl);\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 * @codeGenApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(\n sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL,\n ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);\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 * @codeGenApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): TrustedScript|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(\n sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, BypassType.Script)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT,\n ngDevMode && 'unsafe value used in a script context');\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\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' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n 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 * @codeGenApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `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 RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n const lView = getLView();\n return lView && lView[SANITIZER];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertLessThan} from '../util/assert';\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 an additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * const 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.\n * As you can see in the Tree-shakable InjectionToken example below.\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` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\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 ɵprov: unknown;\n\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(protected _desc: string, options?: {\n providedIn?: Type<any>|'root'|'platform'|'any'|null, factory: () => T\n }) {\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n /**\n * @internal\n */\n get multi(): InjectionToken<Array<T>> {\n return this as InjectionToken<Array<T>>;\n }\n\n toString(): string {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n ɵprov: unknown;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nexport const ENVIRONMENT_INITIALIZER = new InjectionToken<() => void>('ENVIRONMENT_INITIALIZER');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {InjectorMarkers} from './injector_marker';\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 // Disable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {InjectionToken} from './injection_token';\n\nexport const INJECTOR_DEF_TYPES = new InjectionToken<Type<unknown>>('INJECTOR_DEF_TYPES');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {stringify} from '../util/stringify';\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\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 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {getComponentDef} from '../render3/definition';\nimport {getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError} from '../render3/errors_di';\nimport {stringifyForError} from '../render3/util/stringify_utils';\nimport {deepForEach} from '../util/array_utils';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\nimport {EMPTY_ARRAY} from '../view';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {ɵɵinject as inject} from './injector_compatibility';\nimport {getInjectorDef, InjectorType, InjectorTypeWithProviders} from './interface/defs';\nimport {ClassProvider, ConstructorProvider, EnvironmentProviders, ExistingProvider, FactoryProvider, ImportedNgModuleProviders, InternalEnvironmentProviders, isEnvironmentProviders, ModuleWithProviders, Provider, StaticClassProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component in a component injector.\n */\nexport function makeEnvironmentProviders(providers: (Provider|EnvironmentProviders)[]):\n EnvironmentProviders {\n return {\n ɵproviders: providers,\n } as unknown as EnvironmentProviders;\n}\n\n/**\n * A source of providers for the `importProvidersFrom` function.\n *\n * @publicApi\n */\nexport type ImportProvidersSource =\n Type<unknown>|ModuleWithProviders<unknown>|Array<ImportProvidersSource>;\n\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nexport function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true,\n } as InternalEnvironmentProviders;\n}\n\nexport function internalImportProvidersFrom(\n checkForStandaloneCmp: boolean, ...sources: ImportProvidersSource[]): Provider[] {\n const providersOut: SingleProvider[] = [];\n const dedup = new Set<Type<unknown>>(); // already seen types\n let injectorTypesWithProviders: InjectorTypeWithProviders<unknown>[]|undefined;\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE,\n `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${\n stringifyForError(source)}\"`);\n }\n }\n\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source as Type<unknown>| InjectorTypeWithProviders<unknown>;\n if (walkProviderTree(internalSource, providersOut, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, providersOut);\n }\n\n return providersOut;\n}\n\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(\n typesWithProviders: InjectorTypeWithProviders<unknown>[], providersOut: Provider[]): void {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {ngModule, providers} = typesWithProviders[i];\n deepForEachProvider(providers! as Array<Provider|InternalEnvironmentProviders>, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n providersOut.push(provider);\n });\n }\n}\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\nexport type SingleProvider = TypeProvider|ValueProvider|ClassProvider|ConstructorProvider|\n ExistingProvider|FactoryProvider|StaticClassProvider;\n\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\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 */\nexport function walkProviderTree(\n container: Type<unknown>|InjectorTypeWithProviders<unknown>, providersOut: SingleProvider[],\n parents: Type<unknown>[],\n dedup: Set<Type<unknown>>): container is InjectorTypeWithProviders<unknown> {\n container = resolveForwardRef(container);\n if (!container) return false;\n\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType: Type<unknown>|null = null;\n\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule: Type<unknown>|undefined =\n (container as InjectorTypeWithProviders<any>).ngModule as Type<unknown>| undefined;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule!;\n } else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container as Type<unknown>;\n }\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n\n if (cmpDef.dependencies) {\n const deps =\n typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, providersOut, parents, dedup);\n }\n }\n } else if (injDef) {\n // First, include providers from any imports.\n if (injDef.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 dedup.add(defType);\n\n let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, providersOut, parents, dedup)) {\n 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 processInjectorTypesWithProviders(importTypesWithProviders, providersOut);\n }\n }\n\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType!());\n\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n providersOut.push(\n // Provider to create `defType` using its factory.\n {provide: defType, useFactory: factory, deps: EMPTY_ARRAY},\n\n // Make this `defType` available to an internal logic that calculates injector scope.\n {provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true},\n\n // Provider to eagerly instantiate `defType` via `ENVIRONMENT_INITIALIZER`.\n {provide: ENVIRONMENT_INITIALIZER, useValue: () => inject(defType!), multi: true} //\n );\n }\n\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers as Array<SingleProvider|InternalEnvironmentProviders>;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container as InjectorType<any>;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider as SingleProvider, defProviders, injectorType);\n providersOut.push(provider as SingleProvider);\n });\n }\n } else {\n // Should not happen, but just in case.\n return false;\n }\n\n return (\n defType !== container &&\n (container as InjectorTypeWithProviders<any>).providers !== undefined);\n}\n\nfunction validateProvider(\n provider: SingleProvider, providers: Array<SingleProvider|InternalEnvironmentProviders>,\n containerType: Type<unknown>): void {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||\n isExistingProvider(provider)) {\n return;\n }\n\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(\n provider && ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\n\nfunction deepForEachProvider(\n providers: Array<Provider|InternalEnvironmentProviders>,\n fn: (provider: SingleProvider) => void): void {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\n\nexport const USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nexport function isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nexport function isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nexport function 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n\nexport type InjectorScope = 'root'|'platform'|'environment';\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 INJECTOR_SCOPE = new InjectionToken<InjectorScope|null>('Set Injector scope.');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {getComponentDef} from '../render3/definition';\nimport {FactoryFn, getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors_di';\nimport {newArray} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {setInjectImplementation} from './inject_switch';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {catchInjectorError, convertToBitFlags, injectArgs, NG_TEMP_TOKEN_PATH, setCurrentInjector, THROW_IF_NOT_FOUND, ɵɵinject} from './injector_compatibility';\nimport {INJECTOR} from './injector_token';\nimport {getInheritedInjectableDef, getInjectableDef, InjectorType, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, EnvironmentProviders, InternalEnvironmentProviders, isEnvironmentProviders, Provider, StaticClassProvider} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\nimport {NullInjector} from './null_injector';\nimport {isExistingProvider, isFactoryProvider, isTypeProvider, isValueProvider, SingleProvider} from './provider_collection';\nimport {ProviderToken} from './provider_token';\nimport {INJECTOR_SCOPE, InjectorScope} from './scope';\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\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nexport function 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 * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nexport abstract class EnvironmentInjector implements Injector {\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: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions&{\n optional?: false;\n }): T;\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: ProviderToken<T>, notFoundValue: null|undefined, options: InjectOptions): T\n |null;\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: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\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 * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * Runs the given function in the context of this `EnvironmentInjector`.\n *\n * Within the function's stack frame, `inject` can be used to inject dependencies from this\n * injector. Note that `inject` is only usable synchronously, and cannot be used in any\n * asynchronous callbacks or after any `await` points.\n *\n * @param fn the closure to be run in the context of this injector\n * @returns the return value of the function, if any\n */\n abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;\n\n abstract destroy(): void;\n\n /**\n * @internal\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport class R3Injector extends EnvironmentInjector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n private records = new Map<ProviderToken<any>, Record<any>|null>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private _ngOnDestroyHooks = new Set<OnDestroy>();\n\n private _onDestroyHooks: Array<() => void> = [];\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean {\n return this._destroyed;\n }\n private _destroyed = false;\n\n private injectorDefTypes: Set<Type<unknown>>;\n\n constructor(\n providers: Array<Provider|EnvironmentProviders>, readonly parent: Injector,\n readonly source: string|null, readonly scopes: Set<InjectorScope>) {\n super();\n // Start off by creating Records for every provider.\n forEachSingleProvider(\n providers as Array<Provider|InternalEnvironmentProviders>,\n provider => this.processProvider(provider));\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\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 const record = this.records.get(INJECTOR_SCOPE) as Record<InjectorScope|null>;\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value as InjectorScope);\n }\n\n this.injectorDefTypes =\n new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));\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 override 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 for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n for (const hook of this._onDestroyHooks) {\n hook();\n }\n } finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n this._onDestroyHooks.length = 0;\n }\n }\n\n override onDestroy(callback: () => void): void {\n this._onDestroyHooks.push(callback);\n }\n\n override runInContext<ReturnT>(fn: () => ReturnT): ReturnT {\n this.assertNotDestroyed();\n\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n }\n }\n\n override get<T>(\n token: ProviderToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n flags: InjectFlags|InjectOptions = InjectFlags.Default): T {\n this.assertNotDestroyed();\n flags = convertToBitFlags(flags) as InjectFlags;\n\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\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|null = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || 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 // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e: any) {\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, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n }\n }\n\n /** @internal */\n resolveInjectorInitializers() {\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n }\n }\n\n override toString() {\n const tokens: string[] = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n private assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n ngDevMode && 'Injector has already been destroyed.');\n }\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(provider: SingleProvider): 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);\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 (ngDevMode && 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 (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: ProviderToken<T>, record: Record<T>): T {\n if (ngDevMode && 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._ngOnDestroyHooks.add(record.value);\n }\n return record.value as T;\n }\n\n private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || (this.scopes.has(providedIn));\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n if (factory !== null) {\n return factory;\n }\n\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `Token ${stringify(token)} is missing a ɵprov 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 RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && '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[] = newArray(paramLength, '?');\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `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 injectable\n // def 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(provider: SingleProvider): Record<any> {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory: (() => any)|undefined = providerToFactory(provider);\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 (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || 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 hasDeps(value: ClassProvider|ConstructorProvider|\n StaticClassProvider): 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 ProviderToken<any> {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\n\nfunction forEachSingleProvider(\n providers: Array<Provider|EnvironmentProviders>, fn: (provider: SingleProvider) => void): void {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n } else {\n fn(provider as SingleProvider);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_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 * Updates a specified input name to a new value. Using this method will properly mark for check\n * component using the `OnPush` change detection strategy. It will also assure that the\n * `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.\n *\n * @param name The name of an input.\n * @param value The new value of an input.\n */\n abstract setInput(name: string, value: unknown): void;\n\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 *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\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 environmentInjector?: EnvironmentInjector|NgModuleRef<any>): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory} from './component_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(`No component factory found for ${\n 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 * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = (/* @__PURE__ */ 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TNode} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(): ElementRef {\n return createElementRef(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(tNode: TNode, lView: LView): ElementRef {\n return new ElementRef(getNativeByTNode(tNode, lView) as RElement);\n}\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](https://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) {\n this.nativeElement = nativeElement;\n }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = injectElementRef;\n}\n\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nexport function unwrapElementRef<T, R>(value: T|ElementRef<R>): T|R {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isLView} from '../render3/interfaces/type_checks';\nimport {RENDERER} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\n\nimport {RendererStyleFlags2, RendererType2} from './api_flags';\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/**\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 before which `newChild` is inserted.\n * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a\n * move. Animation uses this information to trigger move animations. In the past the Animation\n * would always assume that any `insertBefore` is a move. This is not strictly true because\n * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should\n * not trigger an animation move.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): 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 = () => injectRenderer2();\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 = getCurrentTNode()!;\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER] as Renderer2;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {SecurityContext} from './security';\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 /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @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('15.1.5');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This 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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg = `${message} caused by: ${\n originalError instanceof Error ? originalError.message : originalError}`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getOriginalError} from './util/errors';\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\n this._console.error('ERROR', error);\n if (originalError) {\n this._console.error('ORIGINAL ERROR', originalError);\n }\n }\n\n /** @internal */\n _findOriginalError(error: any): Error|null {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e || null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\n\nimport {getComponentDef} from './definition';\nimport {TNode} from './interfaces/node';\nimport {LView, TVIEW} from './interfaces/view';\nimport {INTERPOLATION_DELIMITER} from './util/misc_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n/** Verifies that a given type is a Standalone Component. */\nexport function assertStandaloneComponentType(type: Type<unknown>) {\n assertComponentDef(type);\n const componentDef = getComponentDef(type)!;\n if (!componentDef.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.TYPE_IS_NOT_STANDALONE,\n `The ${stringifyForError(type)} component is not marked as standalone, ` +\n `but Angular expects to have a standalone component here. ` +\n `Please make sure the ${stringifyForError(type)} component has ` +\n `the \\`standalone: true\\` flag in the decorator.`);\n }\n}\n\n/** Verifies whether a given type is a component */\nexport function assertComponentDef(type: Type<unknown>) {\n if (!getComponentDef(type)) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_GENERATED_DEF,\n `The ${stringifyForError(type)} is not an Angular component, ` +\n `make sure it has the \\`@Component\\` decorator.`);\n }\n}\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(\n tNode: TNode, first: Type<unknown>, second: Type<unknown>): never {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n `Multiple components match node with tagname ${tNode.value}: ` +\n `${stringifyForError(first)} and ` +\n `${stringifyForError(second)}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean, oldValue: any, currValue: any, propName?: string): never {\n const field = propName ? ` for '${propName}'` : '';\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${\n field}: '${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 throw new RuntimeError(RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED, msg);\n}\n\nfunction constructDetailsForInterpolation(\n lView: LView, rootIndex: number, expressionIndex: number, meta: string, changedValue: any) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix, newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return {propName, oldValue, newValue};\n}\n\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nexport function getExpressionChangedErrorDetails(\n lView: LView, bindingIndex: number, oldValue: any,\n newValue: any): {propName?: string, oldValue: any, newValue: any} {\n const tData = lView[TVIEW].data;\n const metadata = tData[bindingIndex];\n\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(\n lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return {propName: metadata, oldValue, newValue};\n }\n\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return {propName: undefined, oldValue, newValue};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertNotEqual} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nexport function classIndexOf(\n className: string, classToSearch: string, startingIndex: number): number {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= CharCode.SPACE) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= CharCode.SPACE) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags} from './interfaces/projection';\nimport {classIndexOf} from './styling/class_differ';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(\n attrs: TAttributes, cssClassToMatch: string, isProjectionMode: boolean): boolean {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(\n cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i] as string;\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n } else if (item === AttributeMarker.Classes) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch) return true;\n }\n return false;\n }\n }\n return false;\n}\n\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nexport function isInlineTemplate(tNode: TNode): boolean {\n return tNode.type === TNodeType.Container && tNode.value !== NG_TEMPLATE_SELECTOR;\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 =\n tNode.type === TNodeType.Container && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\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)) {\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.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue as string, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n\n const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n const attrIndexInNode =\n findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), 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 &&\n assertNotEqual(\n nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = (nodeAttrs[attrIndexInNode + 1] as string).toLowerCase();\n }\n\n const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue as string, 0) !== -1 ||\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\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 (\n maybeAttrName === AttributeMarker.Classes || maybeAttrName === AttributeMarker.Styles) {\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 const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === 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\nfunction maybeWrapInNotSelector(isNegativeMode: boolean, chunk: string): string {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector: CssSelector): string {\n let result = selector[0] as string;\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & SelectorFlags.ATTRIBUTE) {\n const attrValue = selector[++i] as string;\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & SelectorFlags.CLASS) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & SelectorFlags.ELEMENT) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nexport function stringifyCSSSelectorList(selectorList: CssSelectorList): string {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nexport function extractAttrsAndClassesFromSelector(selector: CssSelector):\n {attrs: string[], classes: string[]} {\n const attrs: string[] = [];\n const classes: string[] = [];\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === SelectorFlags.ATTRIBUTE) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i] as string);\n }\n } else if (mode === SelectorFlags.CLASS) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {attrs, classes};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport 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: NO_CHANGE =\n (typeof ngDevMode === 'undefined' || ngDevMode) ? {__brand__: 'NO_CHANGE'} : ({} as NO_CHANGE);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertGreaterThan} from '../../util/assert';\nimport {assertIndexInDeclRange} from '../assert';\nimport {executeCheckHooks, executeInitAndCheckHooks} from '../hooks';\nimport {FLAGS, InitPhaseState, LView, LViewFlags, TView} from '../interfaces/view';\nimport {getLView, getSelectedIndex, getTView, isInCheckNoChangesMode, setSelectedIndex} from '../state';\n\n\n/**\n * Advances to 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 * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nexport function ɵɵadvance(delta: number): void {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(\n getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());\n}\n\nexport function selectIndexInternal(\n tView: TView, lView: LView, index: number, checkNoChangesMode: boolean) {\n ngDevMode && assertIndexInDeclRange(lView, index);\n\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted =\n (lView[FLAGS] & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, index);\n }\n }\n }\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 `ɵɵadvance` instruction.\n setSelectedIndex(index);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {resolveForwardRef} from '../forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\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 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3InjectableMetadataFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {NG_FACTORY_DEF} from '../../render3/fields';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {resolveForwardRef} from '../forward_ref';\nimport {Injectable} from '../injectable';\nimport {NG_PROV_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 * injectable def (`ɵprov`) onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, meta?: Injectable): void {\n let ngInjectableDef: any = null;\n let ngFactoryDef: any = null;\n\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngInjectableDef = compiler.compileInjectable(\n angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n },\n });\n }\n\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0, // In JIT mode types are not available nor used.\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\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\nfunction getInjectableMetadata(type: Type<any>, srcMeta?: Injectable): R3InjectableMetadataFacade {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable} from './jit/injectable';\n\nexport {compileInjectable};\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider|ExistingSansProvider|StaticClassSansProvider|\n 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 be\n * provided and injected as a dependency.\n *\n * @see [Introduction to Services and DI](guide/architecture-services)\n * @see [Dependency Injection Guide](guide/dependency-injection)\n *\n * @usageNotes\n *\n * Marking a class with `@Injectable` ensures that the compiler\n * will generate the necessary metadata to create the class's\n * dependencies when the class is injected.\n *\n * The following example shows how a service class is properly\n * marked so that a supporting service can be injected upon creation.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"></code-example>\n *\n */\n (): TypeDecorator;\n (options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n InjectableProvider): TypeDecorator;\n new(): Injectable;\n new(options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n 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 *\n * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`. This\n * option is DEPRECATED.\n * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically\n * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),\n * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).\n *\n * The following options specify that this injectable should be provided in one of the following\n * injectors:\n * - 'root' : The application-level injector in most apps.\n * - 'platform' : A special singleton platform injector shared by all\n * applications on the page.\n * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded\n * modules share one instance. This option is DEPRECATED.\n *\n */\n providedIn?: Type<any>|'root'|'platform'|'any'|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) => compileInjectable(type as any, meta));\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {Injector} from './injector';\nimport {StaticProvider} from './interface/provider';\nimport {importProvidersFrom} from './provider_collection';\nimport {getNullInjector, R3Injector} from './r3_injector';\nimport {InjectorScope} from './scope';\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 const injector =\n createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\n return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n defType: /* InjectorType<any> */ any, parent: Injector|null = null,\n additionalProviders: StaticProvider[]|null = null, name?: string,\n scopes = new Set<InjectorScope>()): R3Injector {\n const providers = [\n additionalProviders || EMPTY_ARRAY,\n importProvidersFrom(defType),\n ];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {createInjector} from './create_injector';\nimport {THROW_IF_NOT_FOUND, ɵɵinject} from './injector_compatibility';\nimport {InjectorMarkers} from './injector_marker';\nimport {INJECTOR} from './injector_token';\nimport {ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {StaticProvider} from './interface/provider';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage 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 = (/* @__PURE__ */ new NullInjector());\n\n /**\n * Internal note on the `options?: InjectOptions|InjectFlags` override of the `get`\n * method: consider dropping the `InjectFlags` part in one of the major versions.\n * It can **not** be done in minor/patch, since it's breaking for custom injectors\n * that only implement the old `InjectorFlags` interface.\n */\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: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions&{\n optional?: false;\n }): T;\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: ProviderToken<T>, notFoundValue: null|undefined, options: InjectOptions): T\n |null;\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: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions|InjectFlags):\n T;\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 * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<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 /**\n * Creates a new injector instance that provides one or more dependencies,\n * according to a given type or types of `StaticProvider`.\n *\n * @param options An object with the following properties:\n * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n * * `parent`: (optional) A parent injector.\n * * `name`: (optional) A developer-defined identifying name for the new injector.\n *\n * @returns The new injector instance.\n *\n */\n static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n\n static create(\n options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n parent?: Injector): Injector {\n if (Array.isArray(options)) {\n return createInjector({name: ''}, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({name}, options.parent, options.providers, name);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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}!${\n 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {stringify} from '../util/stringify';\n\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 RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_TOKEN, ngDevMode && '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 {\n return _globalKeyRegistry.numberOfKeys;\n }\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 {\n return this._allKeys.size;\n }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {getReflect} from './jit/util';\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 = getReflect().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(\n providers: Provider[], res: NormalizedProvider[]): NormalizedProvider[] {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({provide: b, useClass: b} as NormalizedProvider);\n\n } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n res.push(b as NormalizedProvider);\n\n } else if (Array.isArray(b)) {\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 = getReflect().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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 = {};\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 * TODO: delete in v14.\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 = (/* @__PURE__ */ 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 = [];\n this.objs = [];\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 {\n return this.objs.length;\n }\n\n private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n if (provider.multiProvider) {\n const res = [];\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: any) {\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 as Error).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 {\n return this.displayName;\n }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n const res: any[] = [];\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\nexport * from './metadata';\nexport {InjectFlags} from './interface/injector';\nexport {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';\nexport {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';\nexport {Injectable, InjectableDecorator, InjectableProvider} from './injectable';\nexport {Injector} from './injector';\nexport {EnvironmentInjector} from './r3_injector';\nexport {importProvidersFrom, ImportProvidersSource, makeEnvironmentProviders} from './provider_collection';\nexport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nexport {ProviderToken} from './provider_token';\nexport {ɵɵinject, inject, ɵɵinvalidFactoryDep} from './injector_compatibility';\nexport {InjectOptions} from './interface/injector';\nexport {INJECTOR} from './injector_token';\nexport {ReflectiveInjector} from './reflective_injector';\nexport {ClassProvider, ModuleWithProviders, ClassSansProvider, ImportedNgModuleProviders, ConstructorProvider, EnvironmentProviders, ConstructorSansProvider, ExistingProvider, ExistingSansProvider, FactoryProvider, FactorySansProvider, Provider, StaticClassProvider, StaticClassSansProvider, StaticProvider, TypeProvider, ValueProvider, ValueSansProvider} from './interface/provider';\nexport {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';\nexport {ReflectiveKey} from './reflective_key';\nexport {InjectionToken} from './injection_token';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nexport * from './di/index';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectFlags, resolveForwardRef} from '../../di';\nimport {assertInjectImplementationNotEqual} from '../../di/inject_switch';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ProviderToken} from '../../di/provider_token';\nimport {getOrCreateInjectable} from '../di';\nimport {TDirectiveHostNode} from '../interfaces/node';\nimport {getCurrentTNode, getLView} 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 ɵdir = ɵɵ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: ProviderToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\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) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n return getOrCreateInjectable<T>(\n tNode as TDirectiveHostNode, lView, resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n const msg =\n ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n throw new Error(msg);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../../di/injector';\nimport {ErrorHandler} from '../../error_handler';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DoCheck, OnChanges, OnInit} from '../../interface/lifecycle_hooks';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {assertDefined, assertEqual, assertGreaterThan, assertGreaterThanOrEqual, assertIndexInRange, assertNotEqual, assertNotSame, assertSame, assertString} from '../../util/assert';\nimport {escapeCommentText} from '../../util/dom';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {stringify} from '../../util/stringify';\nimport {assertFirstCreatePass, assertFirstUpdatePass, assertLContainer, assertLView, assertTNodeForLView, assertTNodeForTView} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {getFactoryDef} from '../definition_factory';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeCheckHooks, executeInitAndCheckHooks, incrementInitPhaseFlags} from '../hooks';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, HostBindingsFunction, HostDirectiveBindingMap, HostDirectiveDefs, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {NodeInjectorFactory} from '../interfaces/injector';\nimport {getUniqueLViewId} from '../interfaces/lview_tracking';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliases, PropertyAliasValue, TAttributes, TConstantsOrFactory, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from '../interfaces/node';\nimport {Renderer, RendererFactory} from '../interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {isComponentDef, isComponentHost, isContentQueryHost, isRootView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, EMBEDDED_VIEW_INJECTOR, FLAGS, HEADER_OFFSET, HOST, HostBindingOpCodes, ID, InitPhaseState, INJECTOR, LView, LViewFlags, NEXT, PARENT, RENDERER, RENDERER_FACTORY, SANITIZER, T_HOST, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TVIEW, TView, TViewType} from '../interfaces/view';\nimport {assertPureTNodeType, assertTNodeType} from '../node_assert';\nimport {updateTextNode} from '../node_manipulation';\nimport {isInlineTemplate, isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {enterView, getBindingsEnabled, getCurrentDirectiveIndex, getCurrentParentTNode, getCurrentTNode, getCurrentTNodePlaceholderOk, getSelectedIndex, isCurrentTNodeParent, isInCheckNoChangesMode, isInI18nBlock, leaveView, setBindingIndex, setBindingRootForHostBindings, setCurrentDirectiveIndex, setCurrentQueryIndex, setCurrentTNode, setIsInCheckNoChangesMode, setSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER} from '../util/misc_utils';\nimport {renderStringify, stringifyForError} from '../util/stringify_utils';\nimport {getFirstLContainer, getLViewParent, getNextLContainer} from '../util/view_traversal_utils';\nimport {getComponentLViewByIndex, getNativeByIndex, getNativeByTNode, isCreationMode, resetPreOrderHookFlags, unwrapLView, updateTransplantedViewCount, viewAttachedToChangeDetector} from '../util/view_utils';\n\nimport {selectIndexInternal} from './advance';\nimport {ɵɵdirectiveInject} from './di';\nimport {handleUnknownPropertyError, isPropertyValid, matchingSchemas} from './element_validation';\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nexport function processHostBindingOpCodes(tView: TView, lView: LView): void {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i] as number;\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n } else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i] as number;\n const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n hostBindingFn(RenderFlags.Update, context);\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n\n\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries!(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}\n\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n}\n\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n\nexport function createLView<T>(\n parentLView: LView|null, tView: TView, context: T|null, flags: LViewFlags, host: RElement|null,\n tHostNode: TNode|null, rendererFactory: RendererFactory|null, renderer: Renderer|null,\n sanitizer: Sanitizer|null, injector: Injector|null,\n embeddedViewInjector: Injector|null): LView {\n const lView = tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n if (embeddedViewInjector !== null ||\n (parentLView && (parentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector))) {\n lView[FLAGS] |= LViewFlags.HasEmbeddedViewInjector;\n }\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\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 lView[ID] = getUniqueLViewId();\n lView[EMBEDDED_VIEW_INJECTOR as any] = embeddedViewInjector;\n ngDevMode &&\n assertEqual(\n tView.type == TViewType.Embedded ? parentLView !== null : true, true,\n 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == TViewType.Embedded ? parentLView![DECLARATION_COMPONENT_VIEW] : 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 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, index: number, type: TNodeType.Element|TNodeType.Text, name: string|null,\n attrs: TAttributes|null): TElementNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Container, name: string|null,\n attrs: TAttributes|null): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Projection, name: null,\n attrs: TAttributes|null): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.ElementContainer, name: string|null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Icu, name: null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null):\n TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&TIcuContainerNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index] as TNode;\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= TNodeFlags.isDetached;\n }\n } else if (tNode.type & TNodeType.Placeholder) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode as TElementNode & TContainerNode & TElementContainerNode & TProjectionNode &\n TIcuContainerNode;\n}\n\nexport function createTNodeAtIndex(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = tView.data[index] =\n createTNode(tView, parent as TElementNode | TContainerNode, type, index, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n }\n }\n }\n return tNode;\n}\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nexport function allocExpando(\n tView: TView, lView: LView, numSlotsToAlloc: number, initialValue: any): number {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(\n tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nexport function renderView<T>(tView: TView, lView: LView<T>, context: T): void {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Create, viewQuery, context);\n }\n\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate<T>(tView, lView, templateFn, RenderFlags.Create, context);\n }\n\n // This needs to be set before children are processed to support recursive components.\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 firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\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 (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn<T>(RenderFlags.Update, tView.viewQuery!, context);\n }\n\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n\n } catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n\n throw error;\n } finally {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n leaveView();\n }\n}\n\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nexport function refreshView<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<{}>|null, context: T) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & LViewFlags.Destroyed) === LViewFlags.Destroyed) return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Update, context);\n }\n\n const hooksInitPhaseCompleted =\n (flags & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, null);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.OnInitHooksToBeRun);\n }\n }\n\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(\n lView, contentHooks, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n }\n\n processHostBindingOpCodes(tView, lView);\n\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Update, viewQuery, context);\n }\n\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n }\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(lView[PARENT] as LContainer, -1);\n }\n } finally {\n leaveView();\n }\n}\n\nfunction executeTemplate<T>(\n tView: TView, lView: LView<T>, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & RenderFlags.Update;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n\n const preHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateStart : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context as unknown as {});\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n\n const postHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateEnd : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context as unknown as {});\n }\n}\n\n//////////////////////////\n//// Element\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.\n */\nexport function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n if (!getBindingsEnabled()) return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\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 */\nexport function saveResolvedLocalsInData(\n viewData: LView, tNode: TDirectiveHostNode,\n localRefExtractor: LocalRefExtractor = getNativeByTNode): void {\n const localNames = tNode.localNames;\n if (localNames !== null) {\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 getOrCreateComponentTView(def: ComponentDef<any>): TView {\n const tView = def.tView;\n\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return def.tView = createTView(\n TViewType.Component, declTNode, def.template, def.decls, def.vars, def.directiveDefs,\n def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n\n return tView;\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls 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 * @param consts Constants for this view\n */\nexport function createTView(\n type: TViewType, declTNode: TNode|null, templateFn: ComponentTemplate<any>|null, decls: number,\n vars: number, directives: DirectiveDefListOrFactory|null, pipes: PipeDefListOrFactory|null,\n viewQuery: ViewQueriesFunction<any>|null, schemas: SchemaMetadata[]|null,\n constsOrFactory: TConstantsOrFactory|null): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\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 const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW as any] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: 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 consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = [];\n\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n\n return blueprint as LView;\n}\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nexport function locateHostElement(\n renderer: Renderer, elementOrSelector: RElement|string,\n encapsulation: ViewEncapsulation): RElement {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\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 *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nexport function storeCleanupWithContext(\n tView: TView, lView: LView, context: any, cleanupFn: Function): void {\n const lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n } else {\n lCleanup.push(context);\n\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n}\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\n * @param tParent Parent `TNode`\n * @param type The type of the node\n * @param index 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 tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Container,\n index: number, tagName: string|null, attrs: TAttributes|null): TContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Element|TNodeType.Text,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.ElementContainer,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Icu, index: number,\n tagName: string|null, attrs: TAttributes|null): TIcuContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Projection,\n index: number, tagName: string|null, attrs: TAttributes|null): TProjectionNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n tagName: string|null, attrs: TAttributes|null): TNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n value: string|null, attrs: TAttributes|null): TNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0 as any,\n styleBindings: 0 as any,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n\n/**\n * Generates the `PropertyAliases` data structure from the provided input/output mapping.\n * @param aliasMap Input/output mapping from the directive definition.\n * @param directiveIndex Index of the directive.\n * @param propertyAliases Object in which to store the results.\n * @param hostDirectiveAliasMap Object used to alias or filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction generatePropertyAliases(\n aliasMap: {[publicName: string]: string}, directiveIndex: number,\n propertyAliases: PropertyAliases|null,\n hostDirectiveAliasMap: HostDirectiveBindingMap|null): PropertyAliases|null {\n for (let publicName in aliasMap) {\n if (aliasMap.hasOwnProperty(publicName)) {\n propertyAliases = propertyAliases === null ? {} : propertyAliases;\n const internalName = aliasMap[publicName];\n\n // If there are no host directive mappings, we want to remap using the alias map from the\n // definition itself. If there is an alias map, it has two functions:\n // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n // ones inside the host directive map will be exposed on the host.\n // 2. The public name of the property is aliased using the host directive alias map, rather\n // than the alias map from the definition.\n if (hostDirectiveAliasMap === null) {\n addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName);\n } else if (hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n addPropertyAlias(\n propertyAliases, directiveIndex, hostDirectiveAliasMap[publicName], internalName);\n }\n }\n }\n return propertyAliases;\n}\n\nfunction addPropertyAlias(\n propertyAliases: PropertyAliases, directiveIndex: number, publicName: string,\n internalName: string) {\n if (propertyAliases.hasOwnProperty(publicName)) {\n propertyAliases[publicName].push(directiveIndex, internalName);\n } else {\n propertyAliases[publicName] = [directiveIndex, internalName];\n }\n}\n\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(\n tView: TView, tNode: TNode, hostDirectiveDefinitionMap: HostDirectiveDefs|null): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs: InitialInputData = [];\n let inputsStore: PropertyAliases|null = null;\n let outputsStore: PropertyAliases|null = null;\n\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const directiveDef = tViewData[directiveIndex] as DirectiveDef<any>;\n const aliasData =\n hostDirectiveDefinitionMap ? hostDirectiveDefinitionMap.get(directiveDef) : null;\n const aliasedInputs = aliasData ? aliasData.inputs : null;\n const aliasedOutputs = aliasData ? aliasData.outputs : null;\n\n inputsStore =\n generatePropertyAliases(directiveDef.inputs, directiveIndex, inputsStore, aliasedInputs);\n outputsStore =\n generatePropertyAliases(directiveDef.outputs, directiveIndex, outputsStore, aliasedOutputs);\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs =\n (inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n }\n\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\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 */\nfunction mapPropName(name: string): string {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\n\nexport function elementPropertyInternal<T>(\n tView: TView, tNode: TNode, lView: LView, propName: string, value: T, renderer: Renderer,\n sanitizer: SanitizerFn|null|undefined, nativeOnly: boolean): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n let inputData = tNode.inputs;\n let dataValue: PropertyAliasValue|undefined;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n } else if (tNode.type & TNodeType.AnyRNode) {\n propName = mapPropName(propName);\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n ngDevMode.rendererSetProperty++;\n }\n\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.value || '', propName) as any) : value;\n renderer.setProperty(element as RElement, propName, value);\n } else if (tNode.type & TNodeType.AnyContainer) {\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(tView.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nexport function markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nfunction 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.AnyRNode) {\n if (value == null) {\n renderer.removeAttribute((element as RElement), attrName);\n } else {\n renderer.setAttribute((element as RElement), attrName, debugValue);\n }\n } else {\n const textContent =\n escapeCommentText(`bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`);\n renderer.setValue((element as RComment), textContent);\n }\n}\n\nexport function setNgReflectProperties(\n lView: LView, element: RElement|RComment, type: TNodeType, dataValue: PropertyAliasValue,\n value: any) {\n if (type & (TNodeType.AnyRNode | 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: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1] as string, value);\n }\n }\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n tView: TView, lView: LView, tNode: TElementNode|TContainerNode|TElementContainerNode,\n localRefs: string[]|null): boolean {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n\n let hasDirectives = false;\n if (getBindingsEnabled()) {\n const exportsMap: ({[key: string]: number}|null) = localRefs === null ? null : {'': -1};\n const matchResult = findDirectiveDefMatches(tView, tNode);\n let directiveDefs: DirectiveDef<unknown>[]|null;\n let hostDirectiveDefs: HostDirectiveDefs|null;\n\n if (matchResult === null) {\n directiveDefs = hostDirectiveDefs = null;\n } else {\n [directiveDefs, hostDirectiveDefs] = matchResult;\n }\n\n if (directiveDefs !== null) {\n hasDirectives = true;\n initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nexport function initializeDirectives(\n tView: TView, lView: LView<unknown>, tNode: TElementNode|TContainerNode|TElementContainerNode,\n directives: DirectiveDef<unknown>[], exportsMap: {[key: string]: number;}|null,\n hostDirectiveDefs: HostDirectiveDefs|null) {\n ngDevMode && assertFirstCreatePass(tView);\n\n // Publishes the directive types to DI so they can be injected. Needs to\n // happen in a separate pass before the TNode flags have been initialized.\n for (let i = 0; i < directives.length; i++) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n }\n\n initTNodeFlags(tNode, tView.data.length, directives.length);\n\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];\n if (def.providersResolver) def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directives.length, null);\n ngDevMode &&\n assertSame(\n directiveIdx, tNode.directiveStart,\n 'TNode.directiveStart should point to just allocated space');\n\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n\n if (def.contentQueries !== null) tNode.flags |= TNodeFlags.hasContentQuery;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= TNodeFlags.hasHostBindings;\n\n const lifeCycleHooks: OnChanges&OnInit&DoCheck = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n\n directiveIdx++;\n }\n\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nexport function registerHostBindingOpCodes(\n tView: TView, tNode: TNode, directiveIdx: number, directiveVarsIdx: number,\n def: ComponentDef<any>|DirectiveDef<any>): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [] as any as HostBindingOpCodes;\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(\n tView: TView, lView: LView, tNode: TDirectiveHostNode, native: RNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n\n // The component view needs to be created before creating the node injector\n // since it is used to inject some special symbols like `ChangeDetectorRef`.\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n addComponentLogic(\n lView, tNode as TElementNode,\n tView.data[start + tNode.componentOffset] as ComponentDef<unknown>);\n }\n\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n\n attachPatchData(native, lView);\n\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs!);\n }\n\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\n\nexport function invokeDirectivesHostBindings(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex] as DirectiveDef<unknown>;\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nexport function invokeHostBindingsInCreationMode(def: DirectiveDef<any>, directive: any) {\n if (def.hostBindings !== null) {\n def.hostBindings!(RenderFlags.Create, directive);\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 findDirectiveDefMatches(\n tView: TView, tNode: TElementNode|TContainerNode|TElementContainerNode):\n [matches: DirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs|null]|null {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n const registry = tView.directiveRegistry;\n let matches: DirectiveDef<unknown>[]|null = null;\n let hostDirectiveDefs: HostDirectiveDefs|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 = []);\n\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(\n tNode, TNodeType.Element,\n `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`);\n\n if (isComponentHost(tNode)) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef)!.type, def.type);\n }\n }\n\n // Components are inserted at the front of the matches array so that their lifecycle\n // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n // compatibility. This logic doesn't make sense with host directives, because it\n // would allow the host directives to undo any overrides the host may have made.\n // To handle this case, the host directives of components are inserted at the beginning\n // of the array, followed by the component. As such, the insertion order is as follows:\n // 1. Host directives belonging to the selector-matched component.\n // 2. Selector-matched component.\n // 3. Host directives belonging to selector-matched directives.\n // 4. Selector-matched directives.\n if (def.findHostDirectiveDefs !== null) {\n const hostDirectiveMatches: DirectiveDef<unknown>[] = [];\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n // Add all host directives declared on this component, followed by the component itself.\n // Host directives should execute first so the host has a chance to override changes\n // to the DOM made by them.\n matches.unshift(...hostDirectiveMatches, def);\n // Component is offset starting from the beginning of the host directives array.\n const componentOffset = hostDirectiveMatches.length;\n markAsComponentHost(tView, tNode, componentOffset);\n } else {\n // No host directives on this component, just add the\n // component def to the beginning of the matches.\n matches.unshift(def);\n markAsComponentHost(tView, tNode, 0);\n }\n } else {\n // Append any host directives to the matches first.\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n matches.push(def);\n }\n }\n }\n }\n return matches === null ? null : [matches, hostDirectiveDefs];\n}\n\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nexport function markAsComponentHost(tView: TView, hostTNode: TNode, componentOffset: number): void {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components || (tView.components = [])).push(hostTNode.index);\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\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)\n throw new RuntimeError(\n RuntimeErrorCode.EXPORT_NOT_FOUND,\n ngDevMode && `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 directiveIdx: 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]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\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 initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n ngDevMode &&\n assertNotEqual(\n numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives');\n tNode.flags |= TNodeFlags.isDirectiveHost;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nexport function configureViewWithDirective<T>(\n tView: TView, tNode: TNode, lView: LView, directiveIndex: number, def: DirectiveDef<T>): void {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory =\n def.factory || ((def as {factory: Function}).factory = getFactoryDef(def.type, true));\n // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory =\n new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n\n registerHostBindingOpCodes(\n tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\n\nfunction addComponentLogic<T>(lView: LView, hostTNode: TElementNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(hostTNode, lView) as RElement;\n const tView = getOrCreateComponentTView(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,\n createLView(\n lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, native,\n hostTNode as TElementNode, rendererFactory, rendererFactory.createRenderer(native, def),\n null, null, null));\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[hostTNode.index] = componentView;\n}\n\nexport function elementAttributeInternal(\n tNode: TNode, lView: LView, name: string, value: any, sanitizer: SanitizerFn|null|undefined,\n namespace: string|null|undefined) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(\n tNode, TNodeType.Element,\n `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView) as RElement;\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nexport function setElementAttribute(\n renderer: Renderer, element: RElement, namespace: string|null|undefined, tagName: string|null,\n name: string, value: any, sanitizer: SanitizerFn|null|undefined) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n renderer.removeAttribute(element, name, namespace);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n\n renderer.setAttribute(element, name, strValue as string, namespace);\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\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 lView: LView, directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode,\n initialInputData: InitialInputData): void {\n const initialInputs: InitialInputs|null = initialInputData![directiveIndex];\n if (initialInputs !== null) {\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 !== null) {\n def.setInput!(instance, value, publicName, privateName);\n } else {\n (instance as any)[privateName] = value;\n }\n if (ngDevMode) {\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 inputs Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(\n inputs: PropertyAliases, directiveIndex: number, attrs: TAttributes): InitialInputs|null {\n let inputsToStore: InitialInputs|null = null;\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 if (inputs.hasOwnProperty(attrName as string)) {\n if (inputsToStore === null) inputsToStore = [];\n\n // Find the input's public name from the input store. Note that we can be found easier\n // through the directive def, but we want to do it using the inputs store so that it can\n // account for host directive aliases.\n const inputConfig = inputs[attrName as string];\n for (let j = 0; j < inputConfig.length; j += 2) {\n if (inputConfig[j] === directiveIndex) {\n inputsToStore.push(\n attrName as string, inputConfig[j + 1] as string, attrs[i + 1] as string);\n // A directive can't have multiple inputs with the same name so we can break here.\n break;\n }\n }\n }\n\n i += 2;\n }\n return inputsToStore;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\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|LView, currentView: LView, native: RComment,\n tNode: TNode): LContainer {\n ngDevMode && assertLView(currentView);\n const lContainer: LContainer = [\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n false, // has transplanted views\n currentView, // parent\n null, // next\n 0, // transplanted views to refresh count\n tNode, // t_host\n native, // native,\n null, // view refs\n null, // moved views\n ];\n ngDevMode &&\n assertEqual(\n lContainer.length, CONTAINER_HEADER_OFFSET,\n 'Should allocate correct number of slots for LContainer header.');\n return lContainer;\n}\n\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n }\n }\n }\n}\n\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;\n\n const movedViews = lContainer[MOVED_VIEWS]!;\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i]!;\n const insertionLContainer = movedLView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & LViewFlags.RefreshTransplantedView) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= LViewFlags.RefreshTransplantedView;\n }\n }\n}\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView: LView, componentHostIdx: number): void {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n const tView = componentView[TVIEW];\n if (componentView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n if (viewAttachedToChangeDetector(embeddedLView)) {\n if (embeddedLView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(\n embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n\n } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n }\n\n const tView = lView[TVIEW];\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n for (let i = 0; i < components.length; i++) {\n const componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\n\nfunction renderComponent(hostLView: LView, componentHostIdx: number) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\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 tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView: TView, lView: LView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.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 the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer 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\nexport function detectChangesInternal<T>(\n tView: TView, lView: LView, context: T, notifyErrorHandler = true) {\n const rendererFactory = lView[RENDERER_FACTORY];\n\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n\n if (!checkNoChangesMode && rendererFactory.begin) rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n } catch (error) {\n if (notifyErrorHandler) {\n handleError(lView, error);\n }\n throw error;\n } finally {\n if (!checkNoChangesMode && rendererFactory.end) rendererFactory.end();\n }\n}\n\nexport function checkNoChangesInternal<T>(\n tView: TView, lView: LView, context: T, notifyErrorHandler = true) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, lView, context, notifyErrorHandler);\n } finally {\n setIsInCheckNoChangesMode(false);\n }\n}\n\nfunction executeViewQueryFn<T>(\n flags: RenderFlags, viewQueryFn: ViewQueriesFunction<T>, component: T): void {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nexport function storePropertyBindingMetadata(\n tData: TData, tNode: TNode, propertyName: string, bindingIndex: number,\n ...interpolationParts: string[]) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\n\nexport function getOrCreateLViewCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = []);\n}\n\nexport function getOrCreateTViewCleanup(tView: TView): any[] {\n return tView.cleanup || (tView.cleanup = []);\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(\n currentDef: DirectiveDef<any>|null, tNode: TNode, lView: LView): Renderer {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index])!;\n }\n return lView[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 tView The current TView\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(\n tView: TView, lView: LView, inputs: PropertyAliasValue, publicName: string, value: any): void {\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++] as number;\n const privateName = inputs[i++] as string;\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n if (def.setInput !== null) {\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 && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {concatStringsWithSpace} from '../../util/stringify';\nimport {assertFirstCreatePass} from '../assert';\nimport {AttributeMarker, TAttributes, TNode} from '../interfaces/node';\nimport {getTView} from '../state';\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nexport function computeStaticStyling(\n tNode: TNode, attrs: TAttributes|null, writeToHost: boolean): void {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles: string|null = writeToHost ? tNode.styles : null;\n let classes: string|null = writeToHost ? tNode.classes : null;\n let mode: AttributeMarker|0 = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == AttributeMarker.Classes) {\n classes = concatStringsWithSpace(classes, value as string);\n } else if (mode == AttributeMarker.Styles) {\n const style = value as string;\n const styleValue = attrs[++i] as string;\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertParentView} from './assert';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET} from './interfaces/container';\nimport {TIcuContainerNode, TNode, TNodeType} from './interfaces/node';\nimport {RNode} from './interfaces/renderer_dom';\nimport {isLContainer} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView, T_HOST, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getProjectionNodes} from './node_manipulation';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {unwrapRNode} from './util/view_utils';\n\n\n\nexport function collectNativeNodes(\n tView: TView, lView: LView, tNode: TNode|null, result: any[],\n isProjection: boolean = false): any[] {\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n const lViewInAContainer = lNode[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(\n lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.ElementContainer) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n } else if (tNodeType & TNodeType.Projection) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW])!;\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n\n return result;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef, ViewRefTracker} from '../linker/view_ref';\nimport {removeFromArray} from '../util/array_utils';\nimport {assertEqual} from '../util/assert';\n\nimport {collectNativeNodes} from './collect_native_nodes';\nimport {checkNoChangesInternal, detectChangesInternal, markViewDirty, storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, VIEW_REFS} from './interfaces/container';\nimport {isLContainer} from './interfaces/type_checks';\nimport {CONTEXT, FLAGS, LView, LViewFlags, PARENT, TVIEW} from './interfaces/view';\nimport {destroyLView, detachView, renderDetachView} from './node_manipulation';\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: ViewRefTracker|null = null;\n private _attachedToViewContainer = false;\n\n get rootNodes(): any[] {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n public _lView: LView,\n\n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n private _cdRefInjectingView?: LView) {}\n\n get context(): T {\n return this._lView[CONTEXT] as unknown as T;\n }\n\n set context(value: T) {\n this._lView[CONTEXT] = value as unknown as {};\n }\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._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS] as ViewRef<unknown>[] | null;\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(\n index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET,\n 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs!, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n\n onDestroy(callback: Function) {\n storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n }\n\n /**\n * Marks a view and all of its ancestors dirty.\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: 'app-root',\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 {\n markViewDirty(this._cdRefInjectingView || this._lView);\n }\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 {\n this._lView[FLAGS] &= ~LViewFlags.Attached;\n }\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: 'app-root',\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 {\n this._lView[FLAGS] |= LViewFlags.Attached;\n }\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 {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context as unknown as {});\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 */\n checkNoChanges(): void {\n if (ngDevMode) {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context as unknown as {});\n }\n }\n\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], this._lView);\n }\n\n attachToAppRef(appRef: ViewRefTracker) {\n if (this._attachedToViewContainer) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n constructor(public _view: LView) {\n super(_view);\n }\n\n override detectChanges(): void {\n const lView = this._view;\n const tView = lView[TVIEW];\n const context = lView[CONTEXT];\n detectChangesInternal(tView, lView, context, false);\n }\n\n override checkNoChanges(): void {\n if (ngDevMode) {\n const lView = this._view;\n const tView = lView[TVIEW];\n const context = lView[CONTEXT];\n checkNoChangesInternal(tView, lView, context, false);\n }\n }\n\n override get context(): T {\n return null!;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as AbstractComponentFactory, ComponentRef as AbstractComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as AbstractComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {createElementRef, ElementRef} from '../linker/element_ref';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {assertDefined, assertGreaterThan, assertIndexInRange} from '../util/assert';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider_flags';\n\nimport {assertComponentType} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {getComponentDef} from './definition';\nimport {getNodeInjectable, NodeInjector} from './di';\nimport {throwProviderNotFoundError} from './errors_di';\nimport {registerPostOrderHooks} from './hooks';\nimport {reportUnknownPropertyError} from './instructions/element_validation';\nimport {addToViewTree, createLView, createTView, executeContentQueries, getOrCreateComponentTView, getOrCreateTNode, initializeDirectives, invokeDirectivesHostBindings, locateHostElement, markAsComponentHost, markDirtyIfOnPush, renderView, setInputsForProperty} from './instructions/shared';\nimport {ComponentDef, DirectiveDef, HostDirectiveDefs} from './interfaces/definition';\nimport {PropertyAliasValue, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType} from './interfaces/node';\nimport {Renderer, RendererFactory} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {CONTEXT, HEADER_OFFSET, LView, LViewFlags, TVIEW, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {createElementNode, setupStaticAttributes, writeDirectClass} from './node_manipulation';\nimport {extractAttrsAndClassesFromSelector, stringifyCSSSelectorList} from './node_selector_matcher';\nimport {enterView, getCurrentTNode, getLView, leaveView} from './state';\nimport {computeStaticStyling} from './styling/static_styling';\nimport {mergeHostAttrs, setUpAttributes} from './util/attrs_utils';\nimport {stringifyForError} from './util/stringify_utils';\nimport {getNativeByTNode, getTNode} from './util/view_utils';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends AbstractComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: NgModuleRef<any>) {\n super();\n }\n\n override resolveComponentFactory<T>(component: Type<T>): AbstractComponentFactory<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\nfunction getNamespace(elementName: string): string|null {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nclass ChainedInjector implements Injector {\n constructor(private injector: Injector, private parentInjector: Injector) {}\n\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags|InjectOptions): T {\n flags = convertToBitFlags(flags);\n const value = this.injector.get<T|typeof NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR>(\n token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === (NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as unknown as T)) {\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 as T;\n }\n\n return this.parentInjector.get(token, notFoundValue, flags);\n }\n}\n\n/**\n * ComponentFactory interface implementation.\n */\nexport class ComponentFactory<T> extends AbstractComponentFactory<T> {\n override selector: string;\n override componentType: Type<any>;\n override ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n override get inputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.inputs);\n }\n\n override 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(private componentDef: ComponentDef<any>, private ngModule?: NgModuleRef<any>) {\n super();\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n\n override create(\n injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n environmentInjector?: NgModuleRef<any>|EnvironmentInjector|\n undefined): AbstractComponentRef<T> {\n environmentInjector = environmentInjector || this.ngModule;\n\n let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?\n environmentInjector :\n environmentInjector?.injector;\n\n if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector = this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||\n realEnvironmentInjector;\n }\n\n const rootViewInjector =\n realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;\n\n const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(\n RuntimeErrorCode.RENDERER_NOT_FOUND,\n ngDevMode &&\n 'Angular was not able to inject a renderer (RendererFactory2). ' +\n 'Likely this is due to a broken DI hierarchy. ' +\n 'Make sure that any injector used to create this component has a correct parent.');\n }\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n const elementName = this.componentDef.selectors[0][0] as string || 'div';\n const hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n createElementNode(hostRenderer, elementName, getNamespace(elementName));\n\n const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(TViewType.Root, null, null, 1, 0, null, null, null, null, null);\n const rootLView = createLView(\n null, rootTView, null, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer,\n rootViewInjector, null);\n\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n\n let component: T;\n let tElementNode: TElementNode;\n\n try {\n const rootComponentDef = this.componentDef;\n let rootDirectives: DirectiveDef<unknown>[];\n let hostDirectiveDefs: HostDirectiveDefs|null = null;\n\n if (rootComponentDef.findHostDirectiveDefs) {\n rootDirectives = [];\n hostDirectiveDefs = new Map();\n rootComponentDef.findHostDirectiveDefs(rootComponentDef, rootDirectives, hostDirectiveDefs);\n rootDirectives.push(rootComponentDef);\n } else {\n rootDirectives = [rootComponentDef];\n }\n\n const hostTNode = createRootComponentTNode(rootLView, hostRNode);\n const componentView = createRootComponentView(\n hostTNode, hostRNode, rootComponentDef, rootDirectives, rootLView, rendererFactory,\n hostRenderer);\n\n tElementNode = getTNode(rootTView, HEADER_OFFSET) as TElementNode;\n\n // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some tests\n // where the renderer is mocked out and `undefined` is returned. We should update the tests so\n // that this check can be removed.\n if (hostRNode) {\n setRootNodeAttributes(hostRenderer, rootComponentDef, hostRNode, rootSelectorOrNode);\n }\n\n if (projectableNodes !== undefined) {\n projectNodes(tElementNode, this.ngContentSelectors, projectableNodes);\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, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView,\n [LifecycleHooksFeature]);\n renderView(rootTView, rootLView, null);\n } finally {\n leaveView();\n }\n\n return new ComponentRef(\n this.componentType, component, createElementRef(tElementNode, rootLView), rootLView,\n tElementNode);\n }\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 AbstractComponentRef<T> {\n override instance: T;\n override hostView: ViewRef<T>;\n override changeDetectorRef: ChangeDetectorRef;\n override componentType: Type<T>;\n\n constructor(\n componentType: Type<T>, instance: T, public location: ElementRef, 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.componentType = componentType;\n }\n\n override setInput(name: string, value: unknown): void {\n const inputData = this._tNode.inputs;\n let dataValue: PropertyAliasValue|undefined;\n if (inputData !== null && (dataValue = inputData[name])) {\n const lView = this._rootLView;\n setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n markDirtyIfOnPush(lView, this._tNode.index);\n } else {\n if (ngDevMode) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message =\n `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${\n name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n\n override destroy(): void {\n this.hostView.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.hostView.onDestroy(callback);\n }\n}\n\n/** Represents a HostFeature function. */\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 throwProviderNotFoundError(token, 'NullInjector');\n }\n};\n\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView: LView, rNode: RNode): TElementNode {\n const tView = lView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, index);\n lView[index] = rNode;\n\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n return getOrCreateTNode(tView, index, TNodeType.Element, '#host', null);\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(\n tNode: TElementNode, rNode: RElement|null, rootComponentDef: ComponentDef<any>,\n rootDirectives: DirectiveDef<any>[], rootView: LView, rendererFactory: RendererFactory,\n hostRenderer: Renderer, sanitizer?: Sanitizer|null): LView {\n const tView = rootView[TVIEW];\n applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer);\n\n const viewRenderer = rendererFactory.createRenderer(rNode, rootComponentDef);\n const componentView = createLView(\n rootView, getOrCreateComponentTView(rootComponentDef), null,\n rootComponentDef.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, rootView[tNode.index],\n tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);\n\n if (tView.firstCreatePass) {\n markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n }\n\n addToViewTree(rootView, componentView);\n\n // Store component view at node index, with node as the HOST\n return rootView[tNode.index] = componentView;\n}\n\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(\n rootDirectives: DirectiveDef<any>[], tNode: TElementNode, rNode: RElement|null,\n hostRenderer: Renderer): void {\n for (const def of rootDirectives) {\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n\n if (rNode !== null) {\n setupStaticAttributes(hostRenderer, rNode, tNode);\n }\n }\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 */\nfunction createRootComponent<T>(\n componentView: LView, rootComponentDef: ComponentDef<T>, rootDirectives: DirectiveDef<any>[],\n hostDirectiveDefs: HostDirectiveDefs|null, rootLView: LView,\n hostFeatures: HostFeature[]|null): any {\n const rootTNode = getCurrentTNode() as TElementNode;\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n const tView = rootLView[TVIEW];\n const native = getNativeByTNode(rootTNode, rootLView);\n\n initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n\n for (let i = 0; i < rootDirectives.length; i++) {\n const directiveIndex = rootTNode.directiveStart + i;\n const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n attachPatchData(directiveInstance, rootLView);\n }\n\n invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n\n if (native) {\n attachPatchData(native, rootLView);\n }\n\n // We're guaranteed for the `componentOffset` to be positive here\n // since a root component always matches a component def.\n ngDevMode &&\n assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n const component = getNodeInjectable(\n rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);\n componentView[CONTEXT] = rootLView[CONTEXT] = component;\n\n if (hostFeatures !== null) {\n for (const feature of hostFeatures) {\n feature(component, rootComponentDef);\n }\n }\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n executeContentQueries(tView, rootTNode, componentView);\n\n return component;\n}\n\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(\n hostRenderer: Renderer2, componentDef: ComponentDef<unknown>, hostRNode: RElement,\n rootSelectorOrNode: any) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n } else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const {attrs, classes} = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n}\n\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(\n tNode: TElementNode, ngContentSelectors: string[], projectableNodes: any[][]) {\n const projection: (TNode|RNode[]|null)[] = tNode.projection = [];\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\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 // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\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, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nexport function LifecycleHooksFeature(): void {\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(getLView()[TVIEW], tNode);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type, Writable} from '../../interface/type';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {fillProperties} from '../../util/property';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {TAttributes} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nexport function getSuperType(type: Type<any>): Type<any>&\n {ɵcmp?: ComponentDef<any>, ɵdir?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\ntype WritableDef = Writable<DirectiveDef<any>|ComponentDef<any>>;\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 let shouldInheritFields = true;\n const inheritanceChain: WritableDef[] = [definition];\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.ɵcmp || superType.ɵdir;\n } else {\n if (superType.ɵcmp) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INHERITANCE,\n ngDevMode &&\n `Directives cannot inherit Components. Directive ${\n stringifyForError(definition.type)} is attempting to extend component ${\n stringifyForError(superType)}`);\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\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 const writeableDef = definition as WritableDef;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n\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 // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = (definition as ComponentDef<any>).data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain: WritableDef[]) {\n let hostVars: number = 0;\n let hostAttrs: TAttributes|null = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\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(definition: WritableDef, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\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: WritableDef, superContentQueries: ContentQueriesFunction<any>) {\n const prevContentQueries = definition.contentQueries;\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: WritableDef, superHostBindings: HostBindingsFunction<any>) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf: RenderFlags, ctx: any) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n } else {\n definition.hostBindings = superHostBindings;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {isComponentDef} from '../interfaces/type_checks';\n\nimport {getSuperType} from './inherit_definition_feature';\n\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS: (keyof DirectiveDef<unknown>)[] = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n\n // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n // as inputs, outputs, and host binding functions.\n];\n\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS: Exclude<keyof ComponentDef<unknown>, keyof DirectiveDef<unknown>>[] = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nexport function ɵɵCopyDefinitionFeature(definition: DirectiveDef<any>|ComponentDef<any>): void {\n let superType = getSuperType(definition.type)!;\n\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.ɵcmp!;\n } else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir!;\n }\n\n // Needed because `definition` fields are readonly.\n const defAny = (definition as any);\n\n // Copy over any fields that apply to either directives or components.\n for (const field of COPY_DIRECTIVE_FIELDS) {\n defAny[field] = superDef[field];\n }\n\n if (isComponentDef(superDef)) {\n // Copy over any component-specific fields.\n for (const field of COPY_COMPONENT_FIELDS) {\n defAny[field] = superDef[field];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {resolveForwardRef} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type} from '../../interface/type';\nimport {assertEqual} from '../../util/assert';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {DirectiveDef, HostDirectiveBindingMap, HostDirectiveDef, HostDirectiveDefs} from '../interfaces/definition';\n\n/** Values that can be used to define a host directive through the `HostDirectivesFeature`. */\ntype HostDirectiveConfig = Type<unknown>|{\n directive: Type<unknown>;\n inputs?: string[];\n outputs?: string[];\n};\n\n/**\n * This feature adds the host directives behavior to a directive definition by patching a\n * function onto it. The expectation is that the runtime will invoke the function during\n * directive matching.\n *\n * For example:\n * ```ts\n * class ComponentWithHostDirective {\n * static ɵcmp = defineComponent({\n * type: ComponentWithHostDirective,\n * features: [ɵɵHostDirectivesFeature([\n * SimpleHostDirective,\n * {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},\n * ])]\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveConfig[]|\n (() => HostDirectiveConfig[])) {\n return (definition: DirectiveDef<unknown>) => {\n definition.findHostDirectiveDefs = findHostDirectiveDefs;\n definition.hostDirectives =\n (Array.isArray(rawHostDirectives) ? rawHostDirectives : rawHostDirectives()).map(dir => {\n return typeof dir === 'function' ?\n {directive: resolveForwardRef(dir), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ} :\n {\n directive: resolveForwardRef(dir.directive),\n inputs: bindingArrayToMap(dir.inputs),\n outputs: bindingArrayToMap(dir.outputs)\n };\n });\n };\n}\n\nfunction findHostDirectiveDefs(\n currentDef: DirectiveDef<unknown>, matchedDefs: DirectiveDef<unknown>[],\n hostDirectiveDefs: HostDirectiveDefs): void {\n if (currentDef.hostDirectives !== null) {\n for (const hostDirectiveConfig of currentDef.hostDirectives) {\n const hostDirectiveDef = getDirectiveDef(hostDirectiveConfig.directive)!;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n validateHostDirective(hostDirectiveConfig, hostDirectiveDef, matchedDefs);\n }\n\n // We need to patch the `declaredInputs` so that\n // `ngOnChanges` can map the properties correctly.\n patchDeclaredInputs(hostDirectiveDef.declaredInputs, hostDirectiveConfig.inputs);\n\n // Host directives execute before the host so that its host bindings can be overwritten.\n findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);\n hostDirectiveDefs.set(hostDirectiveDef, hostDirectiveConfig);\n matchedDefs.push(hostDirectiveDef);\n }\n }\n}\n\n/**\n * Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into\n * a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.\n */\nfunction bindingArrayToMap(bindings: string[]|undefined): HostDirectiveBindingMap {\n if (bindings === undefined || bindings.length === 0) {\n return EMPTY_OBJ;\n }\n\n const result: HostDirectiveBindingMap = {};\n\n for (let i = 0; i < bindings.length; i += 2) {\n result[bindings[i]] = bindings[i + 1];\n }\n\n return result;\n}\n\n/**\n * `ngOnChanges` has some leftover legacy ViewEngine behavior where the keys inside the\n * `SimpleChanges` event refer to the *declared* name of the input, not its public name or its\n * minified name. E.g. in `@Input('alias') foo: string`, the name in the `SimpleChanges` object\n * will always be `foo`, and not `alias` or the minified name of `foo` in apps using property\n * minification.\n *\n * This is achieved through the `DirectiveDef.declaredInputs` map that is constructed when the\n * definition is declared. When a property is written to the directive instance, the\n * `NgOnChangesFeature` will try to remap the property name being written to using the\n * `declaredInputs`.\n *\n * Since the host directive input remapping happens during directive matching, `declaredInputs`\n * won't contain the new alias that the input is available under. This function addresses the\n * issue by patching the host directive aliases to the `declaredInputs`. There is *not* a risk of\n * this patching accidentally introducing new inputs to the host directive, because `declaredInputs`\n * is used *only* by the `NgOnChangesFeature` when determining what name is used in the\n * `SimpleChanges` object which won't be reached if an input doesn't exist.\n */\nfunction patchDeclaredInputs(\n declaredInputs: Record<string, string>, exposedInputs: HostDirectiveBindingMap): void {\n for (const publicName in exposedInputs) {\n if (exposedInputs.hasOwnProperty(publicName)) {\n const remappedPublicName = exposedInputs[publicName];\n const privateName = declaredInputs[publicName];\n\n // We *technically* shouldn't be able to hit this case because we can't have multiple\n // inputs on the same property and we have validations against conflicting aliases in\n // `validateMappings`. If we somehow did, it would lead to `ngOnChanges` being invoked\n // with the wrong name so we have a non-user-friendly assertion here just in case.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n declaredInputs.hasOwnProperty(remappedPublicName)) {\n assertEqual(\n declaredInputs[remappedPublicName], declaredInputs[publicName],\n `Conflicting host directive input alias ${publicName}.`);\n }\n\n declaredInputs[remappedPublicName] = privateName;\n }\n }\n}\n\n/**\n * Verifies that the host directive has been configured correctly.\n * @param hostDirectiveConfig Host directive configuration object.\n * @param directiveDef Directive definition of the host directive.\n * @param matchedDefs Directives that have been matched so far.\n */\nfunction validateHostDirective(\n hostDirectiveConfig: HostDirectiveDef<unknown>, directiveDef: DirectiveDef<any>|null,\n matchedDefs: DirectiveDef<unknown>[]): asserts directiveDef is DirectiveDef<unknown> {\n const type = hostDirectiveConfig.directive;\n\n if (directiveDef === null) {\n if (getComponentDef(type) !== null) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_COMPONENT,\n `Host directive ${type.name} cannot be a component.`);\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_UNRESOLVABLE,\n `Could not resolve metadata for host directive ${type.name}. ` +\n `Make sure that the ${type.name} class is annotated with an @Directive decorator.`);\n }\n\n if (!directiveDef.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_NOT_STANDALONE,\n `Host directive ${directiveDef.type.name} must be standalone.`);\n }\n\n if (matchedDefs.indexOf(directiveDef) > -1) {\n throw new RuntimeError(\n RuntimeErrorCode.DUPLICATE_DIRECTITVE,\n `Directive ${directiveDef.type.name} matches multiple times on the same element. ` +\n `Directives can only match an element once.`);\n }\n\n validateMappings('input', directiveDef, hostDirectiveConfig.inputs);\n validateMappings('output', directiveDef, hostDirectiveConfig.outputs);\n}\n\n/**\n * Checks that the host directive inputs/outputs configuration is valid.\n * @param bindingType Kind of binding that is being validated. Used in the error message.\n * @param def Definition of the host directive that is being validated against.\n * @param hostDirectiveBindings Host directive mapping object that shold be validated.\n */\nfunction validateMappings(\n bindingType: 'input'|'output', def: DirectiveDef<unknown>,\n hostDirectiveBindings: HostDirectiveBindingMap) {\n const className = def.type.name;\n const bindings: Record<string, string> = bindingType === 'input' ? def.inputs : def.outputs;\n\n for (const publicName in hostDirectiveBindings) {\n if (hostDirectiveBindings.hasOwnProperty(publicName)) {\n if (!bindings.hasOwnProperty(publicName)) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_UNDEFINED_BINDING,\n `Directive ${className} does not have an ${bindingType} with a public name of ${\n publicName}.`);\n }\n\n const remappedPublicName = hostDirectiveBindings[publicName];\n\n if (bindings.hasOwnProperty(remappedPublicName) &&\n bindings[remappedPublicName] !== publicName) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_DIRECTIVE_CONFLICTING_ALIAS,\n `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${\n remappedPublicName}, because it already has a different ${\n bindingType} with the same public name.`);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getSymbolIterator} from './symbol';\n\n\nexport function isIterable(obj: any): obj is Iterable<any> {\n return obj !== null && typeof obj === 'object' && (obj as any)[getSymbolIterator()] !== undefined;\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {areIterablesEqual, isListLikeIterable} from './iterable';\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 Object.is(a, b);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {devModeEqual} from '../util/comparison';\n\nimport {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {isInCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\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 && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\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 const oldValue = lView[bindingIndex];\n\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\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 const details =\n getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(\n oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {elementAttributeInternal, storePropertyBindingMetadata} 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): typeof ɵɵattribute {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {LView} from '../interfaces/view';\nimport {getBindingIndex, incrementBindingIndex, nextBindingIndex, setBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/stringify_utils';\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 */\nexport function interpolationV(lView: LView, 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 let bindingIndex = getBindingIndex();\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 setBindingIndex(bindingIndex);\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 */\nexport function interpolation1(lView: LView, prefix: string, v0: any, suffix: string): string|\n NO_CHANGE {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\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 */\nexport function interpolation3(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\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 */\nexport function interpolation4(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n lView: LView, 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): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\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 */\nexport function interpolation7(\n lView: LView, 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): string|\n NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n lView: LView, 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): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementAttributeInternal, storePropertyBindingMetadata} 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): typeof ɵɵattributeInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\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): typeof ɵɵattributeInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\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): typeof ɵɵattributeInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1,\n suffix);\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,\n namespace?: string): typeof ɵɵattributeInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2,\n suffix);\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): typeof ɵɵattributeInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2,\n i3, suffix);\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): typeof ɵɵattributeInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2,\n i3, i4, suffix);\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): typeof ɵɵattributeInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2,\n i3, i4, i5, suffix);\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): typeof ɵɵattributeInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2,\n i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\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 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): typeof ɵɵattributeInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName,\n getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n }\n }\n return ɵɵattributeInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {TVIEW} from '../interfaces/view';\n\nimport {detectChangesInternal} 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.\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges(component: {}): void {\n const view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertFirstCreatePass} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNodeType} from '../interfaces/node';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView, TViewType} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {getLView, getTView, setCurrentTNode} from '../state';\nimport {getConstant} from '../util/view_utils';\nimport {addToViewTree, createDirectivesInstances, createLContainer, createTView, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\n\nfunction templateFirstCreatePass(\n index: number, tView: TView, lView: LView, templateFn: ComponentTemplate<any>|null,\n decls: number, vars: number, tagName?: string|null, attrsIndex?: number|null,\n localRefsIndex?: number|null): TContainerNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(\n tView, index, TNodeType.Container, tagName || null,\n getConstant<TAttributes>(tViewConsts, attrsIndex));\n\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n\n const embeddedTView = tNode.tViews = createTView(\n TViewType.Embedded, tNode, templateFn, decls, vars, tView.directiveRegistry,\n tView.pipeRegistry, null, tView.schemas, tViewConsts);\n\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n\n return tNode;\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 decls 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 attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\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, decls: number, vars: number,\n tagName?: string|null, attrsIndex?: number|null, localRefsIndex?: number|null,\n localRefExtractor?: LocalRefExtractor) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n const tNode = tView.firstCreatePass ? templateFirstCreatePass(\n adjustedIndex, tView, lView, templateFn, decls, vars,\n tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TContainerNode;\n setCurrentTNode(tNode, false);\n\n const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getContextLView} from '../state';\nimport {load} from '../util/view_utils';\n\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(tView: TView, lView: LView, index: number, value: T): void {\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 if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = 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 load<T>(contextLView, HEADER_OFFSET + index);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {TNode} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {LView, RENDERER, TView} from '../interfaces/view';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {elementPropertyInternal, setInputsForProperty, storePropertyBindingMetadata} 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 * @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): typeof ɵɵproperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nexport function setDirectiveInputsWhichShadowsStyling(\n tView: TView, tNode: TNode, lView: LView, value: any, isClassBased: boolean) {\n const inputs = tNode.inputs!;\n const property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertFirstCreatePass, assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {hasClassInput, hasStyleInput, TAttributes, TElementNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild, createElementNode, setupStaticAttributes} from '../node_manipulation';\nimport {decreaseElementDepthCount, getBindingIndex, getCurrentTNode, getElementDepthCount, getLView, getNamespace, getTView, increaseElementDepthCount, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {validateElementIsKnown} from './element_validation';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\nfunction elementStartFirstCreatePass(\n index: number, tView: TView, lView: LView, native: RElement, name: string,\n attrsIndex?: number|null, localRefsIndex?: number): TElementNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.Element, name, attrs);\n\n const hasDirectives =\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n if (ngDevMode) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\n\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\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 attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\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, attrsIndex?: number|null,\n localRefsIndex?: number): typeof ɵɵelementStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const renderer = lView[RENDERER];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n const tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(\n adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementNode;\n setCurrentTNode(tNode, true);\n setupStaticAttributes(renderer, native, tNode);\n\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\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\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementStart;\n}\n\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): typeof ɵɵelementEnd {\n let currentTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n\n\n decreaseElementDepthCount();\n\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n return ɵɵelementEnd;\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 attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number, name: string, attrsIndex?: number|null,\n localRefsIndex?: number): typeof ɵɵelement {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TElementContainerNode, TNodeType} from '../interfaces/node';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {getBindingIndex, getCurrentTNode, getLView, getTView, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\nfunction elementContainerStartFirstCreatePass(\n index: number, tView: TView, lView: LView, attrsIndex?: number|null,\n localRefsIndex?: number): TElementContainerNode {\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.ElementContainer, 'ng-container', attrs);\n\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 if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n\n const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\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 attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\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, attrsIndex?: number|null,\n localRefsIndex?: number): typeof ɵɵelementContainerStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'element containers should be created before any bindings');\n\n const tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(\n adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementContainerNode;\n setCurrentTNode(tNode, true);\n\n ngDevMode && ngDevMode.rendererCreateComment++;\n const native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n\n return ɵɵelementContainerStart;\n}\n\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd {\n let currentTNode = getCurrentTNode()!;\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n ngDevMode && assertTNodeType(currentTNode, TNodeType.ElementContainer);\n\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n return ɵɵelementContainerEnd;\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainer(\n index: number, attrsIndex?: number|null, localRefsIndex?: number): typeof ɵɵelementContainer {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n return ɵɵelementContainer;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, Subscribable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise<T = any>(obj: any): obj is Promise<T> {\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 a Subscribable\n */\nexport function isSubscribable(obj: any|Subscribable<any>): obj is Subscribable<any> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nexport const isObservable =\n isSubscribable as ((obj: any|Observable<any>) => obj is Observable<any>);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {assertIndexInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {PropertyAliasValue, TNode, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {getCurrentDirectiveDef, getCurrentTNode, getLView, getTView} from '../state';\nimport {getComponentLViewByIndex, getNativeByTNode, unwrapRNode} from '../util/view_utils';\n\nimport {getOrCreateLViewCleanup, getOrCreateTViewCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n\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 - this argument is a reminder\n * from the Renderer3 infrastructure and should be removed from the instruction arguments\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?: boolean,\n eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener {\n const lView = getLView<{}|null>();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(\n tView, lView, lView[RENDERER], tNode, eventName, listenerFn, eventTargetResolver);\n return ɵɵlistener;\n}\n\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\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 ɵɵsyntheticHostListener(\n eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener {\n const tNode = getCurrentTNode()!;\n const lView = getLView<{}|null>();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n return ɵɵsyntheticHostListener;\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 tView: TView, lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\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 tView: TView, lView: LView<{}|null>, renderer: Renderer, tNode: TNode, eventName: string,\n listenerFn: (e?: any) => any, eventTargetResolver?: GlobalTargetResolver): void {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup: false|any[] = firstCreatePass && getOrCreateTViewCleanup(tView);\n const context = lView[CONTEXT];\n\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n let processOutputs = true;\n\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if ((tNode.type & TNodeType.AnyRNode) || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) :\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\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 && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = (<any>existingListener).__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n (<any>existingListener).__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(target as RElement, 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 // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n }\n\n // subscribe to directive outputs\n const outputs = tNode.outputs;\n let props: PropertyAliasValue|undefined;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n for (let i = 0; i < propsLength; i += 2) {\n const index = props[i] as number;\n ngDevMode && assertIndexInRange(lView, index);\n const minifiedName = props[i + 1];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isObservable(output)) {\n throw new Error(`@Output ${minifiedName} not initialized in '${\n 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, context: {}|null, listenerFn: (e?: any) => any, e: any): boolean {\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\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 } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\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<{}|null>, context: {}|null, 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: any) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n\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.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;\n markViewDirty(startView);\n\n let result = executeListenerWithErrorHandling(lView, context, 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, context, 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {newArray} from '../../util/array_utils';\nimport {TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {applyProjection} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, getTView, setCurrentTNodeAsNotParent} from '../state';\nimport {getOrCreateTNode} from './shared';\n\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 = getLView()[DECLARATION_COMPONENT_VIEW][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 newArray(numProjectionSlots, null! as TNode);\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\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 tView = getTView();\n const tProjectionNode =\n getOrCreateTNode(tView, HEADER_OFFSET + 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 setCurrentTNodeAsNotParent();\n\n if ((tProjectionNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementPropertyInternal, storePropertyBindingMetadata} 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): typeof ɵɵpropertyInterpolate {\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): typeof ɵɵpropertyInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\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): typeof ɵɵpropertyInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\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): typeof ɵɵpropertyInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\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): typeof ɵɵpropertyInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\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,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\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): typeof ɵɵpropertyInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\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): typeof ɵɵpropertyInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5,\n suffix);\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): typeof ɵɵpropertyInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6,\n suffix);\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\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 collection of values and the strings in between 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): typeof ɵɵpropertyInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween);\n }\n }\n return ɵɵpropertyInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {KeyValueArray} from '../../util/array_utils';\nimport {assertNumber, assertNumberInRange} from '../../util/assert';\n\n/**\n * Value stored in the `TData` which is needed to re-concatenate the styling.\n *\n * See: `TStylingKeyPrimitive` and `TStylingStatic`\n */\nexport type TStylingKey = TStylingKeyPrimitive|TStylingStatic;\n\n\n/**\n * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is\n * needed to re-concatenate the styling.\n *\n * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.\n * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.\n * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction\n * is combined with directive which shadows its input `@Input('class')`. That way the binding\n * should not participate in the styling resolution.\n */\nexport type TStylingKeyPrimitive = string|null|false;\n\n/**\n * Store the static values for the styling binding.\n *\n * The `TStylingStatic` is just `KeyValueArray` where key `\"\"` (stored at location 0) contains the\n * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the\n * `\"\"` contains the wrapped value.\n *\n * When instructions are resolving styling they may need to look forward or backwards in the linked\n * list to resolve the value. For this reason we have to make sure that he linked list also contains\n * the static values. However the list only has space for one item per styling instruction. For this\n * reason we store the static values here as part of the `TStylingKey`. This means that the\n * resolution function when looking for a value needs to first look at the binding value, and than\n * at `TStylingKey` (if it exists).\n *\n * Imagine we have:\n *\n * ```\n * <div class=\"TEMPLATE\" my-dir>\n *\n * @Directive({\n * host: {\n * class: 'DIR',\n * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case the linked list will contain one item:\n *\n * ```\n * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`\n * tData[10] = <TStylingStatic>[\n * '': 'dynamic', // This is the wrapped value of `TStylingKey`\n * 'DIR': true, // This is the default static value of directive binding.\n * ];\n * tData[10 + 1] = 0; // We don't have prev/next.\n *\n * lView[10] = undefined; // assume `ctx.exp` is `undefined`\n * lView[10 + 1] = undefined; // Just normalized `lView[10]`\n * ```\n *\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into the static `TStylingStatic` too see if there is a default value for\n * `dynamic` (there is not). Therefore it is safe to remove it.\n *\n * If setting `true` case:\n * ```\n * lView[10] = true; // assume `ctx.exp` is `true`\n * lView[10 + 1] = true; // Just normalized `lView[10]`\n * ```\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains\n * ```\n * tNode.residualClass = [\n * 'TEMPLATE': true,\n * ];\n * ```\n *\n * This means that it is safe to add class.\n */\nexport interface TStylingStatic extends KeyValueArray<any> {}\n\n/**\n * This is a branded number which contains previous and next index.\n *\n * When we come across styling instructions we need to store the `TStylingKey` in the correct\n * order so that we can re-concatenate the styling value in the desired priority.\n *\n * The insertion can happen either at the:\n * - end of template as in the case of coming across additional styling instruction in the template\n * - in front of the template in the case of coming across additional instruction in the\n * `hostBindings`.\n *\n * We use `TStylingRange` to store the previous and next index into the `TData` where the template\n * bindings can be found.\n *\n * - bit 0 is used to mark that the previous index has a duplicate for current value.\n * - bit 1 is used to mark that the next index has a duplicate for the current value.\n * - bits 2-16 are used to encode the next/tail of the template.\n * - bits 17-32 are used to encode the previous/head of template.\n *\n * NODE: *duplicate* false implies that it is statically known that this binding will not collide\n * with other bindings and therefore there is no need to check other bindings. For example the\n * bindings in `<div [style.color]=\"exp\" [style.width]=\"exp\">` will never collide and will have\n * their bits set accordingly. Previous duplicate means that we may need to check previous if the\n * current binding is `null`. Next duplicate means that we may need to check next bindings if the\n * current binding is not `null`.\n *\n * NOTE: `0` has special significance and represents `null` as in no additional pointer.\n */\nexport interface TStylingRange {\n __brand__: 'TStylingRange';\n}\n\n/**\n * Shift and masks constants for encoding two numbers into and duplicate info into a single number.\n */\nexport const enum StylingRange {\n /// Number of bits to shift for the previous pointer\n PREV_SHIFT = 17,\n /// Previous pointer mask.\n PREV_MASK = 0xFFFE0000,\n\n /// Number of bits to shift for the next pointer\n NEXT_SHIFT = 2,\n /// Next pointer mask.\n NEXT_MASK = 0x001FFFC,\n\n // Mask to remove negative bit. (interpret number as positive)\n UNSIGNED_MASK = 0x7FFF,\n\n /**\n * This bit is set if the previous bindings contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `width` binding will\n * have previous duplicate set. The implication is that if `width` binding becomes `null`, it is\n * necessary to defer the value to `map.width`. (Because `width` overwrites `map.width`.)\n */\n PREV_DUPLICATE = 0x02,\n\n /**\n * This bit is set to if the next binding contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `map` binding will\n * have next duplicate set. The implication is that if `map.width` binding becomes not `null`, it\n * is necessary to defer the value to `width`. (Because `width` overwrites `map.width`.)\n */\n NEXT_DUPLICATE = 0x01,\n}\n\n\nexport function toTStylingRange(prev: number, next: number): TStylingRange {\n ngDevMode && assertNumberInRange(prev, 0, StylingRange.UNSIGNED_MASK);\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (prev << StylingRange.PREV_SHIFT | next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangePrev(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) >> StylingRange.PREV_SHIFT) & StylingRange.UNSIGNED_MASK;\n}\n\nexport function getTStylingRangePrevDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.PREV_DUPLICATE) ==\n StylingRange.PREV_DUPLICATE;\n}\n\nexport function setTStylingRangePrev(\n tStylingRange: TStylingRange, previous: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.PREV_MASK) |\n (previous << StylingRange.PREV_SHIFT)) as any;\n}\n\nexport function setTStylingRangePrevDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.PREV_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeNext(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_MASK) >> StylingRange.NEXT_SHIFT;\n}\n\nexport function setTStylingRangeNext(tStylingRange: TStylingRange, next: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.NEXT_MASK) | //\n next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangeNextDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_DUPLICATE) ===\n StylingRange.NEXT_DUPLICATE;\n}\n\nexport function setTStylingRangeNextDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.NEXT_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeTail(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {KeyValueArray, keyValueArrayIndexOf} from '../../util/array_utils';\nimport {assertEqual, assertIndexInRange, assertNotEqual} from '../../util/assert';\nimport {assertFirstUpdatePass} from '../assert';\nimport {TNode} from '../interfaces/node';\nimport {getTStylingRangeNext, getTStylingRangePrev, setTStylingRangeNext, setTStylingRangeNextDuplicate, setTStylingRangePrev, setTStylingRangePrevDuplicate, toTStylingRange, TStylingKey, TStylingKeyPrimitive, TStylingRange} from '../interfaces/styling';\nimport {TData} from '../interfaces/view';\nimport {getTView} from '../state';\n\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__: undefined;\n\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nexport function insertTStylingBinding(\n tData: TData, tNode: TNode, tStylingKeyWithStatic: TStylingKey, index: number,\n isHostBinding: boolean, isClassBinding: boolean): void {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey: TStylingKeyPrimitive;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic as KeyValueArray<any>;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey as string) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n } else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1] as TStylingRange);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1] as TStylingRange, index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1] as TStylingRange, index);\n } else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1] as TStylingRange, index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n } else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(\n tmplHead !== 0 && tmplTail === 0, false,\n 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n } else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1] as TStylingRange, index);\n }\n tmplTail = index;\n }\n\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1] as TStylingRange);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n } else {\n tNode.styleBindings = tBindings;\n }\n}\n\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(\n tNode: TNode, tStylingKey: TStylingKey, tData: TData, index: number, isClassBinding: boolean) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1] as TStylingRange);\n }\n}\n\n\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(\n tData: TData, tStylingKey: TStylingKeyPrimitive, index: number, isPrevDir: boolean,\n isClassBinding: boolean) {\n const tStylingAtIndex = tData[index + 1] as TStylingRange;\n const isMap = tStylingKey === null;\n let cursor =\n isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor] as TStylingKey;\n const tStyleRangeAtCursor = tData[cursor + 1] as TStylingRange;\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor: TStylingKey, tStylingKey: TStylingKeyPrimitive) {\n ngDevMode &&\n assertNotEqual(\n Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (\n tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, throwError} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Stores the locations of key/value indexes while parsing styling.\n *\n * In case of `cssText` parsing the indexes are like so:\n * ```\n * \"key1: value1; key2: value2; key3: value3\"\n * ^ ^ ^ ^ ^\n * | | | | +-- textEnd\n * | | | +---------------- valueEnd\n * | | +---------------------- value\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n *\n * In case of `className` parsing the indexes are like so:\n * ```\n * \"key1 key2 key3\"\n * ^ ^ ^\n * | | +-- textEnd\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n * NOTE: `value` and `valueEnd` are used only for styles, not classes.\n */\ninterface ParserState {\n textEnd: number;\n key: number;\n keyEnd: number;\n value: number;\n valueEnd: number;\n}\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState: ParserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedKey(text: string): string {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedValue(text: string): string {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassName(text: string): number {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassNameNext(text: string, index: number): number {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n}\n\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyle(text: string): number {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyleNext(text: string, startIndex: number): number {\n const end = parserState.textEnd;\n let index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, CharCode.COLON);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, CharCode.SEMI_COLON);\n}\n\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nexport function resetParserState(text: string): void {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nexport function consumeWhitespace(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nexport function consumeClassToken(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nexport function consumeStyleKey(text: string, startIndex: number, endIndex: number): number {\n let ch: number;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === CharCode.DASH || ch === CharCode.UNDERSCORE ||\n ((ch & CharCode.UPPER_CASE) >= CharCode.A && (ch & CharCode.UPPER_CASE) <= CharCode.Z) ||\n (ch >= CharCode.ZERO && ch <= CharCode.NINE))) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nexport function consumeSeparator(\n text: string, startIndex: number, endIndex: number, separator: number): number {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n\n\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nexport function consumeStyleValue(text: string, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch: number = text.charCodeAt(i++);\n if (ch === CharCode.SEMI_COLON) {\n return lastChIndex;\n } else if (ch === CharCode.DOUBLE_QUOTE || ch === CharCode.SINGLE_QUOTE) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n } else if (\n startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === CharCode.U &&\n ch2 === CharCode.R && ch1 === CharCode.L && ch === CharCode.OPEN_PAREN) {\n lastChIndex = i = consumeQuotedText(text, CharCode.CLOSE_PAREN, i, endIndex);\n } else if (ch > CharCode.SPACE) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & CharCode.UPPER_CASE;\n }\n return lastChIndex;\n}\n\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nexport function consumeQuotedText(\n text: string, quoteCharCode: number, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== CharCode.BACK_SLASH) {\n return index;\n }\n if (ch == CharCode.BACK_SLASH && ch1 === CharCode.BACK_SLASH) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n } else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n}\n\nfunction malformedStyleError(text: string, expecting: string, index: number): never {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\n `Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +\n `'. Expecting '${expecting}'.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SafeValue, unwrapSafeValue} from '../../sanitization/bypass';\nimport {KeyValueArray, keyValueArrayGet, keyValueArraySet} from '../../util/array_utils';\nimport {assertDefined, assertEqual, assertLessThan, assertNotEqual, throwError} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {concatStringsWithSpace, stringify} from '../../util/stringify';\nimport {assertFirstUpdatePass} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {AttributeMarker, TAttributes, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {getTStylingRangeNext, getTStylingRangeNextDuplicate, getTStylingRangePrev, getTStylingRangePrevDuplicate, TStylingKey, TStylingRange} from '../interfaces/styling';\nimport {LView, RENDERER, TData, TView} from '../interfaces/view';\nimport {applyStyling} from '../node_manipulation';\nimport {getCurrentDirectiveDef, getLView, getSelectedIndex, getTView, incrementBindingIndex} from '../state';\nimport {insertTStylingBinding} from '../styling/style_binding_list';\nimport {getLastParsedKey, getLastParsedValue, parseClassName, parseClassNameNext, parseStyle, parseStyleNext} from '../styling/styling_parser';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\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 prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\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 function.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n prop: string, value: string|number|SafeValue|undefined|null,\n suffix?: string|null): typeof ɵɵstyleProp {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\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 prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\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 function.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(className: string, value: boolean|undefined|null): typeof ɵɵclassProp {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\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}|string|undefined|null): void {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n\n\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function styleStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\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: {[className: string]: boolean|undefined|null}|string|undefined|\n null): void {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function classStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingProperty(\n prop: string, value: any|NO_CHANGE, suffix: string|undefined|null,\n isClassBased: boolean): void {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()] as TNode;\n updateStyling(\n tView, tNode, lView, lView[RENDERER], prop,\n lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n}\n\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingMap(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: any|NO_CHANGE, isClassBased: boolean): void {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()] as TNode;\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(\n Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false,\n 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(\n staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n } else {\n updateStylingMap(\n tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1],\n lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value),\n isClassBased, bindingIndex);\n }\n }\n}\n\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView: TView, bindingIndex: number): boolean {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(\n tView: TView, tStylingKey: TStylingKey, bindingIndex: number, isClassBased: boolean): void {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()] as TNode;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function wrapInStaticStylingKey(\n tData: TData, tNode: TNode, stylingKey: TStylingKey, isClassBased: boolean): TStylingKey {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate =\n (isClassBased ? tNode.classBindings : tNode.styleBindings) as any as number === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n } else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding =\n directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(\n null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */,\n isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n } else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData: TData, tNode: TNode, isClassBased: boolean): TStylingKey|\n undefined {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)] as TStylingKey;\n}\n\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(\n tData: TData, tNode: TNode, isClassBased: boolean, tStylingKey: TStylingKey): void {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(\n getTStylingRangeNext(bindings), 0,\n 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData: TData, tNode: TNode, isClassBased: boolean): KeyValueArray<any>|\n null {\n let residual: KeyValueArray<any>|null|undefined = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(\n tNode.directiveStylingLast, -1,\n 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = (tData[i] as DirectiveDef<any>).hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any>| null;\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any>| null;\n}\n\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(\n hostDirectiveDef: DirectiveDef<any>|null, tData: TData, tNode: TNode, stylingKey: TStylingKey,\n isClassBased: boolean): TStylingKey {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective: DirectiveDef<any>|null = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n } else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast] as DirectiveDef<any>;\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef) break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(\n stylingKey: TStylingKey|undefined, attrs: TAttributes|null,\n isClassBased: boolean): TStylingKey {\n const desiredMarker = isClassBased ? AttributeMarker.Classes : AttributeMarker.Styles;\n let currentMarker = AttributeMarker.ImplicitAttributes;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i] as number | string;\n if (typeof item === 'number') {\n currentMarker = item;\n } else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey] as any;\n }\n keyValueArraySet(\n stylingKey as KeyValueArray<any>, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nexport function toStylingKeyValueArray(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: string|string[]|{[key: string]: any}|SafeValue|null|undefined): KeyValueArray<any> {\n if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY as any;\n const styleKeyValueArray: KeyValueArray<any> = [] as any;\n const unwrappedValue = unwrapSafeValue(value) as string | string[] | {[key: string]: any};\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n } else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n } else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n } else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function styleKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: string, value: any) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer,\n oldKeyValueArray: KeyValueArray<any>, newKeyValueArray: KeyValueArray<any>,\n isClassBased: boolean, bindingIndex: number) {\n if (oldKeyValueArray as KeyValueArray<any>| NO_CHANGE === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY as any;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey: string|null = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey: string|null = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue =\n oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue =\n newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey: string|null = null;\n let setValue: any = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n } else if (newKey === null || oldKey !== null && oldKey < newKey!) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n } else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer, prop: string,\n value: string|undefined|null|boolean, isClassBased: boolean, bindingIndex: number) {\n if (!(tNode.type & TNodeType.AnyRNode)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1] as TStylingRange;\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView) as RElement;\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(\n tData: TData, tNode: TNode|null, lView: LView, prop: string, index: number,\n isClassBased: boolean): any {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value: any = undefined;\n while (index > 0) {\n const rawKey = tData[index] as TStylingKey;\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? (rawKey as string[])[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n (key === prop ? valueAtLViewIndex : undefined);\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey as KeyValueArray<any>, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1] as TStylingRange;\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual!, prop);\n }\n }\n return value;\n}\n\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value: any): boolean {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value: any, suffix: string|undefined|null): string|null|undefined|boolean {\n if (value == null /** || value === undefined */) {\n // do nothing\n } else if (typeof suffix === 'string') {\n value = value + suffix;\n } else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n\n\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function hasStylingInputShadow(tNode: TNode, isClassBased: boolean) {\n return (tNode.flags & (isClassBased ? TNodeFlags.hasClassInput : TNodeFlags.hasStyleInput)) !== 0;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, RENDERER, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getBindingIndex, getLView, getTView, setCurrentTNode} from '../state';\n\nimport {getOrCreateTNode} 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 Static string value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value: string = ''): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'text nodes should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null) :\n tView.data[adjustedIndex] as TElementNode;\n\n const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n appendChild(tView, lView, textNative, tNode);\n\n // Text nodes are self closing.\n setCurrentTNode(tNode, false);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {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): typeof ɵɵtextInterpolate {\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(\n prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1 {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate2 {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate3 {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate4 {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate5 {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate6 {\n const lView = getLView();\n const interpolated =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate7 {\n const lView = getLView();\n const interpolated =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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): typeof ɵɵtextInterpolate8 {\n const lView = getLView();\n const interpolated = interpolation8(\n lView, 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, getSelectedIndex(), 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 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[]): typeof ɵɵtextInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {keyValueArraySet} from '../../util/array_utils';\nimport {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingMap, classStringParser} from './styling';\n\n\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate6(\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): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate7(\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): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate8(\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): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The 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 * @codeGenApi\n */\nexport function ɵɵclassMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {ɵɵstyleMap} from './styling';\n\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate6(\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): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate7(\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): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate8(\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): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The 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, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLView,} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingProperty} from './styling';\n\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate1(\n prop: string, prefix: string, v0: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate2(\n prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate3(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate4(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate5(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate6(\n prop: 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 valueSuffix?: string|null): typeof ɵɵstylePropInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate7(\n prop: 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 valueSuffix?: string|null): typeof ɵɵstylePropInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate8(\n prop: 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, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\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 values The 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolateV(\n prop: string, values: any[], valueSuffix?: string|null): typeof ɵɵstylePropInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {elementPropertyInternal, loadComponentRenderer, storePropertyBindingMetadata} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\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 * @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 ɵɵhostProperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn|null): typeof ɵɵhostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\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 *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostProperty<T>(\n propName: string, value: T|NO_CHANGE,\n sanitizer?: SanitizerFn|null): typeof ɵɵsyntheticHostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\n\nfunction plural(val: number): number {\nconst n = val, i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\\.?/, '').length;\n\nif (i === 1 && v === 0)\n return 1;\nreturn 5;\n}\n\nexport default [\"en\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"]],u,[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]],u,[[\"B\",\"A\"],[\"BC\",\"AD\"],[\"Before Christ\",\"Anno Domini\"]],0,[6,0],[\"M/d/yy\",\"MMM d, y\",\"MMMM d, y\",\"EEEE, MMMM d, y\"],[\"h:mm a\",\"h:mm:ss a\",\"h:mm:ss a z\",\"h:mm:ss a zzzz\"],[\"{1}, {0}\",u,\"{1} 'at' {0}\",u],[\".\",\",\",\";\",\"%\",\"+\",\"-\",\"E\",\"×\",\"‰\",\"∞\",\"NaN\",\":\"],[\"#,##0.###\",\"#,##0%\",\"¤#,##0.00\",\"#E0\"],\"USD\",\"$\",\"US Dollar\",{},\"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {global} from '../util/global';\n\nimport localeEn from './locale_en';\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nexport function registerLocaleData(data: any, localeId?: string|any, extraData?: any): void {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n LOCALE_DATA[localeId] = data;\n\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\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-overview)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = normalizeLocale(locale);\n\n let match = getLocaleData(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 = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_LOCALE_DATA,\n ngDevMode && `Missing locale data for the locale \"${locale}\".`);\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nexport function getLocaleCurrencyCode(locale: string): string|null {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\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-overview)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n\n\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nexport function getLocaleData(normalizedLocale: string): any {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = global.ng && global.ng.common && global.ng.common.locales &&\n global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nexport function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\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 CurrencyCode,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n Directionality,\n PluralCase,\n ExtraData\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n ExtraDayPeriodFormats = 0,\n ExtraDayPeriodStandalone,\n ExtraDayPeriodsRules\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {\n Symbol = 0,\n SymbolNarrow,\n NbOfDigits\n}\n\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale: string): string {\n return locale.toLowerCase().replace(/_/g, '-');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLocalePluralCase} from './locale_data_api';\n\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: string, locale: string): string {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nexport const USD_CURRENCY_CODE = 'USD';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SanitizerFn} from './sanitization';\n\n\n/**\n * Stores a list of nodes which need to be removed.\n *\n * Numbers are indexes into the `LView`\n * - index > 0: `removeRNode(lView[0])`\n * - index < 0: `removeICU(~lView[0])`\n */\nexport interface I18nRemoveOpCodes extends Array<number> {\n __brand__: 'I18nRemoveOpCodes';\n}\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes are efficient operations which can be applied to the DOM to update it. (For example to\n * update to a new ICU case requires that we clean up previous elements and create new ones.)\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset. (p)\n * 2) Reference node index offset. (r)\n * 3) The instruction to execute. (i)\n *\n * pppp pppp pppp pppp rrrr rrrr rrrr riii\n * 3322 2222 2222 1111 1111 1110 0000 0000\n * 1098 7654 3210 9876 5432 1098 7654 3210\n *\n * ```\n * var parent = lView[opCode >>> SHIFT_PARENT];\n * var refNode = lView[((opCode & MASK_REF) >>> SHIFT_REF)];\n * var instruction = opCode & MASK_OPCODE;\n * ```\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nexport const enum IcuCreateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 1,\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_INSTRUCTION = 0b1,\n\n /**\n * Mask for the Reference node (bits 16-3)\n */\n MASK_REF = 0b11111111111111110,\n // 11111110000000000\n // 65432109876543210\n\n /**\n * Instruction to append the current node to `PARENT`.\n */\n AppendChild = 0b0,\n\n /**\n * Instruction to set the attribute of a node.\n */\n Attr = 0b1,\n}\n\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 * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));\n * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createElement('div'));\n * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createComment(''));\n * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | 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 | Attr, 'attr', 'value'\n * ];\n * ```\n */\nexport interface IcuCreateOpCodes extends Array<number|string|ELEMENT_MARKER|ICU_MARKER|null>,\n I18nDebug {\n __brand__: 'I18nCreateOpCodes';\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 * Instruction to update a text node.\n */\n Text = 0b00,\n /**\n * Instruction to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * Instruction to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * Instruction to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element'\n};\nexport interface ELEMENT_MARKER {\n marker: 'element';\n}\n\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ICU_MARKER: ICU_MARKER = {\n marker: 'ICU'\n};\n\nexport interface ICU_MARKER {\n marker: 'ICU';\n}\n\nexport interface I18nDebug {\n /**\n * Human readable representation of the OpCode arrays.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: string[];\n}\n\n/**\n * Array storing OpCode for dynamically creating `i18n` translation DOM elements.\n *\n * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists\n * of a pair of `number` and `string` pairs which encode the operations for the creation of the\n * translated block.\n *\n * The number is shifted and encoded according to `I18nCreateOpCode`\n *\n * Pseudocode:\n * ```\n * const i18nCreateOpCodes = [\n * 10 << I18nCreateOpCode.SHIFT, \"Text Node add to DOM\",\n * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, \"Comment Node add to DOM\",\n * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, \"Text Node added later\"\n * ];\n *\n * for(var i=0; i<i18nCreateOpCodes.length; i++) {\n * const opcode = i18NCreateOpCodes[i++];\n * const index = opcode >> I18nCreateOpCode.SHIFT;\n * const text = i18NCreateOpCodes[i];\n * let node: Text|Comment;\n * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {\n * node = lView[~index] = document.createComment(text);\n * } else {\n * node = lView[index] = document.createText(text);\n * }\n * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {\n * parentNode.appendChild(node);\n * }\n * }\n * ```\n */\nexport interface I18nCreateOpCodes extends Array<number|string>, I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\n/**\n * See `I18nCreateOpCodes`\n */\nexport enum I18nCreateOpCode {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n SHIFT = 2,\n\n /**\n * Should the node be appended to parent immediately after creation.\n */\n APPEND_EAGERLY = 0b01,\n\n /**\n * If set the node should be comment (rather than a text) node.\n */\n COMMENT = 0b10,\n}\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 * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings\n * the code still works, but with lower efficiency. (it is unlikely that a translation would have\n * more than 32 bindings.)\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(ctx.exp1); // If changed set mask bit 1\n * i18nExp(ctx.exp2); // If changed set mask bit 2\n * i18nExp(ctx.exp3); // If changed set mask bit 3\n * i18nExp(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 `8` values and start processing next OpCodes.\n * 0b11, 8,\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 `2` values and start processing next OpCodes.\n * 0b1000, 2,\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>, I18nDebug {\n __brand__: 'I18nUpdateOpCodes';\n}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\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: I18nCreateOpCodes;\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/**\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 * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`\n */\n anchorIdx: number;\n\n /**\n * Currently selected ICU case pointer.\n *\n * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how\n * to clean up the current case when transitioning no the new case.\n *\n * If the value stored is:\n * `null`: No current case selected.\n * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed\n * regardless of the `mask`. (After the execution the flag is cleared)\n * `>=0` A currently selected case index.\n */\n currentCaseLViewIndex: 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: IcuCreateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nRemoveOpCodes[];\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/**\n * Parsed ICU expression\n */\nexport interface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string|IcuExpression)[][];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DEFAULT_LOCALE_ID} from '../../i18n/localization';\nimport {assertDefined} from '../../util/assert';\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 */\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 assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDomNode, assertIndexInRange} from '../util/assert';\n\nimport {TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {LView} from './interfaces/view';\nimport {getInsertInFrontOfRNodeWithNoI18n, nativeInsertBefore} from './node_manipulation';\nimport {unwrapRNode} from './util/view_utils';\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex =\n Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n } else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\n\n\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function processI18nInsertBefore(\n renderer: Renderer, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null): void {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n let i18nParent: RElement|null = childRNode as RElement;\n let anchorRNode: RNode|null = null;\n if (!(childTNode.type & TNodeType.AnyRNode)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && childTNode.componentOffset === -1) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nexport function addTNodeAndUpdateInsertBeforeIndex(previousTNodes: TNode[], newTNode: TNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\n\nfunction isI18nText(tNode: TNode): boolean {\n return !(tNode.type & TNodeType.Placeholder);\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode: TNode, newTNode: TNode): boolean {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\n\nfunction getInsertBeforeIndex(tNode: TNode): number|null {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\n\nfunction setInsertBeforeIndex(tNode: TNode, value: number): void {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n } else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, assertGreaterThan, assertGreaterThanOrEqual, throwError} from '../../util/assert';\nimport {assertTIcu, assertTNode} from '../assert';\nimport {createTNodeAtIndex} from '../instructions/shared';\nimport {IcuCreateOpCode, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {LView, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\n\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nexport function getTIcu(tView: TView, index: number): TIcu|null {\n const value = tView.data[index] as null | TIcu | TIcuContainerNode | string;\n if (value === null || typeof value === 'string') return null;\n if (ngDevMode &&\n !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value as TIcu :\n (value as TIcuContainerNode).value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nexport function setTIcu(tView: TView, index: number, tIcu: TIcu): void {\n const tNode = tView.data[index] as null | TIcuContainerNode;\n ngDevMode &&\n assertEqual(\n tNode === null || tNode.hasOwnProperty('tViews'), true,\n 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.Icu);\n tNode.value = tIcu;\n }\n}\n\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function setTNodeInsertBeforeIndex(tNode: TNode, index: number) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null!/* may be updated to number later */, index];\n } else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n (insertBeforeIndex as number[]).push(index);\n }\n}\n\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nexport function createTNodePlaceholder(\n tView: TView, previousTNodes: TNode[], index: number): TNode {\n const tNode = createTNodeAtIndex(tView, index, TNodeType.Placeholder, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n\n\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nexport function getCurrentICUCaseIndex(tIcu: TIcu, lView: LView) {\n const currentCase: number|null = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\n\nexport function getParentFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode >>> IcuCreateOpCode.SHIFT_PARENT;\n}\n\nexport function getRefFromIcuCreateOpCode(mergedCode: number): number {\n return (mergedCode & IcuCreateOpCode.MASK_REF) >>> IcuCreateOpCode.SHIFT_REF;\n}\n\nexport function getInstructionFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode & IcuCreateOpCode.MASK_INSTRUCTION;\n}\n\nexport function icuCreateOpCode(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << IcuCreateOpCode.SHIFT_PARENT | refIdx << IcuCreateOpCode.SHIFT_REF;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {getPluralCase} from '../../i18n/localization';\nimport {assertDefined, assertDomNode, assertEqual, assertGreaterThan, assertIndexInRange, throwError} from '../../util/assert';\nimport {assertIndexInExpandoRange, assertTIcu} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {elementPropertyInternal, setElementAttribute} from '../instructions/shared';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode} from '../interfaces/node';\nimport {RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {createCommentNode, createElementNode, createTextNode, nativeInsertBefore, nativeParentNode, nativeRemoveNode, updateTextNode} from '../node_manipulation';\nimport {getBindingIndex} from '../state';\nimport {renderStringify} from '../util/stringify_utils';\nimport {getNativeByIndex, unwrapRNode} from '../util/view_utils';\n\nimport {getLocaleId} from './i18n_locale_id';\nimport {getCurrentICUCaseIndex, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode, getTIcu} from './i18n_util';\n\n\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nexport function setMaskBit(hasChange: boolean) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n}\n\nexport function applyI18n(tView: TView, lView: LView, index: number) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index] as TI18n | I18nUpdateOpCodes;\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n const updateOpCodes: I18nUpdateOpCodes =\n Array.isArray(tI18n) ? tI18n as I18nUpdateOpCodes : (tI18n as TI18n).update;\n const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n changeMaskCounter = 0;\n}\n\n\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nexport function applyCreateOpCodes(\n lView: LView, createOpCodes: I18nCreateOpCodes, parentRNode: RElement|null,\n insertInFrontOf: RElement|null): void {\n const renderer = lView[RENDERER];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n let rNode = lView[index];\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] =\n isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n }\n if (appendNow && parentRNode !== null) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n}\n\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nexport function applyMutableOpCodes(\n tView: TView, mutableOpCodes: IcuCreateOpCodes, lView: LView, anchorRNode: RNode): void {\n ngDevMode && assertDomNode(anchorRNode);\n const renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n let rootIdx: number|null = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n let rootRNode!: RElement|null;\n for (let i = 0; i < mutableOpCodes.length; i++) {\n const opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n const textNodeIndex = mutableOpCodes[++i] as number;\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = createTextNode(renderer, opCode);\n }\n } else if (typeof opCode == 'number') {\n switch (opCode & IcuCreateOpCode.MASK_INSTRUCTION) {\n case IcuCreateOpCode.AppendChild:\n const parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = nativeParentNode(renderer, anchorRNode);\n }\n let insertInFrontOf: RNode|null;\n let parentRNode: RElement|null;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n } else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]) as RElement;\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n const refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n const child = lView[refIdx] as RElement;\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n const tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case IcuCreateOpCode.Attr:\n const elementNodeIndex = opCode >>> IcuCreateOpCode.SHIFT_REF;\n const attrName = mutableOpCodes[++i] as string;\n const attrValue = mutableOpCodes[++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 setElementAttribute(\n renderer, getNativeByIndex(elementNodeIndex, lView) as RElement, null, null, attrName,\n attrValue, null);\n break;\n default:\n if (ngDevMode) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_I18N_STRUCTURE,\n `Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n } else {\n switch (opCode) {\n case ICU_MARKER:\n const commentValue = mutableOpCodes[++i] as string;\n const commentNodeIndex = mutableOpCodes[++i] as number;\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof commentValue, 'string',\n `Expected \"${commentValue}\" to be a comment node value`);\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n const commentRNode = lView[commentNodeIndex] =\n createCommentNode(renderer, commentValue);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n const tagName = mutableOpCodes[++i] as string;\n const elementNodeIndex = mutableOpCodes[++i] as number;\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof tagName, 'string',\n `Expected \"${tagName}\" to be an element node tag name`);\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n const elementRNode = lView[elementNodeIndex] =\n createElementNode(renderer, tagName, null);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n}\n\n\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\nexport function applyUpdateOpCodes(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, bindingsStartIndex: number,\n changeMask: number) {\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 (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 // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\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 const tNodeOrTagName = tView.data[nodeIndex] as TNode | string;\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(\n lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value,\n sanitizeFn);\n } else {\n elementPropertyInternal(\n tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn,\n false);\n }\n break;\n case I18nUpdateOpCode.Text:\n const rText = lView[nodeIndex] as RText | null;\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex)!, lView, value);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex)!, bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n } else {\n const opCode = updateOpCodes[i + 1] as number;\n if (opCode > 0 && (opCode & I18nUpdateOpCode.MASK_OPCODE) === I18nUpdateOpCode.IcuUpdate) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\n const tIcu = getTIcu(tView, nodeIndex)!;\n const currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n}\n\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n let mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n}\n\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView: TView, tIcu: TIcu, lView: LView, value: string) {\n // Rebuild a new case for this ICU\n const caseIndex = getCaseIndex(tIcu, value);\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n const anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n }\n }\n}\n\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView: TView, tIcu: TIcu, lView: LView) {\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[activeCaseIndex];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n } else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex)!, lView);\n }\n }\n }\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|null {\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 === -1 ? null : index;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDomNode, assertNumber, assertNumberInRange} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {assertTIcu, assertTNodeForLView} from '../assert';\nimport {getCurrentICUCaseIndex} from '../i18n/i18n_util';\nimport {I18nRemoveOpCodes, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView, TVIEW} from '../interfaces/view';\n\nexport function loadIcuContainerVisitor() {\n const _stack: any[] = [];\n let _index: number = -1;\n let _lView: LView;\n let _removes: I18nRemoveOpCodes;\n\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n _lView = lView;\n while (_stack.length) _stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(tIcuContainerNode.value, lView);\n return icuContainerIteratorNext;\n }\n\n function enterIcu(tIcu: TIcu, lView: LView) {\n _index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n _removes = tIcu.remove[currentCase];\n } else {\n _removes = EMPTY_ARRAY as any;\n }\n }\n\n\n function icuContainerIteratorNext(): RNode|null {\n if (_index < _removes.length) {\n const removeOpCode = _removes[_index++] as number;\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = _lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n } else {\n _stack.push(_index, _removes);\n // ICUs are represented by negative indices\n const tIcuIndex = ~removeOpCode;\n const tIcu = _lView[TVIEW].data[tIcuIndex] as TIcu;\n ngDevMode && assertTIcu(tIcu);\n enterIcu(tIcu, _lView);\n return icuContainerIteratorNext();\n }\n } else {\n if (_stack.length === 0) {\n return null;\n } else {\n _removes = _stack.pop();\n _index = _stack.pop();\n return icuContainerIteratorNext();\n }\n }\n }\n\n return icuContainerIteratorStart;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertNumber, assertString} from '../../util/assert';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes} from '../interfaces/i18n';\n\nimport {getInstructionFromIcuCreateOpCode, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode} from './i18n_util';\n\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function i18nCreateOpCodesToString(\n this: I18nCreateOpCodes|void, opcodes?: I18nCreateOpCodes): string[] {\n const createOpCodes: I18nCreateOpCodes = opcodes || (Array.isArray(this) ? this : [] as any);\n let lines: string[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${\n JSON.stringify(text)});`);\n if (appendNow) {\n lines.push(`parent.appendChild(lView[${index}]);`);\n }\n }\n return lines;\n}\n\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nexport function i18nUpdateOpCodesToString(\n this: I18nUpdateOpCodes|void, opcodes?: I18nUpdateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(value: number): string {\n const ref = value >>> I18nUpdateOpCode.SHIFT_REF;\n const opCode = value & I18nUpdateOpCode.MASK_OPCODE;\n switch (opCode) {\n case I18nUpdateOpCode.Text:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case I18nUpdateOpCode.Attr:\n const attrName = parser.consumeString();\n const sanitizationFn = parser.consumeFunction();\n const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n case I18nUpdateOpCode.IcuSwitch:\n return `icuSwitchCase(${ref}, $$$)`;\n case I18nUpdateOpCode.IcuUpdate:\n return `icuUpdateCase(${ref})`;\n }\n throw new Error('unexpected OpCode');\n }\n\n\n while (parser.hasMore()) {\n let mask = parser.consumeNumber();\n let size = parser.consumeNumber();\n const end = parser.i + size;\n const statements: string[] = [];\n let statement = '';\n while (parser.i < end) {\n let value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n } else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n } else {\n // Positive numbers are operations.\n const opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n }\n return lines;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function icuCreateOpCodesToString(\n this: IcuCreateOpCodes|void, opcodes?: IcuCreateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(opCode: number): string {\n const parent = getParentFromIcuCreateOpCode(opCode);\n const ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case IcuCreateOpCode.AppendChild:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case IcuCreateOpCode.Attr:\n return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${\n parser.consumeString()}\")`;\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n\n let lastRef = -1;\n while (parser.hasMore()) {\n let value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n } else if (value === ELEMENT_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n } else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n } else if (typeof value === 'number') {\n const line = consumeOpCode(value);\n line && lines.push(line);\n } else {\n throw new Error('Unexpected value');\n }\n }\n\n return lines;\n}\n\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nexport function i18nRemoveOpCodesToString(\n this: I18nRemoveOpCodes|void, opcodes?: I18nRemoveOpCodes): string[] {\n const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines: string[] = [];\n\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n } else {\n // Negative numbers are ICUs\n lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n }\n }\n\n return lines;\n}\n\n\nclass OpCodeParser {\n i: number = 0;\n codes: any[];\n\n constructor(codes: any[]) {\n this.codes = codes;\n }\n\n hasMore() {\n return this.i < this.codes.length;\n }\n\n consumeNumber(): number {\n let value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n }\n\n consumeString(): string {\n let value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n }\n\n consumeFunction(): Function|null {\n let value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n }\n\n consumeNumberOrString(): number|string {\n let value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n }\n\n consumeNumberStringOrMarker(): number|string|ICU_MARKER|ELEMENT_MARKER {\n let value = this.codes[this.i++];\n if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n value == ELEMENT_MARKER) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {XSS_SECURITY_URL} from '../../error_details_base_url';\nimport {getTemplateContent, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS} from '../../sanitization/html_sanitizer';\nimport {getInertBodyHelper} from '../../sanitization/inert_body';\nimport {_sanitizeUrl} from '../../sanitization/url_sanitizer';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertOneOf, assertString} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\nimport {loadIcuContainerVisitor} from '../instructions/i18n_icu_container_visitor';\nimport {allocExpando, createTNodeAtIndex} from '../instructions/shared';\nimport {getDocument} from '../interfaces/document';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuExpression, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getCurrentParentTNode, getCurrentTNode, setCurrentTNode} from '../state';\n\nimport {i18nCreateOpCodesToString, i18nRemoveOpCodesToString, i18nUpdateOpCodesToString, icuCreateOpCodesToString} from './i18n_debug';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\nimport {ensureIcuContainerVisitorLoaded} from './i18n_tree_shaking';\nimport {createTNodePlaceholder, icuCreateOpCode, setTIcu, setTNodeInsertBeforeIndex} from './i18n_util';\n\n\n\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value: string): string {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter<T>(obj: T, debugGetter: (this: T) => any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {get: debugGetter, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n}\n\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\nexport function i18nStartFirstCreatePass(\n tView: TView, parentTNodeIndex: number, lView: LView, index: number, message: string,\n subTemplateIndex: number) {\n const rootTNode = getCurrentParentTNode();\n const createOpCodes: I18nCreateOpCodes = [] as any;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n const existingTNodeStack: TNode[][] = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n\n message = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = i18nParseTextIntoPartsAndICU(value);\n for (let j = 0; j < parts.length; j++) {\n let part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n const text = part as string;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(\n tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n }\n } else {\n // `j` is Even therefor `part` is an `ICUExpression`\n const icuExpression: IcuExpression = part as IcuExpression;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n }\n const icuContainerTNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodeStack[0], lView, createOpCodes,\n ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n const icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(\n icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n }\n }\n } else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n const isClosing = value.charCodeAt(0) === CharCode.SLASH;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, CharCode.STAR, CharCode.HASH);\n const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n if (isClosing) {\n existingTNodeStack.shift();\n setCurrentTNode(getCurrentParentTNode()!, false);\n } else {\n const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n }\n }\n }\n\n tView.data[index] = <TI18n>{\n create: createOpCodes,\n update: updateOpCodes,\n };\n}\n\n/**\n * Allocate space in i18n Range add create OpCode instruction to create a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], lView: LView,\n createOpCodes: I18nCreateOpCodes, text: string|null, isICU: boolean): TNode {\n const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n let parentTNode = getCurrentParentTNode();\n\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n const tNode = createTNodeAtIndex(\n tView, i18nNodeIdx, isICU ? TNodeType.Icu : TNodeType.Text,\n text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n const tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n}\n\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], createOpCodes: I18nCreateOpCodes,\n updateOpCodes: I18nUpdateOpCodes, lView: LView, text: string): void {\n const hasBinding = text.match(BINDING_REGEXP);\n const tNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n }\n}\n\n/**\n * See `i18nAttributes` above.\n */\nexport function i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getCurrentTNode()!;\n const previousElementIndex = previousElement.index;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(\n `ICU expressions are not supported in attributes. Message: \"${message}\".`);\n }\n\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(\n updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes),\n null);\n }\n }\n tView.data[index] = updateOpCodes;\n }\n}\n\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\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 * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes, str: string, destinationNode: number, attrName: string|null,\n bindingStart: number, sanitizeFn: SanitizerFn|null): number {\n ngDevMode &&\n assertGreaterThanOrEqual(\n destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n const maskIndex = updateOpCodes.length; // Location of mask\n const sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n const startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\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 = bindingStart + 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[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n}\n\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes: I18nUpdateOpCodes): number {\n let count = 0;\n for (let i = 0; i < opCodes.length; i++) {\n const opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n}\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\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is 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\nexport function isRootTemplateMessage(subTemplateIndex: number): subTemplateIndex is - 1 {\n return subTemplateIndex === -1;\n}\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 \"${\n message}\"`);\n\n res += message.slice(index);\n return res;\n}\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\n * translated 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 (isRootTemplateMessage(subTemplateIndex)) {\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 for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nexport function icuStart(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n icuExpression: IcuExpression, anchorIdx: number) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n let bindingMask = 0;\n const tIcu: TIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: []\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n const values = icuExpression.values;\n for (let i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = 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 bindingMask = parseIcuCase(\n tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i],\n valueArr.join(''), nestedIcus) |\n bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\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 */\nexport function 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.slice(1), 10);\n return '';\n });\n\n const parts = i18nParseTextIntoPartsAndICU(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 = i18nParseTextIntoPartsAndICU(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\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\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nexport function i18nParseTextIntoPartsAndICU(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/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nexport function parseIcuCase(\n tView: TView, tIcu: TIcu, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n caseName: string, unsafeCaseHtml: string, nestedIcus: IcuExpression[]): number {\n const create: IcuCreateOpCodes = [] as any;\n const remove: I18nRemoveOpCodes = [] as any;\n const update: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n\n const inertBodyHelper = getInertBodyHelper(getDocument());\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n const inertRootNode = getTemplateContent(inertBodyElement!) as Element || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(\n tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx,\n nestedIcus, 0);\n } else {\n return 0;\n }\n}\n\nfunction walkIcuTree(\n tView: TView, tIcu: TIcu, lView: LView, sharedUpdateOpCodes: I18nUpdateOpCodes,\n create: IcuCreateOpCodes, remove: I18nRemoveOpCodes, update: I18nUpdateOpCodes,\n parentNode: Element, parentIdx: number, nestedIcus: IcuExpression[], depth: number): number {\n let bindingMask = 0;\n let currentNode = parentNode.firstChild;\n while (currentNode) {\n const newIndex = allocExpando(tView, lView, 1, null);\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 addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\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 generateBindingUpdateOpCodes(\n update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n } else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ` +\n `${lowerAttrName} on element ${tagName} ` +\n `(see ${XSS_SECURITY_URL})`);\n }\n } else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n // Parse the children of this node (if any)\n bindingMask = walkIcuTree(\n tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update,\n currentNode as Element, newIndex, nestedIcus, depth + 1) |\n bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n const icuExpression: IcuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(\n create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx,\n newIndex);\n icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n}\n\nfunction addRemoveNode(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(index);\n }\n}\n\nfunction addRemoveNestedIcu(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n}\n\nfunction addUpdateIcuSwitch(\n update: I18nUpdateOpCodes, icuExpression: IcuExpression, index: number) {\n update.push(\n toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding,\n index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch);\n}\n\nfunction addUpdateIcuUpdate(update: I18nUpdateOpCodes, bindingMask: number, index: number) {\n update.push(bindingMask, 1, index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate);\n}\n\nfunction addCreateNodeAndAppend(\n create: IcuCreateOpCodes, marker: null|ICU_MARKER|ELEMENT_MARKER, text: string,\n appendToParentIdx: number, createAtIdx: number) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(\n text, createAtIdx,\n icuCreateOpCode(IcuCreateOpCode.AppendChild, appendToParentIdx, createAtIdx));\n}\n\nfunction addCreateAttribute(create: IcuCreateOpCodes, newIndex: number, attr: Attr) {\n create.push(newIndex << IcuCreateOpCode.SHIFT_REF | IcuCreateOpCode.Attr, attr.name, attr.value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/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\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 placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. 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 placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key): string => {\n return replacements.hasOwnProperty(key) ? replacements[key] as string : match;\n });\n\n /**\n * Step 4: 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {assertDefined} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {applyCreateOpCodes, applyI18n, setMaskBit} from '../i18n/i18n_apply';\nimport {i18nAttributesFirstPass, i18nStartFirstCreatePass} from '../i18n/i18n_parse';\nimport {i18nPostprocess} from '../i18n/i18n_postprocess';\nimport {TI18n} from '../interfaces/i18n';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {getClosestRElement} from '../node_manipulation';\nimport {getCurrentParentTNode, getLView, getTView, nextBindingIndex, setInI18nBlock} from '../state';\nimport {getConstant} from '../util/view_utils';\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}�`: *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 messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(\n index: number, messageIndex: number, subTemplateIndex: number = -1): void {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const message = getConstant<string>(tView.consts, messageIndex)!;\n const parentTNode = getCurrentParentTNode() as TElementNode | null;\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(\n tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message,\n subTemplateIndex);\n }\n const tI18n = tView.data[adjustedIndex] as TI18n;\n const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n const insertInFrontOf = parentTNode && (parentTNode.type & TNodeType.ElementContainer) ?\n lView[parentTNode.index] :\n null;\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n}\n\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 setInI18nBlock(false);\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 messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, messageIndex, 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, attrsIndex: number): void {\n const tView = getTView();\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const attrs = getConstant<string[]>(tView.consts, attrsIndex)!;\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n\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): typeof ɵɵi18nExp {\n const lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\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 applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\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 placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. 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 return i18nPostprocess(message, replacements);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/*\n * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\nexport * from './attribute';\nexport * from './attribute_interpolation';\nexport * from './change_detection';\nexport * from './template';\nexport * from './storage';\nexport * from './di';\nexport * from './di_attr';\nexport * from './element';\nexport * from './element_container';\nexport * from './get_current_view';\nexport * from './listener';\nexport * from './namespace';\nexport * from './next_context';\nexport * from './projection';\nexport * from './property';\nexport * from './property_interpolation';\nexport * from './advance';\nexport * from './styling';\nexport * from './text';\nexport * from './text_interpolation';\nexport * from './class_map_interpolation';\nexport * from './style_map_interpolation';\nexport * from './style_prop_interpolation';\nexport * from './host_property';\nexport * from './i18n';\nexport {ɵgetUnknownElementStrictMode, ɵsetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, ɵsetUnknownPropertyStrictMode} from './element_validation';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider} from '../di/provider_collection';\nimport {providerToFactory} from '../di/r3_injector';\nimport {assertDefined} from '../util/assert';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {DestroyHookData, LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getCurrentTNode, getLView, getTView} from './state';\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 tView = getTView();\n if (tView.firstCreatePass) {\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 tView = getTView();\n const lView = getLView();\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory: () => any = providerToFactory(provider);\n\n const tNode = getCurrentTNode()!;\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\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 tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\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 tView, 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 registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\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 const indexInFactory = multiFactoryAdd(\n lInjectablesBlueprint!\n [isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex],\n providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(\n tView, provider,\n existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex,\n indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders!++;\n }\n }\n }\n}\n\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(\n tView: TView, provider: Exclude<Provider, any[]>, contextIndex: number,\n indexInFactory?: number) {\n const providerIsTypeProvider = isTypeProvider(provider);\n const providerIsClassProvider = isClassProvider(provider);\n\n if (providerIsTypeProvider || providerIsClassProvider) {\n // Resolve forward references as `useClass` can hold a forward reference.\n const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n const prototype = classToken.prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n if (!providerIsTypeProvider && ((provider as ClassProvider)).multi) {\n ngDevMode &&\n assertDefined(\n indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n } else {\n (hooks[existingCallbacksIndex + 1] as DestroyHookData).push(indexInFactory!, ngOnDestroy);\n }\n } else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): number {\n if (isComponentProvider) {\n multiFactory.componentProviders!++;\n }\n return multiFactory.multi!.push(factory) - 1;\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, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode): 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, _: undefined, tData: TData, lView: LView,\n tNode: TDirectiveHostNode): any[] {\n const factories = this.multi!;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders!;\n const multiProviders =\n getNodeInjectable(lView, lView[TVIEW], 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, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode) => 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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 ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 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 * ɵɵtextInterpolate(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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\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(): EnvironmentInjector;\n\n /**\n * The resolver that can retrieve component factories in a context of this module.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\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 * Registers a callback to be executed 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 *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)\n * for additional context. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {createInjectorWithoutInjectorInstances} from '../di/create_injector';\nimport {Injector} from '../di/injector';\nimport {EnvironmentProviders, Provider} from '../di/interface/provider';\nimport {EnvironmentInjector, getNullInjector, R3Injector} 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 {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgModuleDef} from './definition';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n * not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nexport function createNgModule<T>(\n ngModule: Type<T>, parentInjector?: Injector): viewEngine_NgModuleRef<T> {\n return new NgModuleRef<T>(ngModule, parentInjector ?? null);\n}\n\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nexport const createNgModuleRef = createNgModule;\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 override instance: T;\n destroyCbs: (() => void)[]|null = [];\n\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n\n constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef!.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(\n ngModuleType, _parent,\n [\n {provide: viewEngine_NgModuleRef, useValue: this}, {\n provide: viewEngine_ComponentFactoryResolver,\n useValue: this.componentFactoryResolver\n }\n ],\n stringify(ngModuleType), new Set(['environment'])) as R3Injector;\n\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its constructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n this._r3Injector.resolveInjectorInitializers();\n this.instance = this._r3Injector.get(ngModuleType);\n }\n\n override get injector(): EnvironmentInjector {\n return this._r3Injector;\n }\n\n override 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 override 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\n override create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector);\n }\n}\n\nclass EnvironmentNgModuleRefAdapter extends viewEngine_NgModuleRef<null> {\n override readonly injector: EnvironmentInjector;\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n override readonly instance = null;\n\n constructor(\n providers: Array<Provider|EnvironmentProviders>, parent: EnvironmentInjector|null,\n source: string|null) {\n super();\n const injector = new R3Injector(\n [\n ...providers,\n {provide: viewEngine_NgModuleRef, useValue: this},\n {provide: viewEngine_ComponentFactoryResolver, useValue: this.componentFactoryResolver},\n ],\n parent || getNullInjector(), source, new Set(['environment']));\n this.injector = injector;\n injector.resolveInjectorInitializers();\n }\n\n override destroy(): void {\n this.injector.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.injector.onDestroy(callback);\n }\n}\n\n/**\n * Create a new environment injector.\n *\n * Learn more about environment injectors in\n * [this guide](guide/standalone-components#environment-injectors).\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n * messages.\n *\n * @publicApi\n */\nexport function createEnvironmentInjector(\n providers: Array<Provider|EnvironmentProviders>, parent: EnvironmentInjector,\n debugName: string|null = null): EnvironmentInjector {\n const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);\n return adapter.injector;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ɵɵinject as inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable as defineInjectable} from '../../di/interface/defs';\nimport {internalImportProvidersFrom} from '../../di/provider_collection';\nimport {EnvironmentInjector} from '../../di/r3_injector';\nimport {OnDestroy} from '../../interface/lifecycle_hooks';\nimport {ComponentDef} from '../interfaces/definition';\nimport {createEnvironmentInjector} from '../ng_module_ref';\n\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nclass StandaloneService implements OnDestroy {\n cachedInjectors = new Map<string, EnvironmentInjector|null>();\n\n constructor(private _injector: EnvironmentInjector) {}\n\n getOrCreateStandaloneInjector(componentDef: ComponentDef<unknown>): EnvironmentInjector|null {\n if (!componentDef.standalone) {\n return null;\n }\n\n if (!this.cachedInjectors.has(componentDef.id)) {\n const providers = internalImportProvidersFrom(false, componentDef.type);\n const standaloneInjector = providers.length > 0 ?\n createEnvironmentInjector(\n [providers], this._injector, `Standalone[${componentDef.type.name}]`) :\n null;\n this.cachedInjectors.set(componentDef.id, standaloneInjector);\n }\n\n return this.cachedInjectors.get(componentDef.id)!;\n }\n\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n } finally {\n this.cachedInjectors.clear();\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ defineInjectable({\n token: StandaloneService,\n providedIn: 'environment',\n factory: () => new StandaloneService(inject(EnvironmentInjector)),\n });\n}\n\n/**\n * A feature that acts as a setup code for the {@link StandaloneService}.\n *\n * The most important responsibility of this feature is to expose the \"getStandaloneInjector\"\n * function (an entry points to a standalone injector creation) on a component definition object. We\n * go through the features infrastructure to make sure that the standalone injector creation logic\n * is tree-shakable and not included in applications that don't use standalone components.\n *\n * @codeGenApi\n */\nexport function ɵɵStandaloneFeature(definition: ComponentDef<unknown>) {\n definition.getStandaloneInjector = (parentInjector: EnvironmentInjector) => {\n return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(definition);\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectionStrategy} from '../../change_detection/constants';\nimport {Injector} from '../../di/injector';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext, readPatchedLView} from '../context_discovery';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {NodeInjector} from '../di';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {CLEANUP, CONTEXT, FLAGS, LView, LViewFlags, TVIEW, TViewType} from '../interfaces/view';\n\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {unwrapRNode} from './view_utils';\n\n\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getComponent<T>(element: Element): T|null {\n ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null) return null;\n\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, lView);\n }\n\n return context.component as unknown as T;\n}\n\n\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getContext<T extends {}>(element: Element): T|null {\n assertDomElement(element);\n const context = getLContext(element)!;\n const lView = context ? context.lView : null;\n return lView === null ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getOwningComponent<T>(elementOrDir: Element|{}): T|null {\n const context = getLContext(elementOrDir)!;\n let lView = context ? context.lView : null;\n if (lView === null) return null;\n\n let parent: LView|null;\n while (lView[TVIEW].type === TViewType.Embedded && (parent = getLViewParent(lView)!)) {\n lView = parent;\n }\n return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as unknown as T;\n}\n\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getRootComponents(elementOrDir: Element|{}): {}[] {\n const lView = readPatchedLView<{}>(elementOrDir);\n return lView !== null ? [getRootContext(lView)] : [];\n}\n\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getInjector(elementOrDir: Element|{}): Injector {\n const context = getLContext(elementOrDir)!;\n const lView = context ? context.lView : null;\n if (lView === null) return Injector.NULL;\n\n const tNode = lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, 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 */\nexport function getInjectionTokens(element: Element): any[] {\n const context = getLContext(element)!;\n const lView = context ? context.lView : null;\n if (lView === null) return [];\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 directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectives(node: Node): {}[] {\n // Skip text nodes because we can't have directives associated with them.\n if (node instanceof Text) {\n return [];\n }\n\n const context = getLContext(node)!;\n const lView = context ? context.lView : null;\n if (lView === null) {\n return [];\n }\n\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n }\n\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : [...context.directives];\n}\n\n/**\n * Partial metadata for a given directive instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently only `inputs` and `outputs` metadata is available.\n *\n * @publicApi\n */\nexport interface DirectiveDebugMetadata {\n inputs: Record<string, string>;\n outputs: Record<string, string>;\n}\n\n/**\n * Partial metadata for a given component instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently the following fields are available:\n * - inputs\n * - outputs\n * - encapsulation\n * - changeDetection\n *\n * @publicApi\n */\nexport interface ComponentDebugMetadata extends DirectiveDebugMetadata {\n encapsulation: ViewEncapsulation;\n changeDetection: ChangeDetectionStrategy;\n}\n\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectiveMetadata(directiveOrComponentInstance: any): ComponentDebugMetadata|\n DirectiveDebugMetadata|null {\n const {constructor} = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n // In case a component inherits from a directive, we may have component and directive metadata\n // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n return {\n inputs: componentDef.inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush :\n ChangeDetectionStrategy.Default\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n return {inputs: directiveDef.inputs, outputs: directiveDef.outputs};\n }\n return null;\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 DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = getLContext(target);\n if (context === null) return {};\n\n if (context.localRefs === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return {};\n }\n context.localRefs = discoverLocalRefs(lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getHostElement(componentOrDirective: {}): Element {\n return getLContext(componentOrDirective)!.native as unknown 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\n/**\n * Event listener configuration returned from `getListeners`.\n * @publicApi\n */\nexport interface Listener {\n /** Name of the event listener. */\n name: string;\n /** Element that the listener is bound to. */\n element: Element;\n /** Callback that is invoked when the event is triggered. */\n callback: (value: any) => any;\n /** Whether the listener is using event capturing. */\n useCapture: boolean;\n /**\n * Type of the listener (e.g. a native DOM event or a custom @Output).\n */\n type: 'dom'|'output';\n}\n\n\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\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 * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getListeners(element: Element): Listener[] {\n ngDevMode && assertDomElement(element);\n const lContext = getLContext(element);\n const lView = lContext === null ? null : lContext.lView;\n if (lView === null) return [];\n\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 type =\n (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture, type});\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/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nexport function getComponentLView(target: any): LView {\n const lContext = getLContext(target)!;\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView!;\n ngDevMode && assertLView(lView);\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value: any) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 guarded by ngDevMode, resulting in the metadata assignments\n * being 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 if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\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\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, 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\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertIndexInRange} from '../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {LView} from './interfaces/view';\nimport {getBindingRoot, getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------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 const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\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 return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\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 return pureFunction2Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\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 return pureFunction3Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\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 return pureFunction4Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\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 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,\n 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 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,\n thisArg ? 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 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,\n thisArg ? 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 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,\n thisArg ? 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 return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView: LView, returnValueIndex: number) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nexport function pureFunction1Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v: any) => any, exp: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nexport function pureFunction2Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any) => any,\n exp1: any, exp2: any, thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(\n lView, bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nexport function pureFunction3Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\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 getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nexport function pureFunction4Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\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 getPureFunctionReturnValue(lView, bindingIndex + 4);\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nexport function pureFunctionVInternal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (...v: any[]) => any,\n exps: any[], thisArg?: any): any {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\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 getPureFunctionReturnValue(lView, bindingIndex);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PipeTransform} from '../change_detection/pipe_transform';\nimport {setInjectImplementation} from '../di/inject_switch';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\n\nimport {getFactoryDef} from './definition_factory';\nimport {setIncludeViewProviders} from './di';\nimport {store, ɵɵdirectiveInject} from './instructions/all';\nimport {isHostComponentStandalone} from './instructions/element_validation';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, TVIEW} from './interfaces/view';\nimport {pureFunction1Internal, pureFunction2Internal, pureFunction3Internal, pureFunction4Internal, pureFunctionVInternal} from './pure_function';\nimport {getBindingRoot, getLView, getTView} from './state';\nimport {load} from './util/view_utils';\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 = getTView();\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstCreatePass) {\n // The `getPipeDef` throws if a pipe with a given name is not found\n // (so we use non-null assertion below).\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 pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n } finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n }\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 */\nfunction getPipeDef(name: string, registry: PipeDefList|null): PipeDef<any>|undefined {\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 if (ngDevMode) {\n throw new RuntimeError(RuntimeErrorCode.PIPE_NOT_FOUND, getPipeNotFoundErrorMessage(name));\n }\n}\n\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name: string) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `Verify that it is ${\n hostIsStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'declared or imported in this module'}`;\n const errorMessage =\n `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\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 adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction1Internal(\n lView, getBindingRoot(), 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 adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction2Internal(\n lView, getBindingRoot(), 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 adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction3Internal(\n lView, getBindingRoot(), 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 adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ? pureFunction4Internal(\n lView, getBindingRoot(), slotOffset,\n 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[]]): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunctionVInternal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\n\nfunction isPure(lView: LView, index: number): boolean {\n return (<PipeDef<any>>lView[TVIEW].data[index]).pure;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <reference types=\"rxjs\" />\n\nimport {PartialObserver, Subject, Subscription} from 'rxjs';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\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 * @see [Observables in Angular](guide/observables-in-angular)\n * @publicApi\n */\nexport interface EventEmitter<T> extends Subject<T> {\n /**\n * @internal\n */\n __isAsync: boolean;\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param [isAsync=false] When true, deliver events asynchronously.\n *\n */\n new(isAsync?: boolean): EventEmitter<T>;\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T): void;\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param next When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void):\n Subscription;\n /**\n * Registers handlers for events emitted by this instance.\n * @param observerOrNext When supplied, a custom handler for emitted events, or an observer\n * object.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;\n}\n\nclass EventEmitter_ extends Subject<any> {\n __isAsync: boolean; // tslint:disable-line\n\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n emit(value?: any) {\n super.next(value);\n }\n\n override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext as PartialObserver<unknown>;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n\n if (this.__isAsync) {\n errorFn = _wrapInTimeout(errorFn);\n\n if (nextFn) {\n nextFn = _wrapInTimeout(nextFn);\n }\n\n if (completeFn) {\n completeFn = _wrapInTimeout(completeFn);\n }\n }\n\n const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});\n\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n\n return sink;\n }\n}\n\nfunction _wrapInTimeout(fn: (value: unknown) => any) {\n return (value: unknown) => {\n setTimeout(fn, undefined, value);\n };\n}\n\n/**\n * @publicApi\n */\nexport const EventEmitter: {\n new (isAsync?: boolean): EventEmitter<any>; new<T>(isAsync?: boolean): EventEmitter<T>;\n readonly prototype: EventEmitter<any>;\n} = EventEmitter_ as any;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {arrayEquals, 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 private _changesDetected: boolean = false;\n private _changes: EventEmitter<QueryList<T>>|null = null;\n\n readonly length: number = 0;\n readonly first: T = undefined!;\n readonly last: T = undefined!;\n\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes(): Observable<any> {\n return this._changes || (this._changes = new EventEmitter());\n }\n\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(private _emitDistinctChangesOnly: boolean = false) {\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 * Returns the QueryList entry at `index`.\n */\n get(index: number): T|undefined {\n return this._results[index];\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[] {\n return this._results.map(fn);\n }\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 {\n this._results.forEach(fn);\n }\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[] {\n return this._results.slice();\n }\n\n toString(): string {\n return this._results.toString();\n }\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 query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree: Array<T|any[]>, identityAccessor?: (value: T) => unknown): void {\n // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n // QueryList (but not for QueryList itself.)\n const self = this as QueryListInternal<T>;\n (self as {dirty: boolean}).dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n self._results = newResultFlat;\n self.length = newResultFlat.length;\n self.last = newResultFlat[this.length - 1];\n self.first = newResultFlat[0];\n }\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void {\n if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n\n /** internal */\n setDirty() {\n (this as {dirty: boolean}).dirty = true;\n }\n\n /** internal */\n destroy(): void {\n (this.changes as EventEmitter<any>).complete();\n (this.changes as EventEmitter<any>).unsubscribe();\n }\n\n // The implementation of `Symbol.iterator` should be declared here, but this would cause\n // tree-shaking issues with `QueryList. So instead, it's added in the constructor (see comments\n // there) and this declaration is left here to ensure that TypeScript considers QueryList to\n // implement the Iterable interface. This is required for template type-checking of NgFor loops\n // over QueryLists to work correctly, since QueryList must be assignable to NgIterable.\n [Symbol.iterator]!: () => Iterator<T>;\n}\n\n/**\n * Internal set of APIs used by the framework. (not to be made public)\n */\ninterface QueryListInternal<T> extends QueryList<T> {\n reset(a: any[]): void;\n notifyOnChanges(): void;\n length: number;\n last: T;\n first: T;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {assertLContainer} from '../render3/assert';\nimport {createLView, renderView} from '../render3/instructions/shared';\nimport {TContainerNode, TNode, TNodeType} from '../render3/interfaces/node';\nimport {DECLARATION_LCONTAINER, LView, LViewFlags, QUERIES, TView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {assertDefined} from '../util/assert';\n\nimport {createElementRef, ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\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 readonly elementRef: ElementRef;\n\n /**\n * Instantiates an unattached embedded view based on this template.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param injector Injector to be used within the embedded view.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => TemplateRef<any>| null = injectTemplateRef;\n}\n\nconst ViewEngineTemplateRef = TemplateRef;\n\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef<T> extends ViewEngineTemplateRef<T> {\n constructor(\n private _declarationLView: LView, private _declarationTContainer: TContainerNode,\n public override elementRef: ElementRef) {\n super();\n }\n\n override createEmbeddedView(context: T, injector?: Injector): EmbeddedViewRef<T> {\n const embeddedTView = this._declarationTContainer.tViews as TView;\n const embeddedLView = createLView(\n this._declarationLView, embeddedTView, context, LViewFlags.CheckAlways, null,\n embeddedTView.declTNode, null, null, null, null, injector || null);\n\n const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n const declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n\n renderView(embeddedTView, embeddedLView, context);\n\n return new R3_ViewRef<T>(embeddedLView);\n }\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(): TemplateRef<T>|null {\n return createTemplateRef<T>(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T>|null {\n if (hostTNode.type & TNodeType.Container) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(\n hostLView, hostTNode as TContainerNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {isType, Type} from '../interface/type';\nimport {assertNodeInjector} from '../render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from '../render3/component_ref';\nimport {getComponentDef} from '../render3/definition';\nimport {getParentInjectorLocation, NodeInjector} from '../render3/di';\nimport {addToViewTree, createLContainer} from '../render3/instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE, VIEW_REFS} from '../render3/interfaces/container';\nimport {NodeInjectorOffset} from '../render3/interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {isLContainer} from '../render3/interfaces/type_checks';\nimport {LView, PARENT, RENDERER, T_HOST, TVIEW} from '../render3/interfaces/view';\nimport {assertTNodeType} from '../render3/node_assert';\nimport {addViewToContainer, destroyLView, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode} from '../render3/node_manipulation';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from '../render3/util/injector_utils';\nimport {getNativeByTNode, unwrapRNode, viewAttachedToContainer} from '../render3/util/view_utils';\nimport {ViewRef as R3ViewRef} from '../render3/view_ref';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertEqual, assertGreaterThan, assertLessThan, throwError} from '../util/assert';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\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 context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param options Extra configuration for the created view. Includes:\n * * 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 * * injector: Injector to be used within the embedded view.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, options?: {\n index?: number,\n injector?: Injector\n }): EmbeddedViewRef<C>;\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 context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\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 componentType Component Type to use.\n * @param options An object that contains extra parameters:\n * * 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 * * injector: the injector to use as the parent for the new component.\n * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide\n * this to ensure that all expected providers are available for the component\n * instantiation.\n * * environmentInjector: an EnvironmentInjector which will provide the component's environment.\n * you should almost always provide this to ensure that all expected providers\n * are available for the component instantiation. This option is intended to\n * replace the `ngModuleRef` parameter.\n * * projectableNodes: list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n */\n abstract createComponent<C>(componentType: Type<C>, options?: {\n index?: number,\n injector?: Injector,\n ngModuleRef?: NgModuleRef<unknown>,\n environmentInjector?: EnvironmentInjector|NgModuleRef<unknown>,\n projectableNodes?: Node[][],\n }): ComponentRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory Component 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 List of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.\n * This information is used to retrieve corresponding NgModule injector.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n *\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][],\n environmentInjector?: EnvironmentInjector|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__: () => ViewContainerRef = injectViewContainerRef;\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(): ViewContainerRef {\n const previousTNode = getCurrentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(previousTNode, getLView());\n}\n\nconst VE_ViewContainerRef = ViewContainerRef;\n\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n private _hostLView: LView) {\n super();\n }\n\n override get element(): ElementRef {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n\n /** @deprecated No replacement */\n override get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode =\n parentView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] as TElementNode;\n return new NodeInjector(parentTNode, parentView);\n } else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n\n override clear(): void {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n\n override get(index: number): ViewRef|null {\n const viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n }\n\n override get length(): number {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n\n override createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, options?: {\n index?: number,\n injector?: Injector\n }): EmbeddedViewRef<C>;\n override createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C>;\n override createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, indexOrOptions?: number|{\n index?: number,\n injector?: Injector\n }): EmbeddedViewRef<C> {\n let index: number|undefined;\n let injector: Injector|undefined;\n\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n } else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n\n const viewRef = templateRef.createEmbeddedView(context || <any>{}, injector);\n this.insert(viewRef, index);\n return viewRef;\n }\n\n override createComponent<C>(componentType: Type<C>, options?: {\n index?: number,\n injector?: Injector,\n projectableNodes?: Node[][],\n ngModuleRef?: NgModuleRef<unknown>,\n }): ComponentRef<C>;\n /**\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n override createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number|undefined,\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n environmentInjector?: EnvironmentInjector|NgModuleRef<any>|undefined): ComponentRef<C>;\n override createComponent<C>(\n componentFactoryOrType: ComponentFactory<C>|Type<C>, indexOrOptions?: number|undefined|{\n index?: number,\n injector?: Injector,\n ngModuleRef?: NgModuleRef<unknown>,\n environmentInjector?: EnvironmentInjector|NgModuleRef<unknown>,\n projectableNodes?: Node[][],\n },\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n environmentInjector?: EnvironmentInjector|NgModuleRef<any>|undefined): ComponentRef<C> {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index: number|undefined;\n\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(\n typeof indexOrOptions !== 'object', true,\n 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n 'which to insert the new component\\'s host view into this container)');\n }\n index = indexOrOptions as number | undefined;\n } else {\n if (ngDevMode) {\n assertDefined(\n getComponentDef(componentFactoryOrType),\n `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`);\n assertEqual(\n typeof indexOrOptions !== 'number', true,\n 'It looks like Component type was provided as the first argument ' +\n 'and a number (representing an index at which to insert the new component\\'s ' +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.');\n }\n const options = (indexOrOptions || {}) as {\n index?: number,\n injector?: Injector,\n ngModuleRef?: NgModuleRef<unknown>,\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>,\n projectableNodes?: Node[][],\n };\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(\n `Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n\n const componentFactory: ComponentFactory<C> = isComponentFactory ?\n componentFactoryOrType as ComponentFactory<C>:\n new R3ComponentFactory(getComponentDef(componentFactoryOrType)!);\n const contextInjector = injector || this.parentInjector;\n\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && (componentFactory as any).ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n override insert(viewRef: ViewRef, index?: number): ViewRef {\n const lView = (viewRef as R3ViewRef<any>)._lView!;\n const tView = lView[TVIEW];\n\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n\n const prevIdx = this.indexOf(viewRef);\n\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n } else {\n const prevLContainer = lView[PARENT] as LContainer;\n ngDevMode &&\n assertEqual(\n isLContainer(prevLContainer), true,\n 'An attached view should have its PARENT point to a container.');\n\n\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(\n prevLContainer, prevLContainer[T_HOST] as TDirectiveHostNode, prevLContainer[PARENT]);\n\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n\n // Physical operation of adding the DOM nodes.\n const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE] as RElement | RComment);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n\n (viewRef as R3ViewRef<any>).attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n\n return viewRef;\n }\n\n override move(viewRef: ViewRef, newIndex: number): ViewRef {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n\n override indexOf(viewRef: ViewRef): number {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n\n override remove(index?: number): void {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n\n override detach(index?: number): ViewRef|null {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n\n const wasDetached =\n view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new R3ViewRef(view!) : 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, `ViewRef index must be positive, got ${index}`);\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\nfunction getViewRefs(lContainer: LContainer): ViewRef[]|null {\n return lContainer[VIEW_REFS] as ViewRef[];\n}\n\nfunction getOrCreateViewRefs(lContainer: LContainer): ViewRef[] {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])) as ViewRef[];\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 hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n hostLView: LView): ViewContainerRef {\n ngDevMode && assertTNodeType(hostTNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n\n let lContainer: LContainer;\n const slotValue = hostLView[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 } 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 // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n\n const hostNative = getNativeByTNode(hostTNode, hostLView)!;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer, parentOfHostNative!, commentNode, nativeNextSibling(renderer, hostNative),\n false);\n }\n\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n\n addToViewTree(hostLView, lContainer);\n }\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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 {ProviderToken} from '../di/provider_token';\nimport {createElementRef, ElementRef as ViewEngine_ElementRef, unwrapElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {createTemplateRef, TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {createContainerRef, ViewContainerRef} from '../linker/view_container_ref';\nimport {assertDefined, assertIndexInRange, assertNumber, throwError} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {assertFirstCreatePass, assertLContainer} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from './interfaces/container';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType} from './interfaces/node';\nimport {LQueries, LQuery, QueryFlags, TQueries, TQuery, TQueryMetadata} from './interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getCurrentQueryIndex, getCurrentTNode, getLView, getTView, setCurrentQueryIndex} from './state';\nimport {isCreationMode} from './util/view_utils';\n\nclass LQuery_<T> implements LQuery<T> {\n matches: (T|null)[]|null = null;\n constructor(public queryList: QueryList<T>) {}\n clone(): LQuery<T> {\n return new LQuery_(this.queryList);\n }\n setDirty(): void {\n this.queryList.setDirty();\n }\n}\n\nclass LQueries_ implements LQueries {\n constructor(public queries: LQuery<any>[] = []) {}\n\n createEmbeddedView(tView: TView): LQueries|null {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries =\n tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries: LQuery<any>[] = [];\n\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n\n return new LQueries_(viewLQueries);\n }\n\n return null;\n }\n\n insertView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n detachView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n private dirtyQueriesWithMatches(tView: TView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\n\nclass TQueryMetadata_ implements TQueryMetadata {\n constructor(\n public predicate: ProviderToken<unknown>|string[], public flags: QueryFlags,\n public read: any = null) {}\n}\n\nclass TQueries_ implements TQueries {\n constructor(private queries: TQuery[] = []) {}\n\n elementStart(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode: TNode): void {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode: TNode): TQueries|null {\n let queriesForTemplateRef: TQuery[]|null = null;\n\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n } else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n\n template(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n\n getByIndex(index: number): TQuery {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n\n get length(): number {\n return this.queries.length;\n }\n\n track(tquery: TQuery): void {\n this.queries.push(tquery);\n }\n}\n\nclass TQuery_ implements TQuery {\n matches: number[]|null = null;\n indexInDeclarationView = -1;\n crossesNgTemplate = false;\n\n /**\n * A node index on which a query was declared (-1 for view queries and ones inherited from the\n * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n * when to apply content queries to elements in a template.\n */\n private _declarationNodeIndex: number;\n\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n private _appliesToNextNode = true;\n\n constructor(public metadata: TQueryMetadata, nodeIndex: number = -1) {\n this._declarationNodeIndex = nodeIndex;\n }\n\n elementStart(tView: TView, tNode: TNode): void {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n\n elementEnd(tNode: TNode): void {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n\n template(tView: TView, tNode: TNode): void {\n this.elementStart(tView, tNode);\n }\n\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n\n private isApplyingToNode(tNode: TNode): boolean {\n if (this._appliesToNextNode &&\n (this.metadata.flags & QueryFlags.descendants) !== QueryFlags.descendants) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent !== null && (parent.type & TNodeType.ElementContainer) &&\n parent.index !== declarationNodeIdx) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n\n private matchTNode(tView: TView, tNode: TNode): void {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n }\n } else {\n if ((predicate as any) === ViewEngine_TemplateRef) {\n if (tNode.type & TNodeType.Container) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n } else {\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n }\n }\n }\n\n private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number|null): void {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (read === ViewEngine_ElementRef || read === ViewContainerRef ||\n read === ViewEngine_TemplateRef && (tNode.type & TNodeType.Container)) {\n this.addMatch(tNode.index, -2);\n } else {\n const directiveOrProviderIdx =\n locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n } else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n\n private addMatch(tNodeIdx: number, matchIdx: number) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n } else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\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 !== null) {\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\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n return createElementRef(tNode, currentView);\n } else if (tNode.type & TNodeType.Container) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\n\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n } else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n } else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);\n }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n if (read === ViewEngine_ElementRef) {\n return createElementRef(tNode, lView);\n } else if (read === ViewEngine_TemplateRef) {\n return createTemplateRef(tNode, lView);\n } else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n return createContainerRef(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n } else {\n ngDevMode &&\n throwError(\n `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${\n stringify(read)}.`);\n }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(\n tView: TView, lView: LView, tQuery: TQuery, queryIndex: number): (T|null)[] {\n const lQuery = lView[QUERIES]!.queries![queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches!;\n const result: T|null[] = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx] as TNode;\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(tView: TView, lView: LView, queryIndex: number, result: T[]): T[] {\n const tQuery = tView.queries!.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults<T>(tView, lView, tQuery, queryIndex);\n\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2] as T);\n } else {\n const childQueryIndex = tQueryMatches[i + 1];\n\n const declarationLContainer = lView[-tNodeIdx] as LContainer;\n ngDevMode && assertLContainer(declarationLContainer);\n\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS]!;\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\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 lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n\n setCurrentQueryIndex(queryIndex + 1);\n\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & QueryFlags.isStatic) === QueryFlags.isStatic))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n\n return false;\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 flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n predicate: ProviderToken<unknown>|string[], flags: QueryFlags, read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery<T>(tView, getLView(), flags);\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 flags Flags associated with the query\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: ProviderToken<unknown>|string[], flags: QueryFlags,\n read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode()!;\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticContentQueries = true;\n }\n }\n\n createLQuery<T>(tView, getLView(), flags);\n}\n\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nexport function ɵɵloadQuery<T>(): QueryList<T> {\n return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n\nfunction loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES]!.queries, queryIndex);\n return lView[QUERIES]!.queries[queryIndex].queryList;\n}\n\nfunction createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags) {\n const queryList = new QueryList<T>(\n (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly);\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n\n if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n lView[QUERIES]!.queries.push(new LQuery_(queryList));\n}\n\nfunction createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n if (tView.queries === null) tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nfunction saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex =\n tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries!.length - 1, directiveIndex);\n }\n}\n\nfunction getTQuery(tView: TView, index: number): TQuery {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries!.getByIndex(index);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {createTemplateRef, TemplateRef} from '../linker/template_ref';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\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, lView: LView): TemplateRef<any>|null {\n return createTemplateRef(tNode, lView);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {forwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport {registerNgModuleType} from '../../linker/ng_module_registration';\nimport * as iframe_attrs_validation from '../../sanitization/iframe_attrs_validation';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\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 'ɵɵ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 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': r3.ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵresetView': r3.ɵɵresetView,\n 'ɵɵHostDirectivesFeature': r3.ɵɵHostDirectivesFeature,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': r3.ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵStandaloneFeature': r3.ɵɵStandaloneFeature,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵelementContainer': r3.ɵɵelementContainer,\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 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵsyntheticHostProperty': r3.ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': r3.ɵɵsyntheticHostListener,\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 'ɵɵhostProperty': r3.ɵɵhostProperty,\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 'ɵɵloadQuery': r3.ɵɵloadQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': r3.ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': r3.ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': r3.ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': r3.ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': r3.ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': r3.ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': r3.ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': r3.ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': r3.ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': r3.ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': r3.ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': r3.ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': r3.ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': r3.ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': r3.ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': r3.ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': r3.ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': r3.ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': r3.ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': r3.ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': r3.ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': r3.ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': r3.ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': r3.ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': r3.ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵadvance': r3.ɵɵadvance,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵtext': r3.ɵɵtext,\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 'ɵɵ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 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n 'ɵɵregisterNgModuleType': registerNgModuleType,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': sanitization.ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': sanitization.ɵɵtrustConstantResourceUrl,\n 'ɵɵvalidateIframeAttribute': iframe_attrs_validation.ɵɵvalidateIframeAttribute,\n\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\n }))();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function patchModuleCompilation(): void {\n // Does nothing, but exists as a target for patching.\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModuleWithProviders} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {NgModuleDef} from '../../metadata/ng_module_def';\nimport {getNgModuleDef} from '../definition';\n\nexport function isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as {ngModule?: any}).ngModule !== undefined;\n}\n\nexport function isNgModule<T>(value: Type<T>): value is Type<T>&{ɵmod: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3InjectorMetadataFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJ_DEF} from '../../di/interface/defs';\nimport {ModuleWithProviders} from '../../di/interface/provider';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {registerNgModuleType} from '../../linker/ng_module_registration';\nimport {Component} from '../../metadata/directives';\nimport {NgModule} from '../../metadata/ng_module';\nimport {NgModuleDef, NgModuleTransitiveScopes, NgModuleType} from '../../metadata/ng_module_def';\nimport {deepForEach, flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef, isStandalone} from '../definition';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF, NG_MOD_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {maybeUnwrapFn} from '../util/misc_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {patchModuleCompilation} from './module_patch';\nimport {isModuleWithProviders, isNgModule} from './util';\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 patchModuleCompilation();\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n if (ngModule.id !== undefined) {\n registerNgModuleType(moduleType as NgModuleType, ngModule.id);\n }\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 `ɵmod`, `ɵfac` and `ɵinj` 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_MOD_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n }\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.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 schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n\n let ngFactoryDef: any = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n target: compiler.FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: 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 const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngInjectorDef =\n compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.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\nexport function generateStandaloneInDeclarationsError(type: Type<any>, location: string) {\n const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n const suffix = `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` +\n 'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n return `${prefix} ${location}, ${suffix}`;\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean,\n importingModule?: NgModuleType): void {\n if (verifiedNgModule.get(moduleType)) return;\n\n // skip verifications of standalone components, directives, and pipes\n if (isStandalone(moduleType)) return;\n\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n let ngModuleDef: NgModuleDef<any>;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType)!;\n if (!ngModuleDef) {\n throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n } else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(modOrStandaloneCmpt => {\n verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));\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).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, 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(`Unexpected value '${stringifyForError(type)}' declared by the module '${\n stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n\n function verifyDirectivesHaveSelector(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n }\n }\n\n function verifyNotStandalone(type: Type<any>, moduleType: NgModuleType): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (def?.standalone) {\n const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n errors.push(generateStandaloneInDeclarationsError(type, location));\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(`Can't export ${kind} ${stringifyForError(type)} from ${\n 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: ${\n modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${\n modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${\n stringifyForError(\n 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 && !isStandalone(type)) {\n errors.push(`Component ${\n stringifyForError(\n 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 if (isStandalone(type)) {\n // Note: this error should be the same as the\n // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n errors.push(\n `The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` +\n `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` +\n `function for bootstrap instead.`);\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 deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n\n function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) {\n type = resolveForwardRef(type);\n\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null && !directiveDef.standalone) {\n throw new Error(`Unexpected directive '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n\n const pipeDef = getPipeDef(type);\n if (pipeDef !== null && !pipeDef.standalone) {\n throw new Error(`Unexpected pipe '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders: NgModuleType<any>|\n {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 WeakMap<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new WeakMap<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);\n\n // a standalone component, directive or pipe\n if (ngModuleDef === null) {\n return [type];\n }\n\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 * ɵcmp 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 declaration = resolveForwardRef(declaration);\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any>& {ɵcmp: ComponentDef<any>};\n const componentDef = getComponentDef(component)!;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIR_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_COMP_DEF) ? getComponentDef(dir)! : getDirectiveDef(dir)!\n )\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 type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nexport function transitiveScopesFor<T>(type: Type<T>): NgModuleTransitiveScopes {\n if (isNgModule(type)) {\n return transitiveScopesForNgModule(type);\n } else if (isStandalone(type)) {\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>([type]),\n pipes: new Set<any>(),\n },\n };\n }\n\n const pipeDef = getPipeDef(type);\n if (pipeDef !== null) {\n return {\n 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>([type]),\n },\n };\n }\n }\n\n // TODO: change the error message to be more user-facing and take standalone into account\n throw new Error(`${type.name} does not have a module def (ɵmod property)`);\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. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nexport function transitiveScopesForNgModule<T>(moduleType: Type<T>): NgModuleTransitiveScopes {\n const def = getNgModuleDef(moduleType, true);\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.imports).forEach(<I>(imported: Type<I>) => {\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(imported);\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.declarations).forEach(declared => {\n const declaredWithDefs = declared as Type<any>& {\n ɵpipe?: any;\n };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has a ɵcmp or ɵdir, 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.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E>& {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ɵcmp?: any;\n ɵdir?: any;\n ɵmod?: NgModuleDef<E>;\n ɵpipe?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp 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);\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵstringify as stringify} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\n\ntype StringMap = {\n [key: string]: any\n};\n\nlet _nextReferenceId = 0;\n\nexport class MetadataOverrider {\n private _references = new Map<any, string>();\n /**\n * Creates a new instance for the given metadata class\n * based on an old instance and overrides.\n */\n overrideMetadata<C extends T, T>(\n metadataClass: {new(options: T): C;}, oldMetadata: C, override: MetadataOverride<T>): C {\n const props: StringMap = {};\n if (oldMetadata) {\n _valueProps(oldMetadata).forEach((prop) => props[prop] = (<any>oldMetadata)[prop]);\n }\n\n if (override.set) {\n if (override.remove || override.add) {\n throw new Error(`Cannot set and add/remove ${stringify(metadataClass)} at the same time!`);\n }\n setMetadata(props, override.set);\n }\n if (override.remove) {\n removeMetadata(props, override.remove, this._references);\n }\n if (override.add) {\n addMetadata(props, override.add);\n }\n return new metadataClass(<any>props);\n }\n}\n\nfunction removeMetadata(metadata: StringMap, remove: any, references: Map<any, string>) {\n const removeObjects = new Set<string>();\n for (const prop in remove) {\n const removeValue = remove[prop];\n if (Array.isArray(removeValue)) {\n removeValue.forEach((value: any) => {\n removeObjects.add(_propHashKey(prop, value, references));\n });\n } else {\n removeObjects.add(_propHashKey(prop, removeValue, references));\n }\n }\n\n for (const prop in metadata) {\n const propValue = metadata[prop];\n if (Array.isArray(propValue)) {\n metadata[prop] = propValue.filter(\n (value: any) => !removeObjects.has(_propHashKey(prop, value, references)));\n } else {\n if (removeObjects.has(_propHashKey(prop, propValue, references))) {\n metadata[prop] = undefined;\n }\n }\n }\n}\n\nfunction addMetadata(metadata: StringMap, add: any) {\n for (const prop in add) {\n const addValue = add[prop];\n const propValue = metadata[prop];\n if (propValue != null && Array.isArray(propValue)) {\n metadata[prop] = propValue.concat(addValue);\n } else {\n metadata[prop] = addValue;\n }\n }\n}\n\nfunction setMetadata(metadata: StringMap, set: any) {\n for (const prop in set) {\n metadata[prop] = set[prop];\n }\n}\n\nfunction _propHashKey(propName: any, propValue: any, references: Map<any, string>): string {\n let nextObjectId = 0;\n const objectIds = new Map<object, string>();\n const replacer = (key: any, value: any) => {\n if (value !== null && typeof value === 'object') {\n if (objectIds.has(value)) {\n return objectIds.get(value);\n }\n // Record an id for this object such that any later references use the object's id instead\n // of the object itself, in order to break cyclic pointers in objects.\n objectIds.set(value, `ɵobj#${nextObjectId++}`);\n\n // The first time an object is seen the object itself is serialized.\n return value;\n } else if (typeof value === 'function') {\n value = _serializeReference(value, references);\n }\n return value;\n };\n\n return `${propName}:${JSON.stringify(propValue, replacer)}`;\n}\n\nfunction _serializeReference(ref: any, references: Map<any, string>): string {\n let id = references.get(ref);\n if (!id) {\n id = `${stringify(ref)}${_nextReferenceId++}`;\n references.set(ref, id);\n }\n return id;\n}\n\n\nfunction _valueProps(obj: any): string[] {\n const props: string[] = [];\n // regular public props\n Object.keys(obj).forEach((prop) => {\n if (!prop.startsWith('_')) {\n props.push(prop);\n }\n });\n\n // getters\n let proto = obj;\n while (proto = Object.getPrototypeOf(proto)) {\n Object.keys(proto).forEach((protoProp) => {\n const desc = Object.getOwnPropertyDescriptor(proto, protoProp);\n if (!protoProp.startsWith('_') && desc && 'get' in desc) {\n props.push(protoProp);\n }\n });\n }\n return props;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component, Directive, NgModule, Pipe, Type, ɵReflectionCapabilities as ReflectionCapabilities} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\nimport {MetadataOverrider} from './metadata_overrider';\n\nconst reflection = new ReflectionCapabilities();\n\n/**\n * Base interface to resolve `@Component`, `@Directive`, `@Pipe` and `@NgModule`.\n */\nexport interface Resolver<T> {\n addOverride(type: Type<any>, override: MetadataOverride<T>): void;\n setOverrides(overrides: Array<[Type<any>, MetadataOverride<T>]>): void;\n resolve(type: Type<any>): T|null;\n}\n\n/**\n * Allows to override ivy metadata for tests (via the `TestBed`).\n */\nabstract class OverrideResolver<T> implements Resolver<T> {\n private overrides = new Map<Type<any>, MetadataOverride<T>[]>();\n private resolved = new Map<Type<any>, T|null>();\n\n abstract get type(): any;\n\n addOverride(type: Type<any>, override: MetadataOverride<T>) {\n const overrides = this.overrides.get(type) || [];\n overrides.push(override);\n this.overrides.set(type, overrides);\n this.resolved.delete(type);\n }\n\n setOverrides(overrides: Array<[Type<any>, MetadataOverride<T>]>) {\n this.overrides.clear();\n overrides.forEach(([type, override]) => {\n this.addOverride(type, override);\n });\n }\n\n getAnnotation(type: Type<any>): T|null {\n const annotations = reflection.annotations(type);\n // Try to find the nearest known Type annotation and make sure that this annotation is an\n // instance of the type we are looking for, so we can use it for resolution. Note: there might\n // be multiple known annotations found due to the fact that Components can extend Directives (so\n // both Directive and Component annotations would be present), so we always check if the known\n // annotation has the right type.\n for (let i = annotations.length - 1; i >= 0; i--) {\n const annotation = annotations[i];\n const isKnownType = annotation instanceof Directive || annotation instanceof Component ||\n annotation instanceof Pipe || annotation instanceof NgModule;\n if (isKnownType) {\n return annotation instanceof this.type ? annotation as unknown as T : null;\n }\n }\n return null;\n }\n\n resolve(type: Type<any>): T|null {\n let resolved: T|null = this.resolved.get(type) || null;\n\n if (!resolved) {\n resolved = this.getAnnotation(type);\n if (resolved) {\n const overrides = this.overrides.get(type);\n if (overrides) {\n const overrider = new MetadataOverrider();\n overrides.forEach(override => {\n resolved = overrider.overrideMetadata(this.type, resolved!, override);\n });\n }\n }\n this.resolved.set(type, resolved);\n }\n\n return resolved;\n }\n}\n\n\nexport class DirectiveResolver extends OverrideResolver<Directive> {\n override get type() {\n return Directive;\n }\n}\n\nexport class ComponentResolver extends OverrideResolver<Component> {\n override get type() {\n return Component;\n }\n}\n\nexport class PipeResolver extends OverrideResolver<Pipe> {\n override get type() {\n return Pipe;\n }\n}\n\nexport class NgModuleResolver extends OverrideResolver<NgModule> {\n override get type() {\n return NgModule;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ResourceLoader} from '@angular/compiler';\nimport {ApplicationInitStatus, Compiler, COMPILER_OPTIONS, Component, Directive, Injector, InjectorType, LOCALE_ID, ModuleWithComponentFactories, ModuleWithProviders, NgModule, NgModuleFactory, NgZone, Pipe, PlatformRef, Provider, resolveForwardRef, Type, ɵcompileComponent as compileComponent, ɵcompileDirective as compileDirective, ɵcompileNgModuleDefs as compileNgModuleDefs, ɵcompilePipe as compilePipe, ɵDEFAULT_LOCALE_ID as DEFAULT_LOCALE_ID, ɵDirectiveDef as DirectiveDef, ɵgetInjectableDef as getInjectableDef, ɵInternalEnvironmentProviders as InternalEnvironmentProviders, ɵisEnvironmentProviders as isEnvironmentProviders, ɵNG_COMP_DEF as NG_COMP_DEF, ɵNG_DIR_DEF as NG_DIR_DEF, ɵNG_INJ_DEF as NG_INJ_DEF, ɵNG_MOD_DEF as NG_MOD_DEF, ɵNG_PIPE_DEF as NG_PIPE_DEF, ɵNgModuleFactory as R3NgModuleFactory, ɵNgModuleTransitiveScopes as NgModuleTransitiveScopes, ɵNgModuleType as NgModuleType, ɵpatchComponentDefWithScope as patchComponentDefWithScope, ɵRender3ComponentFactory as ComponentFactory, ɵRender3NgModuleRef as NgModuleRef, ɵsetLocaleId as setLocaleId, ɵtransitiveScopesFor as transitiveScopesFor, ɵɵInjectableDeclaration as InjectableDeclaration} from '@angular/core';\n\nimport {clearResolutionOfComponentResourcesQueue, isComponentDefPendingResolution, resolveComponentResources, restoreComponentResolutionQueue} from '../../src/metadata/resource_loading';\nimport {ComponentDef, ComponentType} from '../../src/render3';\nimport {generateStandaloneInDeclarationsError} from '../../src/render3/jit/module';\n\nimport {MetadataOverride} from './metadata_override';\nimport {ComponentResolver, DirectiveResolver, NgModuleResolver, PipeResolver, Resolver} from './resolvers';\nimport {TestModuleMetadata} from './test_bed_common';\n\nenum TestingModuleOverride {\n DECLARATION,\n OVERRIDE_TEMPLATE,\n}\n\nfunction isTestingModuleOverride(value: unknown): value is TestingModuleOverride {\n return value === TestingModuleOverride.DECLARATION ||\n value === TestingModuleOverride.OVERRIDE_TEMPLATE;\n}\n\nfunction assertNoStandaloneComponents(\n types: Type<any>[], resolver: Resolver<any>, location: string) {\n types.forEach(type => {\n const component = resolver.resolve(type);\n if (component && component.standalone) {\n throw new Error(generateStandaloneInDeclarationsError(type, location));\n }\n });\n}\n\n// Resolvers for Angular decorators\ntype Resolvers = {\n module: Resolver<NgModule>,\n component: Resolver<Directive>,\n directive: Resolver<Component>,\n pipe: Resolver<Pipe>,\n};\n\ninterface CleanupOperation {\n fieldName: string;\n object: any;\n originalValue: unknown;\n}\n\nexport class TestBedCompiler {\n private originalComponentResolutionQueue: Map<Type<any>, Component>|null = null;\n\n // Testing module configuration\n private declarations: Type<any>[] = [];\n private imports: Type<any>[] = [];\n private providers: Provider[] = [];\n private schemas: any[] = [];\n\n // Queues of components/directives/pipes that should be recompiled.\n private pendingComponents = new Set<Type<any>>();\n private pendingDirectives = new Set<Type<any>>();\n private pendingPipes = new Set<Type<any>>();\n\n // Keep track of all components and directives, so we can patch Providers onto defs later.\n private seenComponents = new Set<Type<any>>();\n private seenDirectives = new Set<Type<any>>();\n\n // Keep track of overridden modules, so that we can collect all affected ones in the module tree.\n private overriddenModules = new Set<NgModuleType<any>>();\n\n // Store resolved styles for Components that have template overrides present and `styleUrls`\n // defined at the same time.\n private existingComponentStyles = new Map<Type<any>, string[]>();\n\n private resolvers: Resolvers = initResolvers();\n\n private componentToModuleScope = new Map<Type<any>, Type<any>|TestingModuleOverride>();\n\n // Map that keeps initial version of component/directive/pipe defs in case\n // we compile a Type again, thus overriding respective static fields. This is\n // required to make sure we restore defs to their initial states between test runs.\n // Note: one class may have multiple defs (for example: ɵmod and ɵinj in case of an\n // NgModule), store all of them in a map.\n private initialNgDefs = new Map<Type<any>, Map<string, PropertyDescriptor|undefined>>();\n\n // Array that keeps cleanup operations for initial versions of component/directive/pipe/module\n // defs in case TestBed makes changes to the originals.\n private defCleanupOps: CleanupOperation[] = [];\n\n private _injector: Injector|null = null;\n private compilerProviders: Provider[]|null = null;\n\n private providerOverrides: Provider[] = [];\n private rootProviderOverrides: Provider[] = [];\n // Overrides for injectables with `{providedIn: SomeModule}` need to be tracked and added to that\n // module's provider list.\n private providerOverridesByModule = new Map<InjectorType<any>, Provider[]>();\n private providerOverridesByToken = new Map<any, Provider>();\n private scopesWithOverriddenProviders = new Set<Type<any>>();\n\n private testModuleType: NgModuleType<any>;\n private testModuleRef: NgModuleRef<any>|null = null;\n\n constructor(private platform: PlatformRef, private additionalModuleTypes: Type<any>|Type<any>[]) {\n class DynamicTestModule {}\n this.testModuleType = DynamicTestModule as any;\n }\n\n setCompilerProviders(providers: Provider[]|null): void {\n this.compilerProviders = providers;\n this._injector = null;\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata): void {\n // Enqueue any compilation tasks for the directly declared component.\n if (moduleDef.declarations !== undefined) {\n // Verify that there are no standalone components\n assertNoStandaloneComponents(\n moduleDef.declarations, this.resolvers.component,\n '\"TestBed.configureTestingModule\" call');\n this.queueTypeArray(moduleDef.declarations, TestingModuleOverride.DECLARATION);\n this.declarations.push(...moduleDef.declarations);\n }\n\n // Enqueue any compilation tasks for imported modules.\n if (moduleDef.imports !== undefined) {\n this.queueTypesFromModulesArray(moduleDef.imports);\n this.imports.push(...moduleDef.imports);\n }\n\n if (moduleDef.providers !== undefined) {\n this.providers.push(...moduleDef.providers);\n }\n\n if (moduleDef.schemas !== undefined) {\n this.schemas.push(...moduleDef.schemas);\n }\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void {\n this.overriddenModules.add(ngModule as NgModuleType<any>);\n\n // Compile the module right away.\n this.resolvers.module.addOverride(ngModule, override);\n const metadata = this.resolvers.module.resolve(ngModule);\n if (metadata === null) {\n throw invalidTypeError(ngModule.name, 'NgModule');\n }\n\n this.recompileNgModule(ngModule, metadata);\n\n // At this point, the module has a valid module def (ɵmod), but the override may have introduced\n // new declarations or imported modules. Ingest any possible new types and add them to the\n // current queue.\n this.queueTypesFromModulesArray([ngModule]);\n }\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void {\n this.verifyNoStandaloneFlagOverrides(component, override);\n this.resolvers.component.addOverride(component, override);\n this.pendingComponents.add(component);\n }\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void {\n this.verifyNoStandaloneFlagOverrides(directive, override);\n this.resolvers.directive.addOverride(directive, override);\n this.pendingDirectives.add(directive);\n }\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void {\n this.verifyNoStandaloneFlagOverrides(pipe, override);\n this.resolvers.pipe.addOverride(pipe, override);\n this.pendingPipes.add(pipe);\n }\n\n private verifyNoStandaloneFlagOverrides(\n type: Type<any>, override: MetadataOverride<Component|Directive|Pipe>) {\n if (override.add?.hasOwnProperty('standalone') || override.set?.hasOwnProperty('standalone') ||\n override.remove?.hasOwnProperty('standalone')) {\n throw new Error(\n `An override for the ${type.name} class has the \\`standalone\\` flag. ` +\n `Changing the \\`standalone\\` flag via TestBed overrides is not supported.`);\n }\n }\n\n overrideProvider(\n token: any,\n provider: {useFactory?: Function, useValue?: any, deps?: any[], multi?: boolean}): void {\n let providerDef: Provider;\n if (provider.useFactory !== undefined) {\n providerDef = {\n provide: token,\n useFactory: provider.useFactory,\n deps: provider.deps || [],\n multi: provider.multi\n };\n } else if (provider.useValue !== undefined) {\n providerDef = {provide: token, useValue: provider.useValue, multi: provider.multi};\n } else {\n providerDef = {provide: token};\n }\n\n const injectableDef: InjectableDeclaration<any>|null =\n typeof token !== 'string' ? getInjectableDef(token) : null;\n const providedIn = injectableDef === null ? null : resolveForwardRef(injectableDef.providedIn);\n const overridesBucket =\n providedIn === 'root' ? this.rootProviderOverrides : this.providerOverrides;\n overridesBucket.push(providerDef);\n\n // Keep overrides grouped by token as well for fast lookups using token\n this.providerOverridesByToken.set(token, providerDef);\n if (injectableDef !== null && providedIn !== null && typeof providedIn !== 'string') {\n const existingOverrides = this.providerOverridesByModule.get(providedIn);\n if (existingOverrides !== undefined) {\n existingOverrides.push(providerDef);\n } else {\n this.providerOverridesByModule.set(providedIn, [providerDef]);\n }\n }\n }\n\n overrideTemplateUsingTestingModule(type: Type<any>, template: string): void {\n const def = (type as any)[NG_COMP_DEF];\n const hasStyleUrls = (): boolean => {\n const metadata = this.resolvers.component.resolve(type)! as Component;\n return !!metadata.styleUrls && metadata.styleUrls.length > 0;\n };\n const overrideStyleUrls = !!def && !isComponentDefPendingResolution(type) && hasStyleUrls();\n\n // In Ivy, compiling a component does not require knowing the module providing the\n // component's scope, so overrideTemplateUsingTestingModule can be implemented purely via\n // overrideComponent. Important: overriding template requires full Component re-compilation,\n // which may fail in case styleUrls are also present (thus Component is considered as required\n // resolution). In order to avoid this, we preemptively set styleUrls to an empty array,\n // preserve current styles available on Component def and restore styles back once compilation\n // is complete.\n const override = overrideStyleUrls ? {template, styles: [], styleUrls: []} : {template};\n this.overrideComponent(type, {set: override});\n\n if (overrideStyleUrls && def.styles && def.styles.length > 0) {\n this.existingComponentStyles.set(type, def.styles);\n }\n\n // Set the component's scope to be the testing module.\n this.componentToModuleScope.set(type, TestingModuleOverride.OVERRIDE_TEMPLATE);\n }\n\n async compileComponents(): Promise<void> {\n this.clearComponentResolutionQueue();\n // Run compilers for all queued types.\n let needsAsyncResources = this.compileTypesSync();\n\n // compileComponents() should not be async unless it needs to be.\n if (needsAsyncResources) {\n let resourceLoader: ResourceLoader;\n let resolver = (url: string): Promise<string> => {\n if (!resourceLoader) {\n resourceLoader = this.injector.get(ResourceLoader);\n }\n return Promise.resolve(resourceLoader.get(url));\n };\n await resolveComponentResources(resolver);\n }\n }\n\n finalize(): NgModuleRef<any> {\n // One last compile\n this.compileTypesSync();\n\n // Create the testing module itself.\n this.compileTestModule();\n\n this.applyTransitiveScopes();\n\n this.applyProviderOverrides();\n\n // Patch previously stored `styles` Component values (taken from ɵcmp), in case these\n // Components have `styleUrls` fields defined and template override was requested.\n this.patchComponentsWithExistingStyles();\n\n // Clear the componentToModuleScope map, so that future compilations don't reset the scope of\n // every component.\n this.componentToModuleScope.clear();\n\n const parentInjector = this.platform.injector;\n this.testModuleRef = new NgModuleRef(this.testModuleType, parentInjector);\n\n // ApplicationInitStatus.runInitializers() is marked @internal to core.\n // Cast it to any before accessing it.\n (this.testModuleRef.injector.get(ApplicationInitStatus) as any).runInitializers();\n\n // Set locale ID after running app initializers, since locale information might be updated while\n // running initializers. This is also consistent with the execution order while bootstrapping an\n // app (see `packages/core/src/application_ref.ts` file).\n const localeId = this.testModuleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId);\n\n return this.testModuleRef;\n }\n\n /**\n * @internal\n */\n _compileNgModuleSync(moduleType: Type<any>): void {\n this.queueTypesFromModulesArray([moduleType]);\n this.compileTypesSync();\n this.applyProviderOverrides();\n this.applyProviderOverridesInScope(moduleType);\n this.applyTransitiveScopes();\n }\n\n /**\n * @internal\n */\n async _compileNgModuleAsync(moduleType: Type<any>): Promise<void> {\n this.queueTypesFromModulesArray([moduleType]);\n await this.compileComponents();\n this.applyProviderOverrides();\n this.applyProviderOverridesInScope(moduleType);\n this.applyTransitiveScopes();\n }\n\n /**\n * @internal\n */\n _getModuleResolver(): Resolver<NgModule> {\n return this.resolvers.module;\n }\n\n /**\n * @internal\n */\n _getComponentFactories(moduleType: NgModuleType): ComponentFactory<any>[] {\n return maybeUnwrapFn(moduleType.ɵmod.declarations).reduce((factories, declaration) => {\n const componentDef = (declaration as any).ɵcmp;\n componentDef && factories.push(new ComponentFactory(componentDef, this.testModuleRef!));\n return factories;\n }, [] as ComponentFactory<any>[]);\n }\n\n private compileTypesSync(): boolean {\n // Compile all queued components, directives, pipes.\n let needsAsyncResources = false;\n this.pendingComponents.forEach(declaration => {\n needsAsyncResources = needsAsyncResources || isComponentDefPendingResolution(declaration);\n const metadata = this.resolvers.component.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Component');\n }\n this.maybeStoreNgDef(NG_COMP_DEF, declaration);\n compileComponent(declaration, metadata);\n });\n this.pendingComponents.clear();\n\n this.pendingDirectives.forEach(declaration => {\n const metadata = this.resolvers.directive.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Directive');\n }\n this.maybeStoreNgDef(NG_DIR_DEF, declaration);\n compileDirective(declaration, metadata);\n });\n this.pendingDirectives.clear();\n\n this.pendingPipes.forEach(declaration => {\n const metadata = this.resolvers.pipe.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Pipe');\n }\n this.maybeStoreNgDef(NG_PIPE_DEF, declaration);\n compilePipe(declaration, metadata);\n });\n this.pendingPipes.clear();\n\n return needsAsyncResources;\n }\n\n private applyTransitiveScopes(): void {\n if (this.overriddenModules.size > 0) {\n // Module overrides (via `TestBed.overrideModule`) might affect scopes that were previously\n // calculated and stored in `transitiveCompileScopes`. If module overrides are present,\n // collect all affected modules and reset scopes to force their re-calculation.\n const testingModuleDef = (this.testModuleType as any)[NG_MOD_DEF];\n const affectedModules = this.collectModulesAffectedByOverrides(testingModuleDef.imports);\n if (affectedModules.size > 0) {\n affectedModules.forEach(moduleType => {\n this.storeFieldOfDefOnType(moduleType as any, NG_MOD_DEF, 'transitiveCompileScopes');\n (moduleType as any)[NG_MOD_DEF].transitiveCompileScopes = null;\n });\n }\n }\n\n const moduleToScope = new Map<Type<any>|TestingModuleOverride, NgModuleTransitiveScopes>();\n const getScopeOfModule =\n (moduleType: Type<any>|TestingModuleOverride): NgModuleTransitiveScopes => {\n if (!moduleToScope.has(moduleType)) {\n const isTestingModule = isTestingModuleOverride(moduleType);\n const realType = isTestingModule ? this.testModuleType : moduleType as Type<any>;\n moduleToScope.set(moduleType, transitiveScopesFor(realType));\n }\n return moduleToScope.get(moduleType)!;\n };\n\n this.componentToModuleScope.forEach((moduleType, componentType) => {\n const moduleScope = getScopeOfModule(moduleType);\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'directiveDefs');\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'pipeDefs');\n // `tView` that is stored on component def contains information about directives and pipes\n // that are in the scope of this component. Patching component scope will cause `tView` to be\n // changed. Store original `tView` before patching scope, so the `tView` (including scope\n // information) is restored back to its previous/original state before running next test.\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'tView');\n patchComponentDefWithScope((componentType as any).ɵcmp, moduleScope);\n });\n\n this.componentToModuleScope.clear();\n }\n\n private applyProviderOverrides(): void {\n const maybeApplyOverrides = (field: string) => (type: Type<any>) => {\n const resolver = field === NG_COMP_DEF ? this.resolvers.component : this.resolvers.directive;\n const metadata = resolver.resolve(type)!;\n if (this.hasProviderOverrides(metadata.providers)) {\n this.patchDefWithProviderOverrides(type, field);\n }\n };\n this.seenComponents.forEach(maybeApplyOverrides(NG_COMP_DEF));\n this.seenDirectives.forEach(maybeApplyOverrides(NG_DIR_DEF));\n\n this.seenComponents.clear();\n this.seenDirectives.clear();\n }\n\n\n /**\n * Applies provider overrides to a given type (either an NgModule or a standalone component)\n * and all imported NgModules and standalone components recursively.\n */\n private applyProviderOverridesInScope(type: Type<any>): void {\n const hasScope = isStandaloneComponent(type) || isNgModule(type);\n\n // The function can be re-entered recursively while inspecting dependencies\n // of an NgModule or a standalone component. Exit early if we come across a\n // type that can not have a scope (directive or pipe) or the type is already\n // processed earlier.\n if (!hasScope || this.scopesWithOverriddenProviders.has(type)) {\n return;\n }\n this.scopesWithOverriddenProviders.add(type);\n\n // NOTE: the line below triggers JIT compilation of the module injector,\n // which also invokes verification of the NgModule semantics, which produces\n // detailed error messages. The fact that the code relies on this line being\n // present here is suspicious and should be refactored in a way that the line\n // below can be moved (for ex. after an early exit check below).\n const injectorDef: any = (type as any)[NG_INJ_DEF];\n\n // No provider overrides, exit early.\n if (this.providerOverridesByToken.size === 0) return;\n\n if (isStandaloneComponent(type)) {\n // Visit all component dependencies and override providers there.\n const def = getComponentDef(type);\n const dependencies = maybeUnwrapFn(def.dependencies ?? []);\n for (const dependency of dependencies) {\n this.applyProviderOverridesInScope(dependency);\n }\n } else {\n const providers: Array<Provider|InternalEnvironmentProviders> = [\n ...injectorDef.providers,\n ...(this.providerOverridesByModule.get(type as InjectorType<any>) || [])\n ];\n if (this.hasProviderOverrides(providers)) {\n this.maybeStoreNgDef(NG_INJ_DEF, type);\n\n this.storeFieldOfDefOnType(type, NG_INJ_DEF, 'providers');\n injectorDef.providers = this.getOverriddenProviders(providers);\n }\n\n // Apply provider overrides to imported modules recursively\n const moduleDef = (type as any)[NG_MOD_DEF];\n const imports = maybeUnwrapFn(moduleDef.imports);\n for (const importedModule of imports) {\n this.applyProviderOverridesInScope(importedModule);\n }\n // Also override the providers on any ModuleWithProviders imports since those don't appear in\n // the moduleDef.\n for (const importedModule of flatten(injectorDef.imports)) {\n if (isModuleWithProviders(importedModule)) {\n this.defCleanupOps.push({\n object: importedModule,\n fieldName: 'providers',\n originalValue: importedModule.providers\n });\n importedModule.providers = this.getOverriddenProviders(\n importedModule.providers as Array<Provider|InternalEnvironmentProviders>);\n }\n }\n }\n }\n\n private patchComponentsWithExistingStyles(): void {\n this.existingComponentStyles.forEach(\n (styles, type) => (type as any)[NG_COMP_DEF].styles = styles);\n this.existingComponentStyles.clear();\n }\n\n private queueTypeArray(arr: any[], moduleType: Type<any>|TestingModuleOverride): void {\n for (const value of arr) {\n if (Array.isArray(value)) {\n this.queueTypeArray(value, moduleType);\n } else {\n this.queueType(value, moduleType);\n }\n }\n }\n\n private recompileNgModule(ngModule: Type<any>, metadata: NgModule): void {\n // Cache the initial ngModuleDef as it will be overwritten.\n this.maybeStoreNgDef(NG_MOD_DEF, ngModule);\n this.maybeStoreNgDef(NG_INJ_DEF, ngModule);\n\n compileNgModuleDefs(ngModule as NgModuleType<any>, metadata);\n }\n\n private queueType(type: Type<any>, moduleType: Type<any>|TestingModuleOverride|null): void {\n const component = this.resolvers.component.resolve(type);\n if (component) {\n // Check whether a give Type has respective NG def (ɵcmp) and compile if def is\n // missing. That might happen in case a class without any Angular decorators extends another\n // class where Component/Directive/Pipe decorator is defined.\n if (isComponentDefPendingResolution(type) || !type.hasOwnProperty(NG_COMP_DEF)) {\n this.pendingComponents.add(type);\n }\n this.seenComponents.add(type);\n\n // Keep track of the module which declares this component, so later the component's scope\n // can be set correctly. If the component has already been recorded here, then one of several\n // cases is true:\n // * the module containing the component was imported multiple times (common).\n // * the component is declared in multiple modules (which is an error).\n // * the component was in 'declarations' of the testing module, and also in an imported module\n // in which case the module scope will be TestingModuleOverride.DECLARATION.\n // * overrideTemplateUsingTestingModule was called for the component in which case the module\n // scope will be TestingModuleOverride.OVERRIDE_TEMPLATE.\n //\n // If the component was previously in the testing module's 'declarations' (meaning the\n // current value is TestingModuleOverride.DECLARATION), then `moduleType` is the component's\n // real module, which was imported. This pattern is understood to mean that the component\n // should use its original scope, but that the testing module should also contain the\n // component in its scope.\n //\n // Note: standalone components have no associated NgModule, so the `moduleType` can be `null`.\n if (moduleType !== null &&\n (!this.componentToModuleScope.has(type) ||\n this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION)) {\n this.componentToModuleScope.set(type, moduleType);\n }\n return;\n }\n\n const directive = this.resolvers.directive.resolve(type);\n if (directive) {\n if (!type.hasOwnProperty(NG_DIR_DEF)) {\n this.pendingDirectives.add(type);\n }\n this.seenDirectives.add(type);\n return;\n }\n\n const pipe = this.resolvers.pipe.resolve(type);\n if (pipe && !type.hasOwnProperty(NG_PIPE_DEF)) {\n this.pendingPipes.add(type);\n return;\n }\n }\n\n private queueTypesFromModulesArray(arr: any[]): void {\n // Because we may encounter the same NgModule while processing the imports and exports of an\n // NgModule tree, we cache them in this set so we can skip ones that have already been seen\n // encountered. In some test setups, this caching resulted in 10X runtime improvement.\n const processedNgModuleDefs = new Set();\n const queueTypesFromModulesArrayRecur = (arr: any[]): void => {\n for (const value of arr) {\n if (Array.isArray(value)) {\n queueTypesFromModulesArrayRecur(value);\n } else if (hasNgModuleDef(value)) {\n const def = value.ɵmod;\n if (processedNgModuleDefs.has(def)) {\n continue;\n }\n processedNgModuleDefs.add(def);\n // Look through declarations, imports, and exports, and queue\n // everything found there.\n this.queueTypeArray(maybeUnwrapFn(def.declarations), value);\n queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.imports));\n queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.exports));\n } else if (isModuleWithProviders(value)) {\n queueTypesFromModulesArrayRecur([value.ngModule]);\n } else if (isStandaloneComponent(value)) {\n this.queueType(value, null);\n const def = getComponentDef(value);\n const dependencies = maybeUnwrapFn(def.dependencies ?? []);\n dependencies.forEach((dependency) => {\n // Note: in AOT, the `dependencies` might also contain regular\n // (NgModule-based) Component, Directive and Pipes, so we handle\n // them separately and proceed with recursive process for standalone\n // Components and NgModules only.\n if (isStandaloneComponent(dependency) || hasNgModuleDef(dependency)) {\n queueTypesFromModulesArrayRecur([dependency]);\n } else {\n this.queueType(dependency, null);\n }\n });\n }\n }\n };\n queueTypesFromModulesArrayRecur(arr);\n }\n\n // When module overrides (via `TestBed.overrideModule`) are present, it might affect all modules\n // that import (even transitively) an overridden one. For all affected modules we need to\n // recalculate their scopes for a given test run and restore original scopes at the end. The goal\n // of this function is to collect all affected modules in a set for further processing. Example:\n // if we have the following module hierarchy: A -> B -> C (where `->` means `imports`) and module\n // `C` is overridden, we consider `A` and `B` as affected, since their scopes might become\n // invalidated with the override.\n private collectModulesAffectedByOverrides(arr: any[]): Set<NgModuleType<any>> {\n const seenModules = new Set<NgModuleType<any>>();\n const affectedModules = new Set<NgModuleType<any>>();\n const calcAffectedModulesRecur = (arr: any[], path: NgModuleType<any>[]): void => {\n for (const value of arr) {\n if (Array.isArray(value)) {\n // If the value is an array, just flatten it (by invoking this function recursively),\n // keeping \"path\" the same.\n calcAffectedModulesRecur(value, path);\n } else if (hasNgModuleDef(value)) {\n if (seenModules.has(value)) {\n // If we've seen this module before and it's included into \"affected modules\" list, mark\n // the whole path that leads to that module as affected, but do not descend into its\n // imports, since we already examined them before.\n if (affectedModules.has(value)) {\n path.forEach(item => affectedModules.add(item));\n }\n continue;\n }\n seenModules.add(value);\n if (this.overriddenModules.has(value)) {\n path.forEach(item => affectedModules.add(item));\n }\n // Examine module imports recursively to look for overridden modules.\n const moduleDef = (value as any)[NG_MOD_DEF];\n calcAffectedModulesRecur(maybeUnwrapFn(moduleDef.imports), path.concat(value));\n }\n }\n };\n calcAffectedModulesRecur(arr, []);\n return affectedModules;\n }\n\n /**\n * Preserve an original def (such as ɵmod, ɵinj, etc) before applying an override.\n * Note: one class may have multiple defs (for example: ɵmod and ɵinj in case of\n * an NgModule). If there is a def in a set already, don't override it, since\n * an original one should be restored at the end of a test.\n */\n private maybeStoreNgDef(prop: string, type: Type<any>) {\n if (!this.initialNgDefs.has(type)) {\n this.initialNgDefs.set(type, new Map());\n }\n const currentDefs = this.initialNgDefs.get(type)!;\n if (!currentDefs.has(prop)) {\n const currentDef = Object.getOwnPropertyDescriptor(type, prop);\n currentDefs.set(prop, currentDef);\n }\n }\n\n private storeFieldOfDefOnType(type: Type<any>, defField: string, fieldName: string): void {\n const def: any = (type as any)[defField];\n const originalValue: any = def[fieldName];\n this.defCleanupOps.push({object: def, fieldName, originalValue});\n }\n\n /**\n * Clears current components resolution queue, but stores the state of the queue, so we can\n * restore it later. Clearing the queue is required before we try to compile components (via\n * `TestBed.compileComponents`), so that component defs are in sync with the resolution queue.\n */\n private clearComponentResolutionQueue() {\n if (this.originalComponentResolutionQueue === null) {\n this.originalComponentResolutionQueue = new Map();\n }\n clearResolutionOfComponentResourcesQueue().forEach(\n (value, key) => this.originalComponentResolutionQueue!.set(key, value));\n }\n\n /*\n * Restores component resolution queue to the previously saved state. This operation is performed\n * as a part of restoring the state after completion of the current set of tests (that might\n * potentially mutate the state).\n */\n private restoreComponentResolutionQueue() {\n if (this.originalComponentResolutionQueue !== null) {\n restoreComponentResolutionQueue(this.originalComponentResolutionQueue);\n this.originalComponentResolutionQueue = null;\n }\n }\n\n restoreOriginalState(): void {\n // Process cleanup ops in reverse order so the field's original value is restored correctly (in\n // case there were multiple overrides for the same field).\n forEachRight(this.defCleanupOps, (op: CleanupOperation) => {\n op.object[op.fieldName] = op.originalValue;\n });\n // Restore initial component/directive/pipe defs\n this.initialNgDefs.forEach(\n (defs: Map<string, PropertyDescriptor|undefined>, type: Type<any>) => {\n defs.forEach((descriptor, prop) => {\n if (!descriptor) {\n // Delete operations are generally undesirable since they have performance\n // implications on objects they were applied to. In this particular case, situations\n // where this code is invoked should be quite rare to cause any noticeable impact,\n // since it's applied only to some test cases (for example when class with no\n // annotations extends some @Component) when we need to clear 'ɵcmp' field on a given\n // class to restore its original state (before applying overrides and running tests).\n delete (type as any)[prop];\n } else {\n Object.defineProperty(type, prop, descriptor);\n }\n });\n });\n this.initialNgDefs.clear();\n this.scopesWithOverriddenProviders.clear();\n this.restoreComponentResolutionQueue();\n // Restore the locale ID to the default value, this shouldn't be necessary but we never know\n setLocaleId(DEFAULT_LOCALE_ID);\n }\n\n private compileTestModule(): void {\n class RootScopeModule {}\n compileNgModuleDefs(RootScopeModule as NgModuleType<any>, {\n providers: [...this.rootProviderOverrides],\n });\n\n const ngZone = new NgZone({enableLongStackTrace: true});\n const providers: Provider[] = [\n {provide: NgZone, useValue: ngZone},\n {provide: Compiler, useFactory: () => new R3TestCompiler(this)},\n ...this.providers,\n ...this.providerOverrides,\n ];\n const imports = [RootScopeModule, this.additionalModuleTypes, this.imports || []];\n\n // clang-format off\n compileNgModuleDefs(this.testModuleType, {\n declarations: this.declarations,\n imports,\n schemas: this.schemas,\n providers,\n }, /* allowDuplicateDeclarationsInRoot */ true);\n // clang-format on\n\n this.applyProviderOverridesInScope(this.testModuleType);\n }\n\n get injector(): Injector {\n if (this._injector !== null) {\n return this._injector;\n }\n\n const providers: Provider[] = [];\n const compilerOptions = this.platform.injector.get(COMPILER_OPTIONS);\n compilerOptions.forEach(opts => {\n if (opts.providers) {\n providers.push(opts.providers);\n }\n });\n if (this.compilerProviders !== null) {\n providers.push(...this.compilerProviders);\n }\n\n // TODO(ocombe): make this work with an Injector directly instead of creating a module for it\n class CompilerModule {}\n compileNgModuleDefs(CompilerModule as NgModuleType<any>, {providers});\n\n const CompilerModuleFactory = new R3NgModuleFactory(CompilerModule);\n this._injector = CompilerModuleFactory.create(this.platform.injector).injector;\n return this._injector;\n }\n\n // get overrides for a specific provider (if any)\n private getSingleProviderOverrides(provider: Provider): Provider|null {\n const token = getProviderToken(provider);\n return this.providerOverridesByToken.get(token) || null;\n }\n\n private getProviderOverrides(providers?: Array<Provider|InternalEnvironmentProviders>):\n Provider[] {\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n // There are two flattening operations here. The inner flattenProviders() operates on the\n // metadata's providers and applies a mapping function which retrieves overrides for each\n // incoming provider. The outer flatten() then flattens the produced overrides array. If this is\n // not done, the array can contain other empty arrays (e.g. `[[], []]`) which leak into the\n // providers array and contaminate any error messages that might be generated.\n return flatten(flattenProviders(\n providers, (provider: Provider) => this.getSingleProviderOverrides(provider) || []));\n }\n\n private getOverriddenProviders(providers?: Array<Provider|InternalEnvironmentProviders>):\n Provider[] {\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n\n const flattenedProviders = flattenProviders(providers);\n const overrides = this.getProviderOverrides(flattenedProviders);\n const overriddenProviders = [...flattenedProviders, ...overrides];\n const final: Provider[] = [];\n const seenOverriddenProviders = new Set<Provider>();\n\n // We iterate through the list of providers in reverse order to make sure provider overrides\n // take precedence over the values defined in provider list. We also filter out all providers\n // that have overrides, keeping overridden values only. This is needed, since presence of a\n // provider with `ngOnDestroy` hook will cause this hook to be registered and invoked later.\n forEachRight(overriddenProviders, (provider: any) => {\n const token: any = getProviderToken(provider);\n if (this.providerOverridesByToken.has(token)) {\n if (!seenOverriddenProviders.has(token)) {\n seenOverriddenProviders.add(token);\n // Treat all overridden providers as `{multi: false}` (even if it's a multi-provider) to\n // make sure that provided override takes highest precedence and is not combined with\n // other instances of the same multi provider.\n final.unshift({...provider, multi: false});\n }\n } else {\n final.unshift(provider);\n }\n });\n return final;\n }\n\n private hasProviderOverrides(providers?: Array<Provider|InternalEnvironmentProviders>): boolean {\n return this.getProviderOverrides(providers).length > 0;\n }\n\n private patchDefWithProviderOverrides(declaration: Type<any>, field: string): void {\n const def = (declaration as any)[field];\n if (def && def.providersResolver) {\n this.maybeStoreNgDef(field, declaration);\n\n const resolver = def.providersResolver;\n const processProvidersFn = (providers: Provider[]) => this.getOverriddenProviders(providers);\n this.storeFieldOfDefOnType(declaration, field, 'providersResolver');\n def.providersResolver = (ngDef: DirectiveDef<any>) => resolver(ngDef, processProvidersFn);\n }\n }\n}\n\nfunction initResolvers(): Resolvers {\n return {\n module: new NgModuleResolver(),\n component: new ComponentResolver(),\n directive: new DirectiveResolver(),\n pipe: new PipeResolver()\n };\n}\n\nfunction isStandaloneComponent<T>(value: Type<T>): value is ComponentType<T> {\n const def = getComponentDef(value);\n return !!def?.standalone;\n}\n\nfunction getComponentDef(value: ComponentType<unknown>): ComponentDef<unknown>;\nfunction getComponentDef(value: Type<unknown>): ComponentDef<unknown>|null;\nfunction getComponentDef(value: Type<unknown>): ComponentDef<unknown>|null {\n return (value as any).ɵcmp ?? null;\n}\n\nfunction hasNgModuleDef<T>(value: Type<T>): value is NgModuleType<T> {\n return value.hasOwnProperty('ɵmod');\n}\n\nfunction isNgModule<T>(value: Type<T>): boolean {\n return hasNgModuleDef(value);\n}\n\nfunction maybeUnwrapFn<T>(maybeFn: (() => T)|T): T {\n return maybeFn instanceof Function ? maybeFn() : maybeFn;\n}\n\nfunction flatten<T>(values: any[]): T[] {\n const out: T[] = [];\n values.forEach(value => {\n if (Array.isArray(value)) {\n out.push(...flatten<T>(value));\n } else {\n out.push(value);\n }\n });\n return out;\n}\n\nfunction identityFn<T>(value: T): T {\n return value;\n}\n\nfunction flattenProviders<T>(\n providers: Array<Provider|InternalEnvironmentProviders>, mapFn: (provider: Provider) => T): T[];\nfunction flattenProviders(providers: Array<Provider|InternalEnvironmentProviders>): Provider[];\nfunction flattenProviders(\n providers: Array<Provider|InternalEnvironmentProviders>,\n mapFn: (provider: Provider) => any = identityFn): any[] {\n const out: any[] = [];\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n out.push(...flattenProviders(provider, mapFn));\n } else {\n out.push(mapFn(provider));\n }\n }\n return out;\n}\n\nfunction getProviderField(provider: Provider, field: string) {\n return provider && typeof provider === 'object' && (provider as any)[field];\n}\n\nfunction getProviderToken(provider: Provider) {\n return getProviderField(provider, 'provide') || provider;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<any> {\n return value.hasOwnProperty('ngModule');\n}\n\nfunction forEachRight<T>(values: T[], fn: (value: T, idx: number) => void): void {\n for (let idx = values.length - 1; idx >= 0; idx--) {\n fn(values[idx], idx);\n }\n}\n\nfunction invalidTypeError(name: string, expectedType: string): Error {\n return new Error(`${name} class doesn't have @${expectedType} decorator or is missing metadata.`);\n}\n\nclass R3TestCompiler implements Compiler {\n constructor(private testBed: TestBedCompiler) {}\n\n compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n this.testBed._compileNgModuleSync(moduleType);\n return new R3NgModuleFactory(moduleType);\n }\n\n async compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n await this.testBed._compileNgModuleAsync(moduleType);\n return new R3NgModuleFactory(moduleType);\n }\n\n compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n const ngModuleFactory = this.compileModuleSync(moduleType);\n const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType<T>);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n async compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n const ngModuleFactory = await this.compileModuleAsync(moduleType);\n const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType<T>);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n clearCache(): void {}\n\n clearCacheFor(type: Type<any>): void {}\n\n getModuleId(moduleType: Type<any>): string|undefined {\n const meta = this.testBed._getModuleResolver().resolve(moduleType);\n return meta && meta.id || undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// The formatter and CI disagree on how this import statement should be formatted. Both try to keep\n// it on one line, too, which has gotten very hard to read & manage. So disable the formatter for\n// this statement only.\n\n/* clang-format off */\nimport {\n Component,\n Directive,\n EnvironmentInjector,\n InjectFlags,\n InjectionToken,\n InjectOptions,\n Injector,\n NgModule,\n NgZone,\n Pipe,\n PlatformRef,\n ProviderToken,\n Type,\n ɵconvertToBitFlags as convertToBitFlags,\n ɵflushModuleScopingQueueAsMuchAsPossible as flushModuleScopingQueueAsMuchAsPossible,\n ɵgetUnknownElementStrictMode as getUnknownElementStrictMode,\n ɵgetUnknownPropertyStrictMode as getUnknownPropertyStrictMode,\n ɵRender3ComponentFactory as ComponentFactory,\n ɵRender3NgModuleRef as NgModuleRef,\n ɵresetCompiledComponents as resetCompiledComponents,\n ɵsetAllowDuplicateNgModuleIdsForTest as setAllowDuplicateNgModuleIdsForTest,\n ɵsetUnknownElementStrictMode as setUnknownElementStrictMode,\n ɵsetUnknownPropertyStrictMode as setUnknownPropertyStrictMode,\n ɵstringify as stringify\n} from '@angular/core';\n\n/* clang-format on */\n\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, ModuleTeardownOptions, TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT, TestComponentRenderer, TestEnvironmentOptions, TestModuleMetadata, THROW_ON_UNKNOWN_ELEMENTS_DEFAULT, THROW_ON_UNKNOWN_PROPERTIES_DEFAULT} from './test_bed_common';\nimport {TestBedCompiler} from './test_bed_compiler';\n\n/**\n * Static methods implemented by the `TestBed`.\n *\n * @publicApi\n */\nexport interface TestBedStatic extends TestBed {\n new(...args: any[]): TestBed;\n}\n\n/**\n * @publicApi\n */\nexport interface TestBed {\n get platform(): PlatformRef;\n\n get ngModule(): Type<any>|Type<any>[];\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n */\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n options?: TestEnvironmentOptions): void;\n\n /**\n * Reset the providers for the test injector.\n */\n resetTestEnvironment(): void;\n\n resetTestingModule(): TestBed;\n\n configureCompiler(config: {providers?: any[], useJit?: boolean}): void;\n\n configureTestingModule(moduleDef: TestModuleMetadata): TestBed;\n\n compileComponents(): Promise<any>;\n\n inject<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions&{\n optional?: false\n }): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null|undefined, options: InjectOptions): T|null;\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n\n /**\n * Runs the given function in the `EnvironmentInjector` context of `TestBed`.\n *\n * @see EnvironmentInjector#runInContext\n */\n runInInjectionContext<T>(fn: () => T): T;\n\n execute(tokens: any[], fn: Function, context?: any): any;\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBed;\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBed;\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBed;\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBed;\n\n overrideTemplate(component: Type<any>, template: string): TestBed;\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n overrideProvider(token: any, provider: {useFactory: Function, deps: any[], multi?: boolean}):\n TestBed;\n overrideProvider(token: any, provider: {useValue: any, multi?: boolean}): TestBed;\n overrideProvider(\n token: any,\n provider: {useFactory?: Function, useValue?: any, deps?: any[], multi?: boolean}): TestBed;\n\n overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBed;\n\n createComponent<T>(component: Type<T>): ComponentFixture<T>;\n}\n\nlet _nextRootElementId = 0;\n\n/**\n * Returns a singleton of the `TestBed` class.\n *\n * @publicApi\n */\nexport function getTestBed(): TestBed {\n return TestBedImpl.INSTANCE;\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * TestBed is the primary api for writing unit tests for Angular applications and libraries.\n */\nexport class TestBedImpl implements TestBed {\n private static _INSTANCE: TestBedImpl|null = null;\n\n static get INSTANCE(): TestBedImpl {\n return TestBedImpl._INSTANCE = TestBedImpl._INSTANCE || new TestBedImpl();\n }\n\n /**\n * Teardown options that have been configured at the environment level.\n * Used as a fallback if no instance-level options have been provided.\n */\n private static _environmentTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * \"Error on unknown elements\" option that has been configured at the environment level.\n * Used as a fallback if no instance-level option has been provided.\n */\n private static _environmentErrorOnUnknownElementsOption: boolean|undefined;\n\n /**\n * \"Error on unknown properties\" option that has been configured at the environment level.\n * Used as a fallback if no instance-level option has been provided.\n */\n private static _environmentErrorOnUnknownPropertiesOption: boolean|undefined;\n\n /**\n * Teardown options that have been configured at the `TestBed` instance level.\n * These options take precedence over the environment-level ones.\n */\n private _instanceTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * \"Error on unknown elements\" option that has been configured at the `TestBed` instance level.\n * This option takes precedence over the environment-level one.\n */\n private _instanceErrorOnUnknownElementsOption: boolean|undefined;\n\n /**\n * \"Error on unknown properties\" option that has been configured at the `TestBed` instance level.\n * This option takes precedence over the environment-level one.\n */\n private _instanceErrorOnUnknownPropertiesOption: boolean|undefined;\n\n /**\n * Stores the previous \"Error on unknown elements\" option value,\n * allowing to restore it in the reset testing module logic.\n */\n private _previousErrorOnUnknownElementsOption: boolean|undefined;\n\n /**\n * Stores the previous \"Error on unknown properties\" option value,\n * allowing to restore it in the reset testing module logic.\n */\n private _previousErrorOnUnknownPropertiesOption: boolean|undefined;\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n *\n * @publicApi\n */\n static initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n options?: TestEnvironmentOptions): TestBed {\n const testBed = TestBedImpl.INSTANCE;\n testBed.initTestEnvironment(ngModule, platform, options);\n return testBed;\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n static resetTestEnvironment(): void {\n TestBedImpl.INSTANCE.resetTestEnvironment();\n }\n\n static configureCompiler(config: {providers?: any[]; useJit?: boolean;}): TestBed {\n return TestBedImpl.INSTANCE.configureCompiler(config);\n }\n\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n static configureTestingModule(moduleDef: TestModuleMetadata): TestBed {\n return TestBedImpl.INSTANCE.configureTestingModule(moduleDef);\n }\n\n /**\n * Compile components with a `templateUrl` for the test's NgModule.\n * It is necessary to call this function\n * as fetching urls is asynchronous.\n */\n static compileComponents(): Promise<any> {\n return TestBedImpl.INSTANCE.compileComponents();\n }\n\n static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBed {\n return TestBedImpl.INSTANCE.overrideModule(ngModule, override);\n }\n\n static overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBed {\n return TestBedImpl.INSTANCE.overrideComponent(component, override);\n }\n\n static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBed {\n return TestBedImpl.INSTANCE.overrideDirective(directive, override);\n }\n\n static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBed {\n return TestBedImpl.INSTANCE.overridePipe(pipe, override);\n }\n\n static overrideTemplate(component: Type<any>, template: string): TestBed {\n return TestBedImpl.INSTANCE.overrideTemplate(component, template);\n }\n\n /**\n * Overrides the template of the given component, compiling the template\n * in the context of the TestingModule.\n *\n * Note: This works for JIT and AOTed components as well.\n */\n static overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBed {\n return TestBedImpl.INSTANCE.overrideTemplateUsingTestingModule(component, template);\n }\n\n static overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): TestBed;\n static overrideProvider(token: any, provider: {useValue: any;}): TestBed;\n static overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): TestBed {\n return TestBedImpl.INSTANCE.overrideProvider(token, provider);\n }\n\n static inject<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions&{\n optional?: false\n }): T;\n static inject<T>(token: ProviderToken<T>, notFoundValue: null|undefined, options: InjectOptions):\n T|null;\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n static inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n static inject<T>(\n token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags|InjectOptions): T|null {\n return TestBedImpl.INSTANCE.inject(token, notFoundValue, convertToBitFlags(flags));\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get(\n token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return TestBedImpl.INSTANCE.inject(token, notFoundValue, flags);\n }\n\n /**\n * Runs the given function in the `EnvironmentInjector` context of `TestBed`.\n *\n * @see EnvironmentInjector#runInContext\n */\n static runInInjectionContext<T>(fn: () => T): T {\n return TestBedImpl.INSTANCE.runInInjectionContext(fn);\n }\n\n static createComponent<T>(component: Type<T>): ComponentFixture<T> {\n return TestBedImpl.INSTANCE.createComponent(component);\n }\n\n static resetTestingModule(): TestBed {\n return TestBedImpl.INSTANCE.resetTestingModule();\n }\n\n static execute(tokens: any[], fn: Function, context?: any): any {\n return TestBedImpl.INSTANCE.execute(tokens, fn, context);\n }\n\n static get platform(): PlatformRef {\n return TestBedImpl.INSTANCE.platform;\n }\n\n static get ngModule(): Type<any>|Type<any>[] {\n return TestBedImpl.INSTANCE.ngModule;\n }\n\n // Properties\n\n platform: PlatformRef = null!;\n ngModule: Type<any>|Type<any>[] = null!;\n\n private _compiler: TestBedCompiler|null = null;\n private _testModuleRef: NgModuleRef<any>|null = null;\n\n private _activeFixtures: ComponentFixture<any>[] = [];\n\n /**\n * Internal-only flag to indicate whether a module\n * scoping queue has been checked and flushed already.\n * @nodoc\n */\n globalCompilationChecked = false;\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n *\n * @publicApi\n */\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n options?: TestEnvironmentOptions): void {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n\n TestBedImpl._environmentTeardownOptions = options?.teardown;\n\n TestBedImpl._environmentErrorOnUnknownElementsOption = options?.errorOnUnknownElements;\n\n TestBedImpl._environmentErrorOnUnknownPropertiesOption = options?.errorOnUnknownProperties;\n\n this.platform = platform;\n this.ngModule = ngModule;\n this._compiler = new TestBedCompiler(this.platform, this.ngModule);\n\n // TestBed does not have an API which can reliably detect the start of a test, and thus could be\n // used to track the state of the NgModule registry and reset it correctly. Instead, when we\n // know we're in a testing scenario, we disable the check for duplicate NgModule registration\n // completely.\n setAllowDuplicateNgModuleIdsForTest(true);\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n resetTestEnvironment(): void {\n this.resetTestingModule();\n this._compiler = null;\n this.platform = null!;\n this.ngModule = null!;\n TestBedImpl._environmentTeardownOptions = undefined;\n setAllowDuplicateNgModuleIdsForTest(false);\n }\n\n resetTestingModule(): this {\n this.checkGlobalCompilationFinished();\n resetCompiledComponents();\n if (this._compiler !== null) {\n this.compiler.restoreOriginalState();\n }\n this._compiler = new TestBedCompiler(this.platform, this.ngModule);\n // Restore the previous value of the \"error on unknown elements\" option\n setUnknownElementStrictMode(\n this._previousErrorOnUnknownElementsOption ?? THROW_ON_UNKNOWN_ELEMENTS_DEFAULT);\n // Restore the previous value of the \"error on unknown properties\" option\n setUnknownPropertyStrictMode(\n this._previousErrorOnUnknownPropertiesOption ?? THROW_ON_UNKNOWN_PROPERTIES_DEFAULT);\n\n // We have to chain a couple of try/finally blocks, because each step can\n // throw errors and we don't want it to interrupt the next step and we also\n // want an error to be thrown at the end.\n try {\n this.destroyActiveFixtures();\n } finally {\n try {\n if (this.shouldTearDownTestingModule()) {\n this.tearDownTestingModule();\n }\n } finally {\n this._testModuleRef = null;\n this._instanceTeardownOptions = undefined;\n this._instanceErrorOnUnknownElementsOption = undefined;\n this._instanceErrorOnUnknownPropertiesOption = undefined;\n }\n }\n return this;\n }\n\n configureCompiler(config: {providers?: any[]; useJit?: boolean;}): this {\n if (config.useJit != null) {\n throw new Error('the Render3 compiler JiT mode is not configurable !');\n }\n\n if (config.providers !== undefined) {\n this.compiler.setCompilerProviders(config.providers);\n }\n return this;\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata): this {\n this.assertNotInstantiated('R3TestBed.configureTestingModule', 'configure the test module');\n\n // Trigger module scoping queue flush before executing other TestBed operations in a test.\n // This is needed for the first test invocation to ensure that globally declared modules have\n // their components scoped properly. See the `checkGlobalCompilationFinished` function\n // description for additional info.\n this.checkGlobalCompilationFinished();\n\n // Always re-assign the options, even if they're undefined.\n // This ensures that we don't carry them between tests.\n this._instanceTeardownOptions = moduleDef.teardown;\n this._instanceErrorOnUnknownElementsOption = moduleDef.errorOnUnknownElements;\n this._instanceErrorOnUnknownPropertiesOption = moduleDef.errorOnUnknownProperties;\n // Store the current value of the strict mode option,\n // so we can restore it later\n this._previousErrorOnUnknownElementsOption = getUnknownElementStrictMode();\n setUnknownElementStrictMode(this.shouldThrowErrorOnUnknownElements());\n this._previousErrorOnUnknownPropertiesOption = getUnknownPropertyStrictMode();\n setUnknownPropertyStrictMode(this.shouldThrowErrorOnUnknownProperties());\n this.compiler.configureTestingModule(moduleDef);\n return this;\n }\n\n compileComponents(): Promise<any> {\n return this.compiler.compileComponents();\n }\n\n inject<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions&{\n optional: true\n }): T|null;\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null, options?: InjectOptions): T|null;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /** @deprecated use object-based flags (`InjectOptions`) instead. */\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n inject<T>(token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags|InjectOptions): T\n |null {\n if (token as unknown === TestBed) {\n return this as any;\n }\n const UNDEFINED = {} as unknown as T;\n const result = this.testModuleRef.injector.get(token, UNDEFINED, convertToBitFlags(flags));\n return result === UNDEFINED ? this.compiler.injector.get(token, notFoundValue, flags) as any :\n result;\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return this.inject(token, notFoundValue, flags);\n }\n\n runInInjectionContext<T>(fn: () => T): T {\n return this.inject(EnvironmentInjector).runInContext(fn);\n }\n\n execute(tokens: any[], fn: Function, context?: any): any {\n const params = tokens.map(t => this.inject(t));\n return fn.apply(context, params);\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): this {\n this.assertNotInstantiated('overrideModule', 'override module metadata');\n this.compiler.overrideModule(ngModule, override);\n return this;\n }\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): this {\n this.assertNotInstantiated('overrideComponent', 'override component metadata');\n this.compiler.overrideComponent(component, override);\n return this;\n }\n\n overrideTemplateUsingTestingModule(component: Type<any>, template: string): this {\n this.assertNotInstantiated(\n 'R3TestBed.overrideTemplateUsingTestingModule',\n 'Cannot override template when the test module has already been instantiated');\n this.compiler.overrideTemplateUsingTestingModule(component, template);\n return this;\n }\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): this {\n this.assertNotInstantiated('overrideDirective', 'override directive metadata');\n this.compiler.overrideDirective(directive, override);\n return this;\n }\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): this {\n this.assertNotInstantiated('overridePipe', 'override pipe metadata');\n this.compiler.overridePipe(pipe, override);\n return this;\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n overrideProvider(token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}):\n this {\n this.assertNotInstantiated('overrideProvider', 'override provider');\n this.compiler.overrideProvider(token, provider);\n return this;\n }\n\n overrideTemplate(component: Type<any>, template: string): TestBed {\n return this.overrideComponent(component, {set: {template, templateUrl: null!}});\n }\n\n createComponent<T>(type: Type<T>): ComponentFixture<T> {\n const testComponentRenderer = this.inject(TestComponentRenderer);\n const rootElId = `root${_nextRootElementId++}`;\n testComponentRenderer.insertRootElement(rootElId);\n\n const componentDef = (type as any).ɵcmp;\n\n if (!componentDef) {\n throw new Error(`It looks like '${stringify(type)}' has not been compiled.`);\n }\n\n // TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]\n const noNgZone = this.inject(ComponentFixtureNoNgZone as InjectionToken<boolean>, false);\n // TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]\n const autoDetect: boolean =\n this.inject(ComponentFixtureAutoDetect as InjectionToken<boolean>, false);\n const ngZone: NgZone|null = noNgZone ? null : this.inject(NgZone, null);\n const componentFactory = new ComponentFactory(componentDef);\n const initComponent = () => {\n const componentRef =\n componentFactory.create(Injector.NULL, [], `#${rootElId}`, this.testModuleRef);\n return new ComponentFixture<any>(componentRef, ngZone, autoDetect);\n };\n const fixture = ngZone ? ngZone.run(initComponent) : initComponent();\n this._activeFixtures.push(fixture);\n return fixture;\n }\n\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n private get compiler(): TestBedCompiler {\n if (this._compiler === null) {\n throw new Error(`Need to call TestBed.initTestEnvironment() first`);\n }\n return this._compiler;\n }\n\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n private get testModuleRef(): NgModuleRef<any> {\n if (this._testModuleRef === null) {\n this._testModuleRef = this.compiler.finalize();\n }\n return this._testModuleRef;\n }\n\n private assertNotInstantiated(methodName: string, methodDescription: string) {\n if (this._testModuleRef !== null) {\n throw new Error(\n `Cannot ${methodDescription} when the test module has already been instantiated. ` +\n `Make sure you are not using \\`inject\\` before \\`${methodName}\\`.`);\n }\n }\n\n /**\n * Check whether the module scoping queue should be flushed, and flush it if needed.\n *\n * When the TestBed is reset, it clears the JIT module compilation queue, cancelling any\n * in-progress module compilation. This creates a potential hazard - the very first time the\n * TestBed is initialized (or if it's reset without being initialized), there may be pending\n * compilations of modules declared in global scope. These compilations should be finished.\n *\n * To ensure that globally declared modules have their components scoped properly, this function\n * is called whenever TestBed is initialized or reset. The _first_ time that this happens, prior\n * to any other operations, the scoping queue is flushed.\n */\n private checkGlobalCompilationFinished(): void {\n // Checking _testNgModuleRef is null should not be necessary, but is left in as an additional\n // guard that compilations queued in tests (after instantiation) are never flushed accidentally.\n if (!this.globalCompilationChecked && this._testModuleRef === null) {\n flushModuleScopingQueueAsMuchAsPossible();\n }\n this.globalCompilationChecked = true;\n }\n\n private destroyActiveFixtures(): void {\n let errorCount = 0;\n this._activeFixtures.forEach((fixture) => {\n try {\n fixture.destroy();\n } catch (e) {\n errorCount++;\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n\n if (errorCount > 0 && this.shouldRethrowTeardownErrors()) {\n throw Error(\n `${errorCount} ${(errorCount === 1 ? 'component' : 'components')} ` +\n `threw errors during cleanup`);\n }\n }\n\n shouldRethrowTeardownErrors(): boolean {\n const instanceOptions = this._instanceTeardownOptions;\n const environmentOptions = TestBedImpl._environmentTeardownOptions;\n\n // If the new teardown behavior hasn't been configured, preserve the old behavior.\n if (!instanceOptions && !environmentOptions) {\n return TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;\n }\n\n // Otherwise use the configured behavior or default to rethrowing.\n return instanceOptions?.rethrowErrors ?? environmentOptions?.rethrowErrors ??\n this.shouldTearDownTestingModule();\n }\n\n shouldThrowErrorOnUnknownElements(): boolean {\n // Check if a configuration has been provided to throw when an unknown element is found\n return this._instanceErrorOnUnknownElementsOption ??\n TestBedImpl._environmentErrorOnUnknownElementsOption ?? THROW_ON_UNKNOWN_ELEMENTS_DEFAULT;\n }\n\n shouldThrowErrorOnUnknownProperties(): boolean {\n // Check if a configuration has been provided to throw when an unknown property is found\n return this._instanceErrorOnUnknownPropertiesOption ??\n TestBedImpl._environmentErrorOnUnknownPropertiesOption ??\n THROW_ON_UNKNOWN_PROPERTIES_DEFAULT;\n }\n\n shouldTearDownTestingModule(): boolean {\n return this._instanceTeardownOptions?.destroyAfterEach ??\n TestBedImpl._environmentTeardownOptions?.destroyAfterEach ??\n TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;\n }\n\n tearDownTestingModule() {\n // If the module ref has already been destroyed, we won't be able to get a test renderer.\n if (this._testModuleRef === null) {\n return;\n }\n // Resolve the renderer ahead of time, because we want to remove the root elements as the very\n // last step, but the injector will be destroyed as a part of the module ref destruction.\n const testRenderer = this.inject(TestComponentRenderer);\n try {\n this._testModuleRef.destroy();\n } catch (e) {\n if (this.shouldRethrowTeardownErrors()) {\n throw e;\n } else {\n console.error('Error during cleanup of a testing module', {\n component: this._testModuleRef.instance,\n stacktrace: e,\n });\n }\n } finally {\n testRenderer.removeAllRootElements?.();\n }\n }\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * `TestBed` is the primary api for writing unit tests for Angular applications and libraries.\n *\n * @publicApi\n */\nexport const TestBed: TestBedStatic = TestBedImpl;\n\n/**\n * Allows injecting dependencies in `beforeEach()` and `it()`. Note: this function\n * (imported from the `@angular/core/testing` package) can **only** be used to inject dependencies\n * in tests. To inject dependencies in your application code, use the [`inject`](api/core/inject)\n * function from the `@angular/core` package instead.\n *\n * Example:\n *\n * ```\n * beforeEach(inject([Dependency, AClass], (dep, object) => {\n * // some code that uses `dep` and `object`\n * // ...\n * }));\n *\n * it('...', inject([AClass], (object) => {\n * object.doSomething();\n * expect(...);\n * })\n * ```\n *\n * @publicApi\n */\nexport function inject(tokens: any[], fn: Function): () => any {\n const testBed = TestBedImpl.INSTANCE;\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n return testBed.execute(tokens, fn, this);\n };\n}\n\n/**\n * @publicApi\n */\nexport class InjectSetupWrapper {\n constructor(private _moduleDef: () => TestModuleMetadata) {}\n\n private _addModule() {\n const moduleDef = this._moduleDef();\n if (moduleDef) {\n TestBedImpl.configureTestingModule(moduleDef);\n }\n }\n\n inject(tokens: any[], fn: Function): () => any {\n const self = this;\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n self._addModule();\n return inject(tokens, fn).call(this);\n };\n }\n}\n\n/**\n * @publicApi\n */\nexport function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;\nexport function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;\nexport function withModule(moduleDef: TestModuleMetadata, fn?: Function|null): (() => any)|\n InjectSetupWrapper {\n if (fn) {\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n const testBed = TestBedImpl.INSTANCE;\n if (moduleDef) {\n testBed.configureTestingModule(moduleDef);\n }\n return fn.apply(this);\n };\n }\n return new InjectSetupWrapper(() => moduleDef);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Public Test Library for unit testing Angular applications. Assumes that you are running\n * with Jasmine, Mocha, or a similar framework which exports a beforeEach function and\n * allows tests to be asynchronous by either returning a promise or using a 'done' parameter.\n */\n\nimport {resetFakeAsyncZone} from './fake_async';\nimport {TestBedImpl} from './test_bed';\n\ndeclare var global: any;\n\nconst _global = <any>(typeof window === 'undefined' ? global : window);\n\n// Reset the test providers and the fake async zone before each test.\nif (_global.beforeEach) {\n _global.beforeEach(getCleanupHook(false));\n}\n\n// We provide both a `beforeEach` and `afterEach`, because the updated behavior for\n// tearing down the module is supposed to run after the test so that we can associate\n// teardown errors with the correct test.\nif (_global.afterEach) {\n _global.afterEach(getCleanupHook(true));\n}\n\nfunction getCleanupHook(expectedTeardownValue: boolean) {\n return () => {\n const testBed = TestBedImpl.INSTANCE;\n if (testBed.shouldTearDownTestingModule() === expectedTeardownValue) {\n testBed.resetTestingModule();\n resetFakeAsyncZone();\n }\n };\n}\n\n/**\n * This API should be removed. But doing so seems to break `google3` and so it requires a bit of\n * investigation.\n *\n * A work around is to mark it as `@codeGenApi` for now and investigate later.\n *\n * @codeGenApi\n */\n// TODO(iminar): Remove this code in a safe way.\nexport const __core_private_testing_placeholder__ = '';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the core/testing package.\n */\n\nexport * from './async';\nexport * from './component_fixture';\nexport * from './fake_async';\nexport {TestBed, getTestBed, TestBedStatic, inject, InjectSetupWrapper, withModule} from './test_bed';\nexport {TestComponentRenderer, ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, TestModuleMetadata, TestEnvironmentOptions, ModuleTeardownOptions} from './test_bed_common';\nexport * from './test_hooks';\nexport * from './metadata_override';\nexport {MetadataOverrider as ɵMetadataOverrider} from './metadata_overrider';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <reference types=\"jasmine\" />\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["RendererFactory2","InjectionToken","_global","ViewEncapsulation","global","flatten","inject","getPipeDef","getComponentDef","INJECTOR","unusedValueExportToPlacateAjd","getNamespace","maybeUnwrapFn","policy","getPolicy","USE_VALUE","NULL_INJECTOR","ComponentRef","ComponentFactory","getComponent","ComponentFactoryResolver","AbstractComponentFactoryResolver","AbstractComponentFactory","AbstractComponentRef","NgModuleRef","NgModuleFactory","viewEngine_NgModuleRef","viewEngine_ComponentFactoryResolver","viewEngine_NgModuleFactory","defineInjectable","R3_ViewRef","R3ComponentFactory","R3ViewRef","ViewEngine_TemplateRef","ViewEngine_ElementRef","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵinvalidFactory","r3.ɵɵtemplateRefExtractor","r3.ɵɵresetView","r3.ɵɵHostDirectivesFeature","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵCopyDefinitionFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵStandaloneFeature","r3.ɵɵnextContext","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵelementContainer","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.ɵɵlistener","r3.ɵɵprojection","r3.ɵɵsyntheticHostProperty","r3.ɵɵsyntheticHostListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵhostProperty","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.ɵɵloadQuery","r3.ɵɵcontentQuery","r3.ɵɵreference","r3.ɵɵclassMap","r3.ɵɵclassMapInterpolate1","r3.ɵɵclassMapInterpolate2","r3.ɵɵclassMapInterpolate3","r3.ɵɵclassMapInterpolate4","r3.ɵɵclassMapInterpolate5","r3.ɵɵclassMapInterpolate6","r3.ɵɵclassMapInterpolate7","r3.ɵɵclassMapInterpolate8","r3.ɵɵclassMapInterpolateV","r3.ɵɵstyleMap","r3.ɵɵstyleMapInterpolate1","r3.ɵɵstyleMapInterpolate2","r3.ɵɵstyleMapInterpolate3","r3.ɵɵstyleMapInterpolate4","r3.ɵɵstyleMapInterpolate5","r3.ɵɵstyleMapInterpolate6","r3.ɵɵstyleMapInterpolate7","r3.ɵɵstyleMapInterpolate8","r3.ɵɵstyleMapInterpolateV","r3.ɵɵstyleProp","r3.ɵɵstylePropInterpolate1","r3.ɵɵstylePropInterpolate2","r3.ɵɵstylePropInterpolate3","r3.ɵɵstylePropInterpolate4","r3.ɵɵstylePropInterpolate5","r3.ɵɵstylePropInterpolate6","r3.ɵɵstylePropInterpolate7","r3.ɵɵstylePropInterpolate8","r3.ɵɵstylePropInterpolateV","r3.ɵɵclassProp","r3.ɵɵadvance","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","sanitization.ɵɵtrustConstantHtml","sanitization.ɵɵtrustConstantResourceUrl","iframe_attrs_validation.ɵɵvalidateIframeAttribute","isModuleWithProviders","isNgModule","stringify","ReflectionCapabilities","getInjectableDef","resolveForwardRef","NG_COMP_DEF","LOCALE_ID","DEFAULT_LOCALE_ID","setLocaleId","compileComponent","NG_DIR_DEF","compileDirective","NG_PIPE_DEF","compilePipe","NG_MOD_DEF","transitiveScopesFor","patchComponentDefWithScope","NG_INJ_DEF","compileNgModuleDefs","R3NgModuleFactory","isEnvironmentProviders","convertToBitFlags","Injector","InjectFlags","setAllowDuplicateNgModuleIdsForTest","resetCompiledComponents","setUnknownElementStrictMode","setUnknownPropertyStrictMode","getUnknownElementStrictMode","getUnknownPropertyStrictMode","EnvironmentInjector","flushModuleScopingQueueAsMuchAsPossible"],"mappings":";;;;;;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,YAAY,CAAC,EAAY,EAAA;AACvC,IAAA,MAAM,KAAK,GAAQ,OAAO,IAAI,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,YAAA;AACL,YAAA,OAAO,OAAO,CAAC,MAAM,CACjB,4EAA4E;AAC5E,gBAAA,yDAAyD,CAAC,CAAC;AACjE,SAAC,CAAC;AACH,KAAA;AACD,IAAA,MAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW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