blob: b56dc08460a9dafbe0a094601d53b39a17eaa8a3 [file] [log] [blame]
{"version":3,"file":"core.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../../../packages/core/src/util/decorators.ts","../../../../../packages/core/src/di/metadata.ts","../../../../../../../../packages/core/src/di/interface/injector.ts","../../../../../../../packages/core/src/util/property.ts","../../../../../../../../packages/core/src/di/interface/defs.ts","../../../../../../../packages/core/src/util/stringify.ts","../../../../../packages/core/src/di/forward_ref.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/di/injection_token.ts","../../../../../packages/core/src/di/injector_compatibility.ts","../../../../../packages/core/src/di/jit/environment.ts","../../../../../../../packages/core/src/interface/type.ts","../../../../../../../packages/core/src/reflection/reflection_capabilities.ts","../../../../../packages/core/src/di/jit/util.ts","../../../../../packages/core/src/di/jit/injectable.ts","../../../../../packages/core/src/di/util.ts","../../../../../packages/core/src/di/injectable.ts","../../../../../../../packages/core/src/util/ng_dev_mode.ts","../../../../../packages/core/src/render3/errors.ts","../../../../../packages/core/src/di/scope.ts","../../../../../packages/core/src/di/r3_injector.ts","../../../../../packages/core/src/di/injector.ts","../../../../../../../packages/core/src/util/errors.ts","../../../../../packages/core/src/di/reflective_errors.ts","../../../../../packages/core/src/di/reflective_key.ts","../../../../../../../packages/core/src/reflection/reflector.ts","../../../../../../../packages/core/src/reflection/reflection.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/metadata/di.ts","../../../../../packages/core/src/change_detection/constants.ts","../../../../../packages/core/src/metadata/resource_loading.ts","../../../../../packages/core/src/metadata/view.ts","../../../../../../../packages/core/src/util/closure.ts","../../../../../packages/core/src/render3/empty.ts","../../../../../packages/core/src/render3/fields.ts","../../../../../packages/core/src/render3/definition.ts","../../../../../packages/core/src/render3/util/misc_utils.ts","../../../../../packages/core/src/render3/interfaces/view.ts","../../../../../../../packages/core/src/util/assert.ts","../../../../../packages/core/src/render3/interfaces/container.ts","../../../../../packages/core/src/render3/interfaces/context.ts","../../../../../packages/core/src/render3/util/view_utils.ts","../../../../../packages/core/src/render3/assert.ts","../../../../../packages/core/src/render3/hooks.ts","../../../../../packages/core/src/render3/styling/state.ts","../../../../../packages/core/src/render3/state.ts","../../../../../packages/core/src/sanitization/bypass.ts","../../../../../../../packages/core/src/util/is_dev_mode.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/style_sanitizer.ts","../../../../../packages/core/src/sanitization/sanitization.ts","../../../../../packages/core/src/render3/interfaces/injector.ts","../../../../../packages/core/src/render3/node_assert.ts","../../../../../packages/core/src/render3/interfaces/renderer.ts","../../../../../packages/core/src/render3/context_discovery.ts","../../../../../packages/core/src/render3/styling/core_player_handler.ts","../../../../../packages/core/src/render3/styling/shared.ts","../../../../../packages/core/src/render3/styling/util.ts","../../../../../packages/core/src/render3/util/attrs_utils.ts","../../../../../packages/core/src/render3/util/injector_utils.ts","../../../../../packages/core/src/render3/util/view_traversal_utils.ts","../../../../../packages/core/src/render3/di.ts","../../../../../packages/core/src/errors.ts","../../../../../packages/core/src/error_handler.ts","../../../../../packages/core/src/metadata/schema.ts","../../../../../../../packages/core/src/util/named_array_type.ts","../../../../../../../packages/core/src/util/ng_reflect.ts","../../../../../packages/core/src/render3/interfaces/node.ts","../../../../../packages/core/src/render3/interfaces/projection.ts","../../../../../packages/core/src/render3/tokens.ts","../../../../../packages/core/src/render3/styling/host_instructions_queue.ts","../../../../../packages/core/src/render3/styling/player_factory.ts","../../../../../packages/core/src/render3/styling/class_and_style_bindings.ts","../../../../../packages/core/src/render3/node_selector_matcher.ts","../../../../../packages/core/src/render3/interfaces/i18n.ts","../../../../../packages/core/src/render3/styling_next/state.ts","../../../../../packages/core/src/render3/util/debug_utils.ts","../../../../../packages/core/src/render3/styling_next/util.ts","../../../../../packages/core/src/render3/styling_next/bindings.ts","../../../../../packages/core/src/render3/styling_next/map_based_bindings.ts","../../../../../packages/core/src/render3/styling_next/styling_debug.ts","../../../../../packages/core/src/render3/instructions/lview_debug.ts","../../../../../packages/core/src/render3/instructions/select.ts","../../../../../packages/core/src/render3/instructions/shared.ts","../../../../../packages/core/src/render3/node_util.ts","../../../../../packages/core/src/render3/instructions/alloc_host_vars.ts","../../../../../../../packages/core/src/util/symbol.ts","../../../../../../../packages/core/src/util/iterable.ts","../../../../../../../packages/core/src/util/comparison.ts","../../../../../packages/core/src/change_detection/change_detection_util.ts","../../../../../packages/core/src/render3/bindings.ts","../../../../../packages/core/src/render3/instructions/property.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/node_manipulation.ts","../../../../../packages/core/src/render3/instructions/container.ts","../../../../../packages/core/src/render3/instructions/storage.ts","../../../../../packages/core/src/render3/instructions/di.ts","../../../../../packages/core/src/render3/styling_next/instructions.ts","../../../../../packages/core/src/render3/instructions/styling.ts","../../../../../packages/core/src/render3/instructions/element.ts","../../../../../packages/core/src/render3/instructions/element_container.ts","../../../../../packages/core/src/render3/instructions/embedded_view.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/namespace.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/instructions/text.ts","../../../../../packages/core/src/render3/instructions/text_interpolation.ts","../../../../../packages/core/src/render3/instructions/all.ts","../../../../../packages/core/src/render3/players.ts","../../../../../packages/core/src/render3/util/discovery_utils.ts","../../../../../packages/core/src/render3/global_utils_api.ts","../../../../../packages/core/src/render3/util/global_utils.ts","../../../../../packages/core/src/render3/component.ts","../../../../../../../packages/core/src/interface/simple_change.ts","../../../../../packages/core/src/render3/features/ng_onchanges_feature.ts","../../../../../packages/core/src/render3/features/inherit_definition_feature.ts","../../../../../packages/core/src/render3/di_setup.ts","../../../../../packages/core/src/render3/features/providers_feature.ts","../../../../../packages/core/src/linker/component_factory.ts","../../../../../packages/core/src/linker/component_factory_resolver.ts","../../../../../packages/core/src/linker/ng_module_factory.ts","../../../../../packages/core/src/render3/view_ref.ts","../../../../../packages/core/src/render3/view_engine_compatibility.ts","../../../../../../../packages/core/src/util/noop.ts","../../../../../packages/core/src/linker/element_ref.ts","../../../../../packages/core/src/render/api.ts","../../../../../packages/core/src/version.ts","../../../../../packages/core/src/change_detection/differs/default_iterable_differ.ts","../../../../../packages/core/src/change_detection/differs/default_keyvalue_differ.ts","../../../../../packages/core/src/change_detection/differs/iterable_differs.ts","../../../../../packages/core/src/change_detection/differs/keyvalue_differs.ts","../../../../../packages/core/src/change_detection/change_detector_ref.ts","../../../../../packages/core/src/change_detection/change_detection.ts","../../../../../packages/core/src/linker/template_ref.ts","../../../../../packages/core/src/linker/view_container_ref.ts","../../../../../packages/core/src/view/errors.ts","../../../../../packages/core/src/view/types.ts","../../../../../packages/core/src/view/util.ts","../../../../../packages/core/src/view/ng_module.ts","../../../../../packages/core/src/view/view_attach.ts","../../../../../packages/core/src/view/refs.ts","../../../../../packages/core/src/view/provider.ts","../../../../../packages/core/src/render3/component_ref.ts","../../../../../../../packages/core/src/util/ng_i18n_closure_mode.ts","../../../../../packages/core/src/i18n/locale_data.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/util/array_utils.ts","../../../../../packages/core/src/render3/i18n.ts","../../../../../packages/core/src/linker/ng_module_factory_registration.ts","../../../../../packages/core/src/render3/ng_module_ref.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/render3/interfaces/definition.ts","../../../../../packages/core/src/render3/interfaces/query.ts","../../../../../packages/core/src/render3/query.ts","../../../../../packages/core/src/render3/view_engine_compatibility_prebound.ts","../../../../../packages/core/src/render3/index.ts","../../../../../packages/core/src/render3/jit/environment.ts","../../../../../packages/core/src/render3/jit/module.ts","../../../../../packages/core/src/render3/jit/directive.ts","../../../../../packages/core/src/render3/jit/pipe.ts","../../../../../packages/core/src/metadata/directives.ts","../../../../../packages/core/src/metadata/ng_module.ts","../../../../../packages/core/src/metadata.ts","../../../../../packages/core/src/application_init.ts","../../../../../packages/core/src/application_tokens.ts","../../../../../packages/core/src/console.ts","../../../../../packages/core/src/i18n/tokens.ts","../../../../../packages/core/src/linker/compiler.ts","../../../../../packages/core/src/profile/wtf_impl.ts","../../../../../packages/core/src/profile/profile.ts","../../../../../../../packages/core/src/util/microtask.ts","../../../../../packages/core/src/zone/ng_zone.ts","../../../../../packages/core/src/testability/testability.ts","../../../../../packages/core/src/application_ref.ts","../../../../../packages/core/src/zone.ts","../../../../../packages/core/src/render.ts","../../../../../packages/core/src/linker/ng_module_factory_loader.ts","../../../../../packages/core/src/ivy_switch.ts","../../../../../packages/core/src/linker/system_js_ng_module_factory_loader.ts","../../../../../packages/core/src/linker/view_ref.ts","../../../../../packages/core/src/linker.ts","../../../../../packages/core/src/debug/debug_node.ts","../../../../../packages/core/src/change_detection.ts","../../../../../packages/core/src/platform_core_providers.ts","../../../../../packages/core/src/application_module.ts","../../../../../packages/core/src/view/element.ts","../../../../../packages/core/src/view/query.ts","../../../../../packages/core/src/view/ng_content.ts","../../../../../packages/core/src/view/pure_expression.ts","../../../../../packages/core/src/view/text.ts","../../../../../packages/core/src/view/view.ts","../../../../../packages/core/src/view/services.ts","../../../../../packages/core/src/view/entrypoint.ts","../../../../../packages/core/src/view/index.ts","../../../../../packages/core/src/core_private_export.ts","../../../../../packages/core/src/core_render3_private_export.ts","../../../../../packages/core/src/codegen_private_exports.ts","../../../../../packages/core/src/core.ts","../../../../../packages/core/public_api.ts","../../../../../packages/core/index.ts","../../../../../packages/core/core.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void):\n {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any;} {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(...args: any[]): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n (cls as any)[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, {value: []})[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args: any[]): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ?\n (cls as any)[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n}\n\nexport function makePropDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(...args: any[]): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n const constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n (constructor as any)[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {makeParamDecorator} from '../util/decorators';\n\n\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\"\n * region=\"InjectWithoutDecorator\" linenums=\"false\"></code-example>\n */\n (token: any): any;\n new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token}));\n\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides null if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * Learn more in the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n *\n * The following code allows the possibility of a null result:\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\"\n * linenums=\"false\"></code-example>\n *\n */\n (): any;\n new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator = makeParamDecorator('Optional');\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a null result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\"\n * linenums=\"false\"></code-example>\n *\n *\n * @see `SkipSelf`\n * @see `Optional`\n *\n */\n (): any;\n new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator = makeParamDecorator('Self');\n\n\n/**\n * Type of the SkipSelf decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\"\n * linenums=\"false\"></code-example>\n *\n * Learn more in the\n * [Dependency Injection guide](guide/dependency-injection-in-action#skip).\n *\n * @see `Self`\n * @see `Optional`\n *\n */\n (): any;\n new (): SkipSelf;\n}\n\n/**\n * Type of the SkipSelf metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');\n\n/**\n * Type of the Host decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * For an extended example, see\n * [\"Dependency Injection Guide\"](guide/dependency-injection-in-action#optional).\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a null result.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\"\n * linenums=\"false\"></code-example>\n */\n (): any;\n new (): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator = makeParamDecorator('Host');\n\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Parameter decorator for a directive constructor that designates\n * a host-element attribute whose value is injected as a constant string literal.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * The following example uses the decorator to inject the string literal `text`.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata' linenums=\"false\"}\n *\n * ### Example as TypeScript Decorator\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory' linenums=\"false\"}\n *\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute whose value can be injected.\n */\n attributeName?: string;\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator =\n makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty as any) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: {[key: string]: string}, source: {[key: string]: string}) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider} from './provider';\n\n\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ɵɵInjectableDef<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any>|'root'|'any'|null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T|undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @publicApi\n */\nexport interface ɵɵInjectorDef<T> {\n factory: () => T;\n\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ngInjectableDef property for example).\n providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n\n imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has an `InjectableDef` static field.\n *\n * `InjectableDefType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ngInjectableDef: never;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorDefTypes` can be used to configure a `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ngInjectorDef: never;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n}\n\n\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown,\n providedIn?: Type<any>| 'root' | 'any' | null,\n factory: () => T,\n}): never {\n return ({\n token: opts.token, providedIn: opts.providedIn as any || null, factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDef<T>) as never;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only be generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n * create the type must be provided. If that factory function needs to inject arguments, it can\n * use the `inject` function.\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has an `ngInjectableDef` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @publicApi\n */\nexport function ɵɵdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):\n never {\n return ({\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n } as ɵɵInjectorDef<any>) as never;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited\n * value.\n *\n * @param type A type which may have its own (non-inherited) `ngInjectableDef`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {\n const def = type[NG_INJECTABLE_DEF] as ɵɵInjectableDef<T>;\n // The definition read above may come from a base class. `hasOwnProperty` is not sufficient to\n // distinguish this case, as in older browsers (e.g. IE10) static property inheritance is\n // implemented by copying the properties.\n //\n // Instead, the ngInjectableDef's token is compared to the type, and if they don't match then the\n // property was not defined directly on the type itself, and was likely inherited. The definition\n // is only returned if the type matches the def.token.\n return def && def.token === type ? def : null;\n}\n\n/**\n * Read the `ngInjectableDef` for `type` or read the `ngInjectableDef` from one of its ancestors.\n *\n * @param type A type which may have `ngInjectableDef`, via inheritance.\n *\n * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the\n * `ngInjectableDef` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {\n if (type && type[NG_INJECTABLE_DEF]) {\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in v10. Please add @Injectable() to the \"${type.name}\" class.`);\n return type[NG_INJECTABLE_DEF];\n } else {\n return null;\n }\n}\n\n/**\n * Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have `ngInjectorDef`\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;\n}\n\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\n\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n\n\n/**\n * An interface that a function passed into {@link forwardRef} has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn { (): any; }\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function() { return stringify(this()); };\n return (<Type<any>><any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n const fn: any = type;\n if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef) {\n return fn();\n } else {\n return type;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n// Not yet available in TypeScript: https://github.com/Microsoft/TypeScript/pull/29332\ndeclare var globalThis: any /** TODO #9100 */;\n\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (master)\n * - packages/core/src/render3/jit/compiler_facade_interface.ts (copy)\n *\n * Please ensure that the two files are in sync using this command:\n * ```\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/render3/jit/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade { ɵcompilerFacade: CompilerFacade; }\n\nexport interface CompilerFacade {\n compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n compileBase(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3BaseMetadataFacade):\n any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n R3ResolvedDependencyType: typeof R3ResolvedDependencyType;\n ResourceLoader: {new (): ResourceLoader};\n}\n\nexport interface CoreEnvironment { [name: string]: Function; }\n\nexport type ResourceLoader = {\n get(url: string): Promise<string>| string;\n};\n\nexport type StringMap = {\n [key: string]: string;\n};\n\nexport type StringMapWithRename = {\n [key: string]: string | [string, string];\n};\n\nexport type Provider = any;\n\nexport enum R3ResolvedDependencyType {\n Token = 0,\n Attribute = 1,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: any;\n resolved: R3ResolvedDependencyType;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n pipeName: string;\n deps: R3DependencyMetadataFacade[]|null;\n pure: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n ctorDeps: R3DependencyMetadataFacade[]|null;\n providedIn: any;\n useClass?: any;\n useFactory?: any;\n useExisting?: any;\n useValue?: any;\n userDeps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: any;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n emitInline: boolean;\n schemas: {name: string}[]|null;\n id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: any;\n deps: R3DependencyMetadataFacade[]|null;\n providers: any[];\n imports: any[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: any;\n typeArgumentCount: number;\n typeSourceSpan: ParseSourceSpan;\n deps: R3DependencyMetadataFacade[]|null;\n selector: string|null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: any[]};\n lifecycle: {usesOnChanges: boolean;};\n inputs: string[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[]|null;\n providers: Provider[]|null;\n viewQueries: R3QueryMetadataFacade[];\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: any[]|undefined;\n pipes: Map<string, any>;\n directives: {selector: string, expression: any}[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[]|null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3BaseMetadataFacade {\n name: string;\n propMetadata: {[key: string]: any[]};\n inputs?: {[key: string]: string | [string, string]};\n outputs?: {[key: string]: string};\n queries?: R3QueryMetadataFacade[];\n viewQueries?: R3QueryMetadataFacade[];\n}\n\nexport type ViewEncapsulation = number;\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: any|string[];\n descendants: boolean;\n read: any|null;\n static: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport function getCompilerFacade(): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (!globalNg || !globalNg.ɵcompilerFacade) {\n throw new Error(\n `Angular JIT compilation failed: '@angular/compiler' not loaded!\\n` +\n ` - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n` +\n ` - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n` +\n ` - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`);\n }\n return globalNg.ɵcompilerFacade;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ngInjectableDef: never|undefined;\n\n constructor(protected _desc: string, options?: {\n providedIn?: Type<any>| 'root' | null,\n factory: () => T\n }) {\n this.ngInjectableDef = undefined;\n if (typeof options == 'number') {\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.\n // We are using it to assign `-1` which is used to identify `Injector`.\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ngInjectableDef = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n toString(): string { return `InjectionToken ${this._desc}`; }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> { ngInjectableDef: never; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {getInjectableDef, ɵɵInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\n\n\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n 'INJECTOR',\n -1 as any // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n );\n\nconst _THROW_IF_NOT_FOUND = new Object();\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\nexport const USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector|undefined|null = undefined;\n\nexport function setCurrentInjector(injector: Injector | null | undefined): Injector|undefined|null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation: (<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags) => T | null)|\n undefined;\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null) | undefined):\n (<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags) => T | null)|undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>): T;\nexport function injectInjectorOnly<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|\n null;\nexport function injectInjectorOnly<T>(\n token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n if (_currentInjector === undefined) {\n throw new Error(`inject() must be called from an injection context`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n }\n}\n\n/**\n * Generated instruction: Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this instruction)\n *\n * @see inject\n * @codeGenApi\n */\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;\nexport function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|\n null {\n return (_injectImplementation || injectInjectorOnly)(token, flags);\n}\n\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns True if injection is successful, null otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport const inject = ɵɵinject;\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\nexport function injectRootLimpMode<T>(\n token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {\n const injectableDef: ɵɵInjectableDef<T>|null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throw new Error(`Injector: NOT_FOUND [${stringify(token)}]`);\n}\n\nexport function injectArgs(types: (Type<any>| InjectionToken<any>| any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n let type: Type<any>|undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {\n flags |= InjectFlags.Optional;\n } else if (\n meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n flags |= InjectFlags.SkipSelf;\n } else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n flags |= InjectFlags.Self;\n } else if (meta instanceof Inject || meta === Inject) {\n type = meta.token;\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type !, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n // reason why correctly written application should cause this exception.\n // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n // if(ngDevMode) debugger;\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n\nexport function catchInjectorError(\n e: any, token: any, injectorErrorName: string, source: string | null): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string, obj: any, injectorErrorName: string, source: string | null = null): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n let context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n ')}`;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {ɵɵinject} from '../injector_compatibility';\nimport {getInjectableDef, getInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵgetFactoryOf': getFactoryOf,\n};\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T)|null {\n const typeAny = type as any;\n const def = getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiatable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function { prototype: T; }\n\nexport interface Type<T> extends Function { new (...args: any[]): T; }\n\nexport type Mutable<T extends{[x: string]: any}, K extends string> = {\n [P in K]: T[P];\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, isType} from '../interface/type';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\nimport {stringify} from '../util/stringify';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\n\n\n/**\n * Attention: These regex has to hold even if the code is minified!\n */\nexport const DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nexport const INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\nexport const INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\nexport const INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s+super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n return DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (INHERITED_CLASS.test(typeStr) && !INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) { this._reflect = reflect || global['Reflect']; }\n\n isReflectionEnabled(): boolean { return true; }\n\n factory<T>(t: Type<T>): (args: any[]) => T { return (...args: any[]) => new t(...args); }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n } else {\n result = new Array(paramTypes.length);\n }\n\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n\n private _ownParameters(type: Type<any>, parentCtor: any): any[][]|null {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n\n // Prefer the direct API.\n if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n return (<any>type).parameters;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = (<any>type).ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters =\n typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(\n (ctorParam: any) =>\n ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return new Array((<any>type.length)).fill(undefined);\n }\n\n parameters(type: Type<any>): any[][] {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n\n private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[]|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n let annotations = (<any>typeOrFunc).annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return (typeOrFunc as any)[ANNOTATIONS];\n }\n return null;\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n\n private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]}|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).propMetadata &&\n (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata) {\n let propMetadata = (<any>typeOrFunc).propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).propDecorators &&\n (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators) {\n const propDecorators = (<any>typeOrFunc).propDecorators;\n const propMetadata = <{[key: string]: any[]}>{};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return (typeOrFunc as any)[PROP_METADATA];\n }\n return null;\n }\n\n propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata: {[key: string]: any[]} = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators: any[] = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return type instanceof Type && lcProperty in type.prototype;\n }\n\n guards(type: any): {[key: string]: any} { return {}; }\n\n getter(name: string): GetterFn { return <GetterFn>new Function('o', 'return o.' + name + ';'); }\n\n setter(name: string): SetterFn {\n return <SetterFn>new Function('o', 'v', 'return o.' + name + ' = v;');\n }\n\n method(name: string): MethodFn {\n const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n return o.${name}.apply(o, args);`;\n return <MethodFn>new Function('o', 'args', functionBody);\n }\n\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n importUri(type: any): string {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return `./${stringify(type)}`;\n }\n\n resourceUri(type: any): string { return `./${stringify(type)}`; }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return runtime;\n }\n resolveEnum(enumIdentifier: any, name: string): any { return enumIdentifier[name]; }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompilerFacade, R3DependencyMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Attribute, Host, Inject, Optional, Self, SkipSelf} from '../metadata';\n\nlet _reflect: ReflectionCapabilities|null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n const compiler = getCompilerFacade();\n return deps.map(dep => reflectDependency(compiler, dep));\n}\n\nfunction reflectDependency(compiler: CompilerFacade, dep: any | any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n host: false,\n optional: false,\n resolved: compiler.R3ResolvedDependencyType.Token,\n self: false,\n skipSelf: false,\n };\n\n function setTokenAndResolvedType(token: any): void {\n meta.resolved = compiler.R3ResolvedDependencyType.Token;\n meta.token = token;\n }\n\n if (Array.isArray(dep)) {\n if (dep.length === 0) {\n throw new Error('Dependency array must have arguments.');\n }\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n } else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || param.__proto__.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || param.__proto__.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(`Attribute name must be defined.`);\n }\n meta.token = param.attributeName;\n meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n } else {\n setTokenAndResolvedType(param);\n }\n }\n } else {\n setTokenAndResolvedType(dep);\n }\n return meta;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3InjectableMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {Injectable} from '../injectable';\nimport {NG_INJECTABLE_DEF} from '../interface/defs';\nimport {ClassSansProvider, ExistingSansProvider, FactorySansProvider, ValueProvider, ValueSansProvider} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * `ngInjectableDef` onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, srcMeta?: Injectable): void {\n let def: any = null;\n\n // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it\n if (type.hasOwnProperty(NG_INJECTABLE_DEF)) return;\n\n Object.defineProperty(type, NG_INJECTABLE_DEF, {\n get: () => {\n if (def === null) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const hasAProvider = isUseClassProvider(meta) || isUseFactoryProvider(meta) ||\n isUseValueProvider(meta) || isUseExistingProvider(meta);\n\n\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n ctorDeps: reflectDependencies(type),\n userDeps: undefined,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.userDeps = convertDependencies(meta.deps);\n }\n if (!hasAProvider) {\n // In the case the user specifies a type provider, treat it as {provide: X, useClass: X}.\n // The deps will have been reflected above, causing the factory to create the class by\n // calling\n // its constructor with injected deps.\n compilerMeta.useClass = type;\n } else if (isUseClassProvider(meta)) {\n // The user explicitly specified useClass, and may or may not have provided deps.\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n // The user explicitly specified useValue.\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n // The user explicitly specified useFactory.\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n // The user explicitly specified useExisting.\n compilerMeta.useExisting = meta.useExisting;\n } else {\n // Can't happen - either hasAProvider will be false, or one of the providers will be set.\n throw new Error(`Unreachable state.`);\n }\n def = getCompilerFacade().compileInjectable(\n angularCoreDiEnv, `ng:///${type.name}/ngInjectableDef.js`, compilerMeta);\n }\n return def;\n },\n });\n}\n\ntype UseClassProvider = Injectable & ClassSansProvider & {deps?: any[]};\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable&ValueSansProvider {\n return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable&FactorySansProvider {\n return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable&ExistingSansProvider {\n return (meta as ExistingSansProvider).useExisting !== undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ReflectionCapabilities} from '../reflection/reflection_capabilities';\nimport {getClosureSafeProperty} from '../util/property';\n\nimport {injectArgs, ɵɵinject} from './injector_compatibility';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\nconst EMPTY_ARRAY: any[] = [];\n\nexport function convertInjectableProviderToFactory(\n type: Type<any>, provider?: ValueSansProvider | ExistingSansProvider | StaticClassSansProvider |\n ConstructorSansProvider | FactorySansProvider | ClassSansProvider): () => any {\n if (!provider) {\n const reflectionCapabilities = new ReflectionCapabilities();\n const deps = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return () => new type(...injectArgs(deps as any[]));\n }\n\n if (USE_VALUE in provider) {\n const valueProvider = (provider as ValueSansProvider);\n return () => valueProvider.useValue;\n } else if ((provider as ExistingSansProvider).useExisting) {\n const existingProvider = (provider as ExistingSansProvider);\n return () => ɵɵinject(existingProvider.useExisting);\n } else if ((provider as FactorySansProvider).useFactory) {\n const factoryProvider = (provider as FactorySansProvider);\n return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n } else if ((provider as StaticClassSansProvider | ClassSansProvider).useClass) {\n const classProvider = (provider as StaticClassSansProvider | ClassSansProvider);\n let deps = (provider as StaticClassSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new classProvider.useClass(...injectArgs(deps));\n } else {\n let deps = (provider as ConstructorSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new type(...injectArgs(deps !));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\nimport {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable as render3CompileInjectable} from './jit/injectable';\nimport {convertInjectableProviderToFactory} from './util';\n\n\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider | ExistingSansProvider |\n StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n /**\n * Decorator that marks a class as available to `Injector` for creation.\n *\n * @see [Introduction to Services and DI](guide/architecture-services)\n * @see [Dependency Injection Guide](guide/dependency-injection)\n *\n * @usageNotes\n *\n * The following example shows how service classes are properly marked as\n * injectable.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"\n * linenums=\"false\"></code-example>\n *\n */\n (): TypeDecorator;\n (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): TypeDecorator;\n new (): Injectable;\n new (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n /**\n * Determines which injectors will provide the injectable,\n * by either associating it with an @NgModule or other `InjectorType`,\n * or by specifying that this injectable should be provided in the\n * 'root' injector, which will be the application-level injector in most apps.\n */\n providedIn?: Type<any>|'root'|null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n 'Injectable', undefined, undefined, undefined,\n (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));\n\n/**\n * Type representing injectable service.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> { ngInjectableDef: ɵɵInjectableDef<T>; }\n\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(\n injectableType: InjectableType<any>,\n options: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n injectableType.ngInjectableDef = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\n\nexport const SWITCH_COMPILE_INJECTABLE__POST_R3__ = render3CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE: typeof render3CompileInjectable =\n SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n const ngDevMode: null|NgDevModePerfCounters;\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstTemplatePass: number;\n tNode: number;\n tView: number;\n rendererCreateTextNode: number;\n rendererSetText: number;\n rendererCreateElement: number;\n rendererAddEventListener: number;\n rendererSetAttribute: number;\n rendererRemoveAttribute: number;\n rendererSetProperty: number;\n rendererSetClassName: number;\n rendererAddClass: number;\n rendererRemoveClass: number;\n rendererSetStyle: number;\n rendererRemoveStyle: number;\n rendererDestroy: number;\n rendererDestroyNode: number;\n rendererMoveNode: number;\n rendererRemoveNode: number;\n rendererAppendChild: number;\n rendererInsertBefore: number;\n rendererCreateComment: number;\n styleMap: number;\n styleMapCacheMiss: number;\n classMap: number;\n classMapCacheMiss: number;\n stylingProp: number;\n stylingPropCacheMiss: number;\n stylingApply: number;\n stylingApplyCacheMiss: number;\n }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters: NgDevModePerfCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstTemplatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n styleMap: 0,\n styleMapCacheMiss: 0,\n classMap: 0,\n classMapCacheMiss: 0,\n stylingProp: 0,\n stylingPropCacheMiss: 0,\n stylingApply: 0,\n stylingApplyCacheMiss: 0,\n };\n\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n\n/**\n * This checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * NOTE: changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n ngDevModeResetPerfCounters();\n}\n","\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectorType} from '../di/interface/defs';\nimport {stringify} from '../util/stringify';\n\nimport {TNode} from './interfaces/node';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: any): never {\n throw new Error(`Cannot instantiate cyclic dependency! ${token}`);\n}\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(tNode: TNode): never {\n throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean, oldValue: any, currValue: any): never|void {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n if (creationMode) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n // TODO: include debug context\n throw new Error(msg);\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: InjectorType<any>, providers?: any[], provider?: any) {\n let ngModuleDetail = '';\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n ngModuleDetail =\n ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n }\n\n throw new Error(\n `Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const APP_ROOT = new InjectionToken<boolean>(\n 'The presence of this token marks an injector as being the root injector.');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility';\nimport {InjectorType, InjectorTypeWithProviders, getInheritedInjectableDef, getInjectableDef, getInjectorDef, ɵɵInjectableDef} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {APP_ROOT} from './scope';\n\n\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\ntype SingleProvider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider |\n ExistingProvider | FactoryProvider | StaticClassProvider;\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\nconst EMPTY_ARRAY = [] as any[];\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nfunction getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: (() => T)|undefined;\n value: T|{};\n multi: any[]|undefined;\n}\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any, parent: Injector | null = null,\n additionalProviders: StaticProvider[] | null = null, name?: string): Injector {\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent, name);\n}\n\nexport class R3Injector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n */\n private records = new Map<Type<any>|InjectionToken<any>, Record<any>>();\n\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n private injectorDefTypes = new Set<InjectorType<any>>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private onDestroy = new Set<OnDestroy>();\n\n /**\n * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the\n * root scope.\n */\n private readonly isRootInjector: boolean;\n\n readonly source: string|null;\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean { return this._destroyed; }\n private _destroyed = false;\n\n constructor(\n def: InjectorType<any>, additionalProviders: StaticProvider[]|null, readonly parent: Injector,\n source: string|null = null) {\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n const dedupStack: InjectorType<any>[] = [];\n deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n\n additionalProviders && deepForEach(\n additionalProviders, provider => this.processProvider(\n provider, def, additionalProviders));\n\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n this.isRootInjector = this.records.has(APP_ROOT);\n\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(defType => this.get(defType));\n\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy(): void {\n this.assertNotDestroyed();\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n } finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }\n\n get<T>(\n token: Type<T>|InjectionToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n flags = InjectFlags.Default): T {\n this.assertNotDestroyed();\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T>|undefined = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== undefined) {\n return this.hydrate(token, record);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n return nextInjector.get(token, flags & InjectFlags.Optional ? null : notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this.records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n private assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n }\n\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n private processInjectorType(\n defOrWrappedDef: InjectorType<any>|InjectorTypeWithProviders<any>,\n parents: InjectorType<any>[],\n dedupStack: InjectorType<any>[]): defOrWrappedDef is InjectorTypeWithProviders<any> {\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef) return false;\n\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n\n // First attempt to read the ngInjectorDef.\n let def = getInjectorDef(defOrWrappedDef);\n\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n const ngModule =\n (def == null) && (defOrWrappedDef as InjectorTypeWithProviders<any>).ngModule || undefined;\n\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n const defType: InjectorType<any> =\n (ngModule === undefined) ? (defOrWrappedDef as InjectorType<any>) : ngModule;\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n throw new Error(\n `Circular dependency in DI detected for type ${defName}. Dependency path: ${parents.map(defType => stringify(defType)).join(' > ')} > ${defName}.`);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedupStack.indexOf(defType) !== -1;\n\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory, NOT_YET));\n\n // Add providers in the same way that @NgModule resolution did:\n\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n\n let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n try {\n deepForEach(def.imports, imported => {\n if (this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders === undefined) importTypesWithProviders = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n for (let i = 0; i < importTypesWithProviders.length; i++) {\n const {ngModule, providers} = importTypesWithProviders[i];\n deepForEach(\n providers !,\n provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n }\n }\n }\n\n // Next, include providers listed on the definition itself.\n const defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = defOrWrappedDef as InjectorType<any>;\n deepForEach(\n defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n }\n\n return (\n ngModule !== undefined &&\n (defOrWrappedDef as InjectorTypeWithProviders<any>).providers !== undefined);\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any =\n isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider, ngModuleType, providers);\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord !.multi !);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi !.push(provider);\n } else {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: Type<T>|InjectionToken<T>, record: Record<T>): T {\n if (record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory !();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value as T;\n }\n\n private injectableDefInScope(def: ɵɵInjectableDef<any>): boolean {\n if (!def.providedIn) {\n return false;\n } else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n } else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: Type<any>| InjectionToken<any>): () => any {\n // Most tokens will have an ngInjectableDef directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n if (injectableDef !== null) {\n return injectableDef.factory;\n }\n\n // If the token is an NgModule, it's also injectable but the factory is on its ngInjectorDef.\n const injectorDef = getInjectorDef(token);\n if (injectorDef !== null) {\n return injectorDef.factory;\n }\n\n // InjectionTokens should have an ngInjectableDef and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(`Token ${stringify(token)} is missing an ngInjectableDef definition.`);\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args: string[] = new Array(paramLength).fill('?');\n throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an ngInjectableDef\n // from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): Record<any> {\n let factory: (() => any)|undefined = providerToFactory(provider, ngModuleType, providers);\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any {\n let factory: (() => any)|undefined = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n } else {\n return injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nfunction makeRecord<T>(\n factory: (() => T) | undefined, value: T | {}, multi: boolean = false): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nfunction isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nfunction isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n\nfunction hasDeps(value: ClassProvider | ConstructorProvider | StaticClassProvider):\n value is ClassProvider&{deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return value !== null && typeof value === 'object' &&\n typeof(value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is Type<any>|InjectionToken<any> {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {INJECTOR, NG_TEMP_TOKEN_PATH, NullInjector, THROW_IF_NOT_FOUND, USE_VALUE, catchInjectorError, formatError, ɵɵinject} from './injector_compatibility';\nimport {ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {createInjector} from './r3_injector';\n\nexport function INJECTOR_IMPL__PRE_R3__(\n providers: StaticProvider[], parent: Injector | undefined, name: string) {\n return new StaticInjector(providers, parent, name);\n}\n\nexport function INJECTOR_IMPL__POST_R3__(\n providers: StaticProvider[], parent: Injector | undefined, name: string) {\n return createInjector({name: name}, parent, providers, name);\n}\n\nexport const INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n\n/**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = new NullInjector();\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use Type<T> or InjectionToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n static create(\n options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n parent?: Injector): Injector {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n } else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n }\n\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any' as any,\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = -1;\n}\n\n\n\nconst IDENT = function<T>(value: T): T {\n return value;\n};\nconst EMPTY = <any[]>[];\nconst CIRCULAR = IDENT;\nconst MULTI_PROVIDER_FN = function(): any[] {\n return Array.prototype.slice.call(arguments);\n};\n\nconst enum OptionFlags {\n Optional = 1 << 0,\n CheckSelf = 1 << 1,\n CheckParent = 1 << 2,\n Default = CheckSelf | CheckParent\n}\nconst NO_NEW_LINE = 'ɵ';\n\nexport class StaticInjector implements Injector {\n readonly parent: Injector;\n readonly source: string|null;\n\n private _records: Map<any, Record>;\n\n constructor(\n providers: StaticProvider[], parent: Injector = Injector.NULL, source: string|null = null) {\n this.parent = parent;\n this.source = source;\n const records = this._records = new Map<any, Record>();\n records.set(\n Injector, <Record>{token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n records.set(\n INJECTOR, <Record>{token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n recursivelyProcessProviders(records, providers);\n }\n\n get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags: InjectFlags = InjectFlags.Default): any {\n const record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n } catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this._records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `StaticInjector[${tokens.join(', ')}]`;\n }\n}\n\ntype SupportedProvider =\n ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider;\n\ninterface Record {\n fn: Function;\n useNew: boolean;\n deps: DependencyRecord[];\n value: any;\n}\n\ninterface DependencyRecord {\n token: any;\n options: number;\n}\n\nfunction resolveProvider(provider: SupportedProvider): Record {\n const deps = computeDeps(provider);\n let fn: Function = IDENT;\n let value: any = EMPTY;\n let useNew: boolean = false;\n let provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = (provider as ValueProvider).useValue;\n } else if ((provider as FactoryProvider).useFactory) {\n fn = (provider as FactoryProvider).useFactory;\n } else if ((provider as ExistingProvider).useExisting) {\n // Just use IDENT\n } else if ((provider as StaticClassProvider).useClass) {\n useNew = true;\n fn = resolveForwardRef((provider as StaticClassProvider).useClass);\n } else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n } else {\n throw staticError(\n 'StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable',\n provider);\n }\n return {deps, fn, useNew, value};\n}\n\nfunction multiProviderMixError(token: any) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records: Map<any, Record>, provider: StaticProvider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (let i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\n }\n } else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n } else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n let token = resolveForwardRef(provider.provide);\n const resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n let multiProvider: Record|undefined = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n } else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = <Record>{\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({token, options: OptionFlags.Default});\n }\n const record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n } else {\n throw staticError('Unexpected provider', provider);\n }\n }\n}\n\nfunction tryResolveToken(\n token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n } catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\n\nfunction resolveToken(\n token: any, record: Record | undefined, records: Map<any, Record>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n let value;\n if (record && !(flags & InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n } else if (value === EMPTY) {\n record.value = CIRCULAR;\n let obj = undefined;\n let useNew = record.useNew;\n let fn = record.fn;\n let depRecords = record.deps;\n let deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (let i = 0; i < depRecords.length; i++) {\n const depRecord: DependencyRecord = depRecords[i];\n const options = depRecord.options;\n const childRecord =\n options & OptionFlags.CheckSelf ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token,\n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord,\n // Other records we know about.\n records,\n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & OptionFlags.CheckParent) ? Injector.NULL : parent,\n options & OptionFlags.Optional ? null : Injector.THROW_IF_NOT_FOUND,\n InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new (fn as any)(...deps) : fn.apply(obj, deps);\n }\n } else if (!(flags & InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, InjectFlags.Default);\n }\n return value;\n}\n\nfunction computeDeps(provider: StaticProvider): DependencyRecord[] {\n let deps: DependencyRecord[] = EMPTY;\n const providerDeps: any[] =\n (provider as ExistingProvider & StaticClassProvider & ConstructorProvider).deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (let i = 0; i < providerDeps.length; i++) {\n let options = OptionFlags.Default;\n let token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (let j = 0, annotations = token; j < annotations.length; j++) {\n const annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | OptionFlags.Optional;\n } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~OptionFlags.CheckSelf;\n } else if (annotation instanceof Self || annotation == Self) {\n options = options & ~OptionFlags.CheckParent;\n } else if (annotation instanceof Inject) {\n token = (annotation as Inject).token;\n } else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({token, options});\n }\n } else if ((provider as ExistingProvider).useExisting) {\n const token = resolveForwardRef((provider as ExistingProvider).useExisting);\n deps = [{token, options: OptionFlags.Default}];\n } else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\n\nfunction staticError(text: string, obj: any): Error {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const ERROR_TYPE = 'ngType';\nexport const ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nexport const ERROR_LOGGER = 'ngErrorLogger';\n\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg =\n `${message} caused by: ${originalError instanceof Error ? originalError.message: originalError }`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ERROR_ORIGINAL_ERROR, wrappedError} from '../util/errors';\nimport {stringify} from '../util/stringify';\n\nimport {ReflectiveInjector} from './reflective_injector';\nimport {ReflectiveKey} from './reflective_key';\n\nfunction findFirstClosedCycle(keys: any[]): any[] {\n const res: any[] = [];\n for (let i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\n\nfunction constructResolvingPath(keys: any[]): string {\n if (keys.length > 1) {\n const reversed = findFirstClosedCycle(keys.slice().reverse());\n const tokenStrs = reversed.map(k => stringify(k.token));\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n\n return '';\n}\n\nexport interface InjectionError extends Error {\n keys: ReflectiveKey[];\n injectors: ReflectiveInjector[];\n constructResolvingMessage: (keys: ReflectiveKey[]) => string;\n addKey(injector: ReflectiveInjector, key: ReflectiveKey): void;\n}\n\nfunction injectionError(\n injector: ReflectiveInjector, key: ReflectiveKey,\n constructResolvingMessage: (keys: ReflectiveKey[]) => string,\n originalError?: Error): InjectionError {\n const keys = [key];\n const errMsg = constructResolvingMessage(keys);\n const error =\n (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError;\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nfunction addKey(this: InjectionError, injector: ReflectiveInjector, key: ReflectiveKey): void {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nexport function noProviderError(injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `No provider for ${first}!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nexport function cyclicDependencyError(\n injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nexport function instantiationError(\n injector: ReflectiveInjector, originalException: any, originalStack: any,\n key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n }, originalException);\n}\n\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nexport function invalidProviderError(provider: any) {\n return Error(\n `Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nexport function noAnnotationError(typeOrFunc: Type<any>| Function, params: any[][]): Error {\n const signature: string[] = [];\n for (let i = 0, ii = params.length; i < ii; i++) {\n const parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n } else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error(\n 'Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nexport function outOfBoundsError(index: number) {\n return Error(`Index ${index} is out-of-bounds.`);\n}\n\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nexport function mixingMultiProvidersWithRegularProvidersError(\n provider1: any, provider2: any): Error {\n return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {stringify} from '../util/stringify';\nimport {resolveForwardRef} from './forward_ref';\n\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nexport class ReflectiveKey {\n public readonly displayName: string;\n /**\n * Private\n */\n constructor(public token: Object, public id: number) {\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n\n /**\n * Retrieves a `Key` for a token.\n */\n static get(token: Object): ReflectiveKey {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n }\n\n /**\n * @returns the number of keys registered in the system.\n */\n static get numberOfKeys(): number { return _globalKeyRegistry.numberOfKeys; }\n}\n\nexport class KeyRegistry {\n private _allKeys = new Map<Object, ReflectiveKey>();\n\n get(token: Object): ReflectiveKey {\n if (token instanceof ReflectiveKey) return token;\n\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token) !;\n }\n\n const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n }\n\n get numberOfKeys(): number { return this._allKeys.size; }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\nexport {PlatformReflectionCapabilities};\nexport {GetterFn, MethodFn, SetterFn};\n\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nexport class Reflector {\n constructor(public reflectionCapabilities: PlatformReflectionCapabilities) {}\n\n updateCapabilities(caps: PlatformReflectionCapabilities) { this.reflectionCapabilities = caps; }\n\n factory(type: Type<any>): Function { return this.reflectionCapabilities.factory(type); }\n\n parameters(typeOrFunc: Type<any>): any[][] {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n }\n\n propMetadata(typeOrFunc: Type<any>): {[key: string]: any[]} {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n }\n\n getter(name: string): GetterFn { return this.reflectionCapabilities.getter(name); }\n\n setter(name: string): SetterFn { return this.reflectionCapabilities.setter(name); }\n\n method(name: string): MethodFn { return this.reflectionCapabilities.method(name); }\n\n importUri(type: any): string { return this.reflectionCapabilities.importUri(type); }\n\n resourceUri(type: any): string { return this.reflectionCapabilities.resourceUri(type); }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n }\n\n resolveEnum(identifier: any, name: string): any {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ReflectionCapabilities} from './reflection_capabilities';\nimport {Reflector} from './reflector';\n\nexport {Reflector} from './reflector';\n\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nexport const reflector = new Reflector(new ReflectionCapabilities());\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {reflector} from '../reflection/reflection';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {invalidProviderError, mixingMultiProvidersWithRegularProvidersError, noAnnotationError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\n\n\ninterface NormalizedProvider extends TypeProvider, ValueProvider, ClassProvider, ExistingProvider,\n FactoryProvider {}\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nexport class ReflectiveDependency {\n constructor(\n public key: ReflectiveKey, public optional: boolean, public visibility: Self|SkipSelf|null) {}\n\n static fromKey(key: ReflectiveKey): ReflectiveDependency {\n return new ReflectiveDependency(key, false, null);\n }\n}\n\nconst _EMPTY_LIST: any[] = [];\n\n/**\n * An internal resolved representation of a `Provider` used by the `Injector`.\n *\n * @usageNotes\n * This is usually created automatically by `Injector.resolveAndCreate`.\n *\n * It can be created manually, as follows:\n *\n * ### Example\n *\n * ```typescript\n * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);\n * var injector = Injector.fromResolvedProviders(resolvedProviders);\n *\n * expect(injector.get('message')).toEqual('Hello');\n * ```\n *\n * @publicApi\n */\nexport interface ResolvedReflectiveProvider {\n /**\n * A key, usually a `Type<any>`.\n */\n key: ReflectiveKey;\n\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n resolvedFactories: ResolvedReflectiveFactory[];\n\n /**\n * Indicates if the provider is a multi-provider or a regular provider.\n */\n multiProvider: boolean;\n}\n\nexport class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {\n readonly resolvedFactory: ResolvedReflectiveFactory;\n\n constructor(\n public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],\n public multiProvider: boolean) {\n this.resolvedFactory = this.resolvedFactories[0];\n }\n}\n\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nexport class ResolvedReflectiveFactory {\n constructor(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n public factory: Function,\n\n /**\n * Arguments (dependencies) to the `factory` function.\n */\n public dependencies: ReflectiveDependency[]) {}\n}\n\n\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider: NormalizedProvider): ResolvedReflectiveFactory {\n let factoryFn: Function;\n let resolvedDeps: ReflectiveDependency[];\n if (provider.useClass) {\n const useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n } else if (provider.useExisting) {\n factoryFn = (aliasInstance: any) => aliasInstance;\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n } else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n } else {\n factoryFn = () => provider.useValue;\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider: NormalizedProvider): ResolvedReflectiveProvider {\n return new ResolvedReflectiveProvider_(\n ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)],\n provider.multi || false);\n}\n\n/**\n * Resolve a list of Providers.\n */\nexport function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[] {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nexport function mergeResolvedReflectiveProviders(\n providers: ResolvedReflectiveProvider[],\n normalizedProvidersMap: Map<number, ResolvedReflectiveProvider>):\n Map<number, ResolvedReflectiveProvider> {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider: ResolvedReflectiveProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(\n provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(providers: Provider[], res: Provider[]): Provider[] {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({provide: b, useClass: b});\n\n } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n res.push(b as NormalizedProvider);\n\n } else if (b instanceof Array) {\n _normalizeProviders(b, res);\n\n } else {\n throw invalidProviderError(b);\n }\n });\n\n return res;\n}\n\nexport function constructDependencies(\n typeOrFunc: any, dependencies?: any[]): ReflectiveDependency[] {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n } else {\n const params: any[][] = dependencies.map(t => [t]);\n return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n }\n}\n\nfunction _dependenciesFor(typeOrFunc: any): ReflectiveDependency[] {\n const params = reflector.parameters(typeOrFunc);\n\n if (!params) return [];\n if (params.some(p => p == null)) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(p => _extractToken(typeOrFunc, p, params));\n}\n\nfunction _extractToken(\n typeOrFunc: any, metadata: any[] | any, params: any[][]): ReflectiveDependency {\n let token: any = null;\n let optional = false;\n\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n } else {\n return _createDependency(metadata, optional, null);\n }\n }\n\n let visibility: Self|SkipSelf|null = null;\n\n for (let i = 0; i < metadata.length; ++i) {\n const paramMetadata = metadata[i];\n\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n\n } else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n\n } else if (paramMetadata instanceof Optional) {\n optional = true;\n\n } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n } else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n\n token = resolveForwardRef(token);\n\n if (token != null) {\n return _createDependency(token, optional, visibility);\n } else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\n\nfunction _createDependency(\n token: any, optional: boolean, visibility: Self | SkipSelf | null): ReflectiveDependency {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\nimport {Provider} from './interface/provider';\nimport {Self, SkipSelf} from './metadata';\nimport {cyclicDependencyError, instantiationError, noProviderError, outOfBoundsError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\nimport {ReflectiveDependency, ResolvedReflectiveFactory, ResolvedReflectiveProvider, resolveReflectiveProviders} from './reflective_provider';\n\n\n// Threshold for the dynamic version\nconst UNDEFINED = new Object();\n\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nexport abstract class ReflectiveInjector implements Injector {\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n static resolve(providers: Provider[]): ResolvedReflectiveProvider[] {\n return resolveReflectiveProviders(providers);\n }\n\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n }\n\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):\n ReflectiveInjector {\n return new ReflectiveInjector_(providers, parent);\n }\n\n\n /**\n * Parent of this injector.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n */\n abstract get parent(): Injector|null;\n\n /**\n * Resolves an array of providers and creates a child injector from those providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);\n * var child = parent.resolveAndCreateChild([ChildProvider]);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;\n\n /**\n * Creates a child injector from previously resolved providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);\n * var childProviders = ReflectiveInjector.resolve([ChildProvider]);\n *\n * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);\n * var child = parent.createChildFromResolved(childProviders);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;\n\n /**\n * Resolves a provider and instantiates an object in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n *\n * var car = injector.resolveAndInstantiate(Car);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.resolveAndInstantiate(Car));\n * ```\n */\n abstract resolveAndInstantiate(provider: Provider): any;\n\n /**\n * Instantiates an object using a resolved provider in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n * var carProvider = ReflectiveInjector.resolve([Car])[0];\n * var car = injector.instantiateResolved(carProvider);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.instantiateResolved(carProvider));\n * ```\n */\n abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;\n\n abstract get(token: any, notFoundValue?: any): any;\n}\n\nexport class ReflectiveInjector_ implements ReflectiveInjector {\n private static INJECTOR_KEY = ReflectiveKey.get(Injector);\n /** @internal */\n _constructionCounter: number = 0;\n /** @internal */\n public _providers: ResolvedReflectiveProvider[];\n public readonly parent: Injector|null;\n\n keyIds: number[];\n objs: any[];\n /**\n * Private\n */\n constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector) {\n this._providers = _providers;\n this.parent = _parent || null;\n\n const len = _providers.length;\n\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n\n for (let i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n }\n\n resolveAndCreateChild(providers: Provider[]): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n }\n\n createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {\n const inj = new ReflectiveInjector_(providers);\n (inj as{parent: Injector | null}).parent = this;\n return inj;\n }\n\n resolveAndInstantiate(provider: Provider): any {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n }\n\n instantiateResolved(provider: ResolvedReflectiveProvider): any {\n return this._instantiateProvider(provider);\n }\n\n getProviderAtIndex(index: number): ResolvedReflectiveProvider {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n }\n\n /** @internal */\n _new(provider: ResolvedReflectiveProvider): any {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n }\n\n private _getMaxNumberOfObjects(): number { return this.objs.length; }\n\n private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n if (provider.multiProvider) {\n const res = new Array(provider.resolvedFactories.length);\n for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n } else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n }\n\n private _instantiate(\n provider: ResolvedReflectiveProvider,\n ResolvedReflectiveFactory: ResolvedReflectiveFactory): any {\n const factory = ResolvedReflectiveFactory.factory;\n\n let deps: any[];\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n } catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n\n let obj: any;\n try {\n obj = factory(...deps);\n } catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n\n return obj;\n }\n\n private _getByReflectiveDependency(dep: ReflectiveDependency): any {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n }\n\n private _getByKey(key: ReflectiveKey, visibility: Self|SkipSelf|null, notFoundValue: any): any {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n\n } else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n }\n\n private _getObjByKeyId(keyId: number): any {\n for (let i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n\n return this.objs[i];\n }\n }\n\n return UNDEFINED;\n }\n\n /** @internal */\n _throwOrNull(key: ReflectiveKey, notFoundValue: any): any {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n } else {\n throw noProviderError(this, key);\n }\n }\n\n /** @internal */\n _getByKeySelf(key: ReflectiveKey, notFoundValue: any): any {\n const obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n }\n\n /** @internal */\n _getByKeyDefault(key: ReflectiveKey, notFoundValue: any, visibility: Self|SkipSelf|null): any {\n let inj: Injector|null;\n\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n } else {\n inj = this;\n }\n\n while (inj instanceof ReflectiveInjector_) {\n const inj_ = <ReflectiveInjector_>inj;\n const obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED) return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n } else {\n return this._throwOrNull(key, notFoundValue);\n }\n }\n\n get displayName(): string {\n const providers =\n _mapProviders(this, (b: ResolvedReflectiveProvider) => ' \"' + b.key.displayName + '\" ')\n .join(', ');\n return `ReflectiveInjector(providers: [${providers}])`;\n }\n\n toString(): string { return this.displayName; }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n const res: any[] = new Array(injector._providers.length);\n for (let i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 {ɵɵinject, inject, INJECTOR} from './injector_compatibility';\nexport {ReflectiveInjector} from './reflective_injector';\nexport {ClassProvider, ClassSansProvider, ConstructorProvider, 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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This file 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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {Type} from '../interface/type';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n */\nexport const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` as in the following example.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'\n * linenums=\"false\"}\n *\n * @publicApi\n */\n (name: string): any;\n new (name: string): Attribute;\n}\n\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute to be injected into the constructor.\n */\n attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n descendants: boolean;\n first: boolean;\n read: any;\n isViewQuery: boolean;\n selector: any;\n static: boolean;\n}\n\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see `ContentChildren`.\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n /**\n * Parameter decorator that configures a content query.\n *\n * Use to get the `QueryList` of elements or directives from the content DOM.\n * Any time a child element is added, removed, or moved, the query list will be\n * updated, and the changes observable of the query list will emit a new value.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - True to include all descendants, otherwise include only direct children.\n * * **read** - True to read a different token from the queried elements.\n *\n * @usageNotes\n *\n * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n *\n * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Tab-pane example\n *\n * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n * can be used to implement a tab pane component.\n *\n * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): any;\n new (selector: Type<any>|Function|string, opts?: {descendants?: boolean, read?: any}): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n 'ContentChildren',\n (selector?: any, data: any = {}) =>\n ({selector, first: false, isViewQuery: false, descendants: false, ...data}),\n Query);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n /**\n * Parameter decorator that configures a content query.\n *\n * Use to get the first element or the directive matching the selector from the content DOM.\n * If the content DOM changes, and a new child matches the selector,\n * the property will be updated.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried element.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection.\n *\n * When `static` is not provided, uses the query results to determine the timing of query\n * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n * resolved after change detection runs. Otherwise, it is resolved before change detection\n * runs.\n *\n * @usageNotes\n *\n * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Example\n *\n * {@example core/di/ts/contentChild/content_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n 'ContentChild', (selector?: any, data: any = {}) =>\n ({selector, first: true, isViewQuery: false, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see `ViewChildren`.\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n /**\n * Parameter decorator that configures a view query.\n *\n * Use to get the `QueryList` of elements or directives from the view DOM.\n * Any time a child element is added, removed, or moved, the query list will be updated,\n * and the changes observable of the query list will emit a new value.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried elements.\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Another example\n *\n * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts?: {read?: any}): any;\n new (selector: Type<any>|Function|string, opts?: {read?: any}): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n 'ViewChildren', (selector?: any, data: any = {}) =>\n ({selector, first: false, isViewQuery: true, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see `ViewChild`.\n * @publicApi\n */\nexport interface ViewChildDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n * The change detector looks for the first element or the directive matching the selector\n * in the view DOM. If the view DOM changes, and a new child matches the selector,\n * the property is updated.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - True to read a different token from the queried elements.\n * * **static** - True to resolve query results before change detection runs\n *\n * When `static` is not provided, uses query results to determine the timing of query\n * resolution. If any query results are inside a nested view (such as `*ngIf`), the query is\n * resolved after change detection runs. Otherwise, it is resolved before change detection\n * runs.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n * template;`)\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * ### Example 2\n *\n * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'\n * linenums=\"false\"}\n *\n * ### Example 3\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'\n * linenums=\"false\"}\n *\n * @Annotation\n */\n (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;\n new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n 'ViewChild', (selector: any, data: any) =>\n ({selector, first: true, isViewQuery: true, descendants: true, ...data}),\n Query);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\n}\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nexport enum ChangeDetectorStatus {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n CheckOnce,\n\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n Checked,\n\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n CheckAlways,\n\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n Detached,\n\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n Errored,\n\n /**\n * Indicates that the change detector has been destroyed.\n */\n Destroyed,\n}\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n boolean {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ngComponentDef for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string | {text(): Promise<string>}): string|Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n Emulated = 0,\n /**\n * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using the deprecated [Shadow DOM\n * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n Native = 1,\n /**\n * Don't provide any template or style encapsulation.\n */\n None = 2,\n\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ShadowDom = 3\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects(fn: () => void): string {\n return '' + {toString: fn};\n}","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport '../util/ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: {} = {};\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMPONENT_DEF = getClosureSafeProperty({ngComponentDef: getClosureSafeProperty});\nexport const NG_DIRECTIVE_DEF = getClosureSafeProperty({ngDirectiveDef: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ngPipeDef: getClosureSafeProperty});\nexport const NG_MODULE_DEF = getClosureSafeProperty({ngModuleDef: getClosureSafeProperty});\nexport const NG_LOCALE_ID_DEF = getClosureSafeProperty({ngLocaleIdDef: getClosureSafeProperty});\nexport const NG_BASE_DEF = getClosureSafeProperty({ngBaseDef: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {NG_INJECTABLE_DEF, ɵɵdefineInjectable} from '../di/interface/defs';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {stringify} from '../util/stringify';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from './empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_LOCALE_ID_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ɵɵBaseDef} from './interfaces/definition';\n// while SelectorFlags is unused here, it's required so that types don't get resolved lazily\n// see: https://github.com/Microsoft/web-build-tools/issues/1050\nimport {CssSelectorList, SelectorFlags} from './interfaces/projection';\n\nlet _renderCompCount = 0;\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(componentDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this component. */\n selectors: CssSelectorList;\n\n /**\n * Factory method used to create an instance of directive.\n */\n factory: FactoryFn<T>;\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n consts: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['public', 'declared']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instruction to be inserted into the template function.\n *\n * Query-related instructions need to be pulled out to a specific function as a timing of\n * execution is different as compared to all other instructions (after change detection hooks but\n * before view hooks).\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives and components that may be found in this component's view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directives?: DirectiveTypesOrFactory | null;\n\n /**\n * Registry of pipes that may be found in this component's view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipes?: PipeTypesOrFactory | null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}): never {\n const type = componentDefinition.type;\n const typePrototype = type.prototype;\n const declaredInputs: {[key: string]: string} = {} as any;\n const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n type: type,\n providersResolver: null,\n consts: componentDefinition.consts,\n vars: componentDefinition.vars,\n factory: componentDefinition.factory,\n template: componentDefinition.template || null !,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null !, // assigned in noSideEffects\n outputs: null !, // assigned in noSideEffects\n exportAs: componentDefinition.exportAs || null,\n onChanges: null,\n onInit: typePrototype.ngOnInit || null,\n doCheck: typePrototype.ngDoCheck || null,\n afterContentInit: typePrototype.ngAfterContentInit || null,\n afterContentChecked: typePrototype.ngAfterContentChecked || null,\n afterViewInit: typePrototype.ngAfterViewInit || null,\n afterViewChecked: typePrototype.ngAfterViewChecked || null,\n onDestroy: typePrototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null !, // assigned in noSideEffects\n pipeDefs: null !, // assigned in noSideEffects\n selectors: componentDefinition.selectors,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the\n // next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null as never,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n def._ = noSideEffects(() => {\n const directiveTypes = componentDefinition.directives !;\n const feature = componentDefinition.features;\n const pipeTypes = componentDefinition.pipes !;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = directiveTypes ?\n () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef) :\n null;\n def.pipeDefs = pipeTypes ?\n () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n null;\n\n // Add ngInjectableDef so components are reachable through the module injector by default\n // (unless it has already been set by the @Injectable decorator). This is mostly to\n // support injecting components in tests. In real application code, components should\n // be retrieved through the node injector, so this isn't a problem.\n if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {\n (type as any)[NG_INJECTABLE_DEF] =\n ɵɵdefineInjectable<T>({token: type, factory: componentDefinition.factory as() => T});\n }\n }) as never;\n\n return def as never;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {\n const def = (type.ngComponentDef as ComponentDef<any>);\n def.directiveDefs = () => directives.map(extractDirectiveDef);\n def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nexport function extractDirectiveDef(type: DirectiveType<any>& ComponentType<any>):\n DirectiveDef<any>|ComponentDef<any> {\n const def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n }\n return def !;\n}\n\nexport function extractPipeDef(type: PipeType<any>): PipeDef<any> {\n const def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is not a 'PipeType'.`);\n }\n return def !;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): never {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res as never;\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: {\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n}): void {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n }) as never;\n}\n\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject<T>(\n obj?: {[P in keyof T]?: string | [string, string]},\n secondary?: {[key: string]: string}): {[P in keyof T]: string} {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName: string|[string, string] = obj[minifiedKey] !;\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName as string);\n }\n }\n }\n return newLookup;\n}\n\n/**\n * Create a base definition\n *\n * # Example\n * ```ts\n * class ShouldBeInherited {\n * static ngBaseDef = ɵɵdefineBase({\n * ...\n * })\n * }\n * ```\n *\n * @param baseDefinition The base definition parameters\n *\n * @codeGenApi\n */\nexport function ɵɵdefineBase<T>(baseDefinition: {\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `outputs`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>| null;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Function executed by the parent template to allow children to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n}): ɵɵBaseDef<T> {\n const declaredInputs: {[P in keyof T]: string} = {} as any;\n return {\n inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),\n declaredInputs: declaredInputs,\n outputs: invertObject<T>(baseDefinition.outputs as any),\n viewQuery: baseDefinition.viewQuery || null,\n contentQueries: baseDefinition.contentQueries || null,\n hostBindings: baseDefinition.hostBindings || null\n };\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngDirectiveDef = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵdefineDirective = ɵɵdefineComponent as any as<T>(directiveDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors: CssSelectorList;\n\n /**\n * Factory method used to create an instance of directive.\n */\n factory: FactoryFn<T>;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n}) => never;\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string,\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>,\n\n /** A factory for creating a pipe instance. */\n factory: FactoryFn<T>,\n\n /** Whether the pipe is pure. */\n pure?: boolean\n}): never {\n return (<PipeDef<T>>{\n name: pipeDef.name,\n factory: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n }) as never;\n}\n\n/**\n * The following getter methods retrieve the definition form the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T>|null {\n return (type as any)[NG_COMPONENT_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n return (type as any)[NG_DIRECTIVE_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n return (type as any)[NG_PIPE_DEF] || null;\n}\n\nexport function getBaseDef<T>(type: any): ɵɵBaseDef<T>|null {\n return (type as any)[NG_BASE_DEF] || null;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T>|null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T>|null {\n const ngModuleDef = (type as any)[NG_MODULE_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ngModuleDef' property.`);\n }\n return ngModuleDef;\n}\n\nexport function getNgLocaleIdDef(type: any): string|null {\n return (type as any)[NG_LOCALE_ID_DEF] || null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from '../../util/global';\nimport {RElement} from '../interfaces/renderer';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Returns whether the values are different from a change detection stand point.\n *\n * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.\n */\nexport function isDifferent(a: any, b: any): boolean {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n}\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n return '' + value;\n}\n\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n\n\nexport const defaultScheduler =\n (() =>\n (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only\n setTimeout // everything else\n ).bind(global))();\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {\n return {name: 'window', target: element.ownerDocument.defaultView};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {\n return {name: 'document', target: element.ownerDocument};\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {\n return {name: 'body', target: element.ownerDocument.body};\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Determines whether or not the given string is a property metadata string.\n * See storeBindingMetadata().\n */\nexport function isPropMetadataString(str: string): boolean {\n return str.indexOf(INTERPOLATION_DELIMITER) >= 0;\n}\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T | (() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\nimport {Injector} from '../../di/injector';\nimport {Type} from '../../interface/type';\nimport {QueryList} from '../../linker';\nimport {SchemaMetadata} from '../../metadata';\nimport {Sanitizer} from '../../sanitization/security';\n\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n} from './i18n';\nimport {TElementNode, TNode, TViewNode} from './node';\nimport {PlayerHandler} from './player';\nimport {LQueries} from './query';\nimport {RElement, Renderer3, RendererFactory3} from './renderer';\nimport {StylingContext} from './styling';\n\n\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const QUERIES = 5;\nexport const T_HOST = 6;\nexport const BINDING_INDEX = 7;\nexport const CLEANUP = 8;\nexport const CONTEXT = 9;\nexport const INJECTOR = 10;\nexport const RENDERER_FACTORY = 11;\nexport const RENDERER = 12;\nexport const SANITIZER = 13;\nexport const CHILD_HEAD = 14;\nexport const CHILD_TAIL = 15;\nexport const CONTENT_QUERIES = 16;\nexport const DECLARATION_VIEW = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\n/** Size of LView's header. Necessary to adjust for it when setting slots. */\nexport const HEADER_OFFSET = 20;\n\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView extends Array<any> {\n /**\n * The host node for this LView instance, if this is a component view.\n *\n * If this is an embedded view, HOST will be null.\n *\n * If the component uses host bindings for styling that the `RElement` will be wrapped with\n * `StylingContext`.\n */\n [HOST]: RElement|StylingContext|null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly[TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView|LContainer|null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView|LContainer|null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries|null;\n\n /**\n * Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.\n *\n * If `TViewNode`, this is an embedded view of a container. We need this to be able to\n * efficiently find the `LViewNode` when inserting the view into an anchor.\n *\n * If `TElementNode`, this is the LView of a component.\n *\n * If null, this is the root view of an application (root component is in this view).\n */\n [T_HOST]: TViewNode|TElementNode|null;\n\n /**\n * The binding index we should access next.\n *\n * This is stored so that bindings can continue where they left off\n * if a view is left midway through processing bindings (e.g. if there is\n * a setter that creates an embedded view, like in ngIf).\n */\n [BINDING_INDEX]: number;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n */\n // TODO: flatten into LView[]\n [CLEANUP]: any[]|null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component the context contains change detection data.\n * - For non-root components, the context is the component instance,\n * - For inline views, the context is null.\n */\n [CONTEXT]: {}|RootContext|null;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly[INJECTOR]: Injector|null;\n\n /** Renderer to be used for this view. */\n [RENDERER_FACTORY]: RendererFactory3;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer3;\n\n /** An optional custom sanitizer. */\n [SANITIZER]: Sanitizer|null;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView|LContainer|null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView|LContainer|null;\n\n /**\n * Stores QueryLists associated with content queries of a directive. This data structure is\n * filled-in as part of a directive creation process and is later used to retrieve a QueryList to\n * be refreshed.\n */\n [CONTENT_QUERIES]: QueryList<any>[]|null;\n\n /**\n * View where this view's template was declared.\n *\n * Only applicable for dynamically created views. Will be null for inline/component views.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView|null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 0b00000000100,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 0b00000001000,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 0b00000010000,\n\n /**\n * Whether or not manual change detection is turned on for onPush components.\n *\n * This is a special mode that only marks components dirty in two cases:\n * 1) There has been a change to an @Input property\n * 2) `markDirty()` has been called manually by the user\n *\n * Note that in this mode, the firing of events does NOT mark components\n * dirty automatically.\n *\n * Manual mode is turned off by default for backwards compatibility, as events\n * automatically mark OnPush components dirty in View Engine.\n *\n * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on\n */\n ManualOnPush = 0b00000100000,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 0b000001000000,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 0b000010000000,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 0b000100000000,\n\n /** Whether or not this view is the root view */\n IsRoot = 0b001000000000,\n\n /**\n * Index of the current init phase on last 22 bits\n */\n IndexWithinInitPhaseIncrementer = 0b010000000000,\n IndexWithinInitPhaseShift = 10,\n IndexWithinInitPhaseReset = 0b001111111111,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[FLAGS_MORE]) */\nexport const enum PreOrderHookFlags {\n /** The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Set of instructions used to process host bindings efficiently.\n *\n * See VIEW_DATA.md for more information.\n */\nexport interface ExpandoInstructions extends Array<number|HostBindingsFunction<any>|null> {}\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * ID for inline views to determine whether a view is the same as the previous view\n * in a certain position. If it's not, we know the new view needs to be inserted\n * and the one that exists needs to be removed (e.g. if/else statements)\n *\n * If this is -1, then this is a component view or a dynamically created view.\n */\n readonly id: number;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}>|null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}>|null;\n\n /**\n * Pointer to the host `TNode` (not part of this TView).\n *\n * If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.\n * We need this pointer to be able to efficiently find this node when inserting the view\n * into an anchor.\n *\n * If this is a `TElementNode`, this is the view of a root component. It has exactly one\n * root TNode.\n *\n * If this is null, this is the view of a component that is not at root. We do not store\n * the host TNodes for child component views because they can potentially have several\n * different host TNodes, depending on where the component is being used. These host\n * TNodes cannot be shared (due to different indices, etc).\n */\n node: TViewNode|TElementNode|null;\n\n /** Whether or not this template has been processed. */\n firstTemplatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"consts\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * The index where the viewQueries section of `LView` begins. This section contains\n * view queries defined for a component/directive.\n *\n * We store this start index so we know where the list of view queries starts.\n * This is required when we invoke view queries at runtime. We invoke queries one by one and\n * increment query index after each iteration. This information helps us to reset index back to\n * the beginning of view query list before we invoke view queries again.\n */\n viewQueryStartIndex: number;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode|null;\n\n /**\n * Set of instructions used to process host bindings efficiently.\n *\n * See VIEW_DATA.md for more information.\n */\n expandoInstructions: ExpandoInstructions|null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList|null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList|null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n preOrderHooks: HookData|null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n preOrderCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData|null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData|null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData|null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: HookData|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[]|null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[]|null;\n\n /**\n * A list of indices for child directives that have content queries.\n */\n contentQueries: number[]|null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[]|null;\n}\n\nexport const enum RootContextFlags {Empty = 0b00, DetectChanges = 0b01, FlushPlayers = 0b10}\n\n\n/**\n * RootContext contains information which is shared for all components which\n * were bootstrapped with {@link renderComponent}.\n */\nexport interface RootContext {\n /**\n * A function used for scheduling change detection in the future. Usually\n * this is `requestAnimationFrame`.\n */\n scheduler: (workFn: () => void) => void;\n\n /**\n * A promise which is resolved when all components are considered clean (not dirty).\n *\n * This promise is overwritten every time a first call to {@link markDirty} is invoked.\n */\n clean: Promise<null>;\n\n /**\n * RootComponents - The components that were instantiated by the call to\n * {@link renderComponent}.\n */\n components: {}[];\n\n /**\n * The player flushing handler to kick off all animations\n */\n playerHandler: PlayerHandler|null;\n\n /**\n * What render-related operations to run once a scheduler has been set\n */\n flags: RootContextFlags;\n}\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = (number | (() => void))[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData =\n (TNode | PipeDef<any>| DirectiveDef<any>| ComponentDef<any>| number | Type<any>|\n InjectionToken<any>| TI18n | I18nUpdateOpCodes | null | string)[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string) {\n if (typeof actual != 'number') {\n throwError(msg);\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (actual != expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string) {\n if (actual == expected) {\n throwError(msg);\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string) {\n if (actual !== expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (actual === expected) {\n throwError(msg);\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string) {\n if (actual >= expected) {\n throwError(msg);\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string) {\n if (actual <= expected) {\n throwError(msg);\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg);\n }\n}\n\nexport function assertDefined<T>(actual: T, msg: string) {\n if (actual == null) {\n throwError(msg);\n }\n}\n\nexport function throwError(msg: string): never {\n // tslint:disable-next-line\n debugger; // Left intentionally for better debugger experience.\n throw new Error(`ASSERTION ERROR: ${msg}`);\n}\n\nexport function assertDomNode(node: any) {\n // If we're in a worker, `Node` will not be defined.\n assertEqual(\n (typeof Node !== 'undefined' && node instanceof Node) ||\n (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'),\n true, `The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n}\n\n\nexport function assertDataInRange(arr: any[], index: number) {\n const maxLen = arr ? arr.length : 0;\n assertLessThan(index, maxLen, `Index expected to be less than ${maxLen} but got ${index}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewRef} from '../../linker/view_ref';\n\nimport {TNode} from './node';\nimport {LQueries} from './query';\nimport {RComment, RElement} from './renderer';\nimport {StylingContext} from './styling';\nimport {HOST, LView, NEXT, PARENT, QUERIES, T_HOST} from './view';\n\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\nexport const ACTIVE_INDEX = 2;\n// PARENT, NEXT, QUERIES and T_HOST are indices 3, 4, 5 and 6.\n// As we already have these constants in LView, we don't need to re-create them.\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 9;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n *\n * It could also be a styling context if this is a node with a style/class\n * binding.\n */\n readonly[HOST]: RElement|RComment|StylingContext|LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /**\n * The next active index in the views array to read or write to. This helps us\n * keep track of where we are in the views array.\n * In the case the LContainer is created for a ViewContainerRef,\n * it is set to null to identify this scenario, as indices are \"absolute\" in that case,\n * i.e. provided directly by the user of the ViewContainerRef API.\n */\n [ACTIVE_INDEX]: number;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView|LContainer|null;\n\n /**\n * Queries active for this container - all the views inserted to / removed from\n * this container are reported to queries referenced here.\n */\n [QUERIES]: LQueries|null; // TODO(misko): This is abuse of `LContainer` since we are storing\n // `[QUERIES]` in it which are not needed for `LContainer` (only needed for Template)\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n readonly[NATIVE]:\n RComment; // TODO(misko): remove as this value can be gotten by unwrapping `[HOST]`\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n */\n [VIEW_REFS]: ViewRef[]|null;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {RNode} from './renderer';\nimport {LView} from './view';\n\n/**\n * This property will be monkey-patched on elements, components and directives\n */\nexport const MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nexport interface LContext {\n /**\n * The component's parent view data.\n */\n lView: LView;\n\n /**\n * The index instance of the node.\n */\n nodeIndex: number;\n\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native: RNode;\n\n /**\n * The instance of the Component node.\n */\n component: {}|null|undefined;\n\n /**\n * The list of active directives that exist on this element.\n */\n directives: any[]|null|undefined;\n\n /**\n * The map of local references (local reference name => element or directive instance) that exist\n * on this element.\n */\n localRefs: {[key: string]: any}|null|undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDataInRange, assertDefined, assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from '../interfaces/context';\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {TNode, TNodeFlags} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, TData, TVIEW} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`,\n * `StylingContext`) in same location in `LView`. This is because we don't want to pre-allocate\n * space for it because the storage is sparse. This file contains utilities for dealing with such\n * data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === 'number'` => `StylingContext`\n * - This happens when we have style/class binding at a given location.\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapRNode(value: RNode | LView | LContainer | StylingContext): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapLView(value: RNode | LView | LContainer | StylingContext): LView|null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapLContainer(value: RNode | LView | LContainer | StylingContext): LContainer|\n null {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true) return value as LContainer;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `StylingContext` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function unwrapStylingContext(value: RNode | LView | LContainer | StylingContext):\n StylingContext|null {\n while (Array.isArray(value)) {\n // This check is same as `isStylingContext()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'number') return value as StylingContext;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isLView(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isLContainer(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\n/**\n * True if `value` is `StylingContext`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\nexport function isStylingContext(value: RNode | LView | LContainer | StylingContext | {} | null):\n value is StylingContext {\n return Array.isArray(value) && typeof value[TYPE] === 'number';\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n return unwrapRNode(lView[index + HEADER_OFFSET]);\n}\n\nexport function getNativeByTNode(tNode: TNode, hostView: LView): RNode {\n return unwrapRNode(hostView[tNode.index]);\n}\n\n/**\n * A helper function that returns `true` if a given `TNode` has any matching directives.\n */\nexport function hasDirectives(tNode: TNode): boolean {\n return tNode.directiveEnd > tNode.directiveStart;\n}\n\nexport function getTNode(index: number, view: LView): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');\n return view[TVIEW].data[index + HEADER_OFFSET] as TNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function loadInternal<T>(view: LView | TData, index: number): T {\n ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);\n return view[index + HEADER_OFFSET];\n}\n\nexport function getComponentViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponent(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isComponent) === TNodeFlags.isComponent;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return (def as ComponentDef<T>).template !== null;\n}\n\nexport function isRootView(target: LView): boolean {\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView|LContext|null {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME];\n}\n\nexport function readPatchedLView(target: any): LView|null {\n const value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : (value as LContext).lView;\n }\n return null;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\nimport {isLContainer, isLView} from './util/view_utils';\n\n\nexport function assertComponentType(\n actual: any,\n msg: string =\n 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string =\n 'Type passed in is not NgModuleType, it does not have \\'ngModuleDef\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertPreviousIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode | null) {\n assertDefined(tNode, 'previousOrParentTNode should exist!');\n assertDefined(tNode !.parent, 'previousOrParentTNode should have a parent');\n}\n\nexport function assertDataNext(lView: LView, index: number, arr?: any[]) {\n if (arr == null) arr = lView;\n assertEqual(\n arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nexport function assertLContainerOrUndefined(value: any): void {\n value && assertEqual(isLContainer(value), true, 'Expecting LContainer or undefined or null');\n}\n\nexport function assertLContainer(value: any): void {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): void {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../util/assert';\n\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\n\n\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n * @param nodeIndex The index of the node to which the directive is attached\n * @param initialPreOrderHooksLength the number of pre-order hooks already registered before the\n * current process, used to know if the node index has to be added to the array. If it is -1,\n * the node index is never added.\n * @param initialPreOrderCheckHooksLength same as previous for pre-order check hooks\n */\nexport function registerPreOrderHooks(\n directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView, nodeIndex: number,\n initialPreOrderHooksLength: number, initialPreOrderCheckHooksLength: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n\n const {onChanges, onInit, doCheck} = directiveDef;\n if (initialPreOrderHooksLength >= 0 &&\n (!tView.preOrderHooks || initialPreOrderHooksLength === tView.preOrderHooks.length) &&\n (onChanges || onInit || doCheck)) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(nodeIndex);\n }\n\n if (initialPreOrderCheckHooksLength >= 0 &&\n (!tView.preOrderCheckHooks ||\n initialPreOrderCheckHooksLength === tView.preOrderCheckHooks.length) &&\n (onChanges || doCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(nodeIndex);\n }\n\n if (onChanges) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges);\n }\n\n if (onInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit);\n }\n\n if (doCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n if (tView.firstTemplatePass) {\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n if (directiveDef.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, directiveDef.afterContentInit);\n }\n\n if (directiveDef.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, directiveDef.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [\n ])).push(i, directiveDef.afterContentChecked);\n }\n\n if (directiveDef.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, directiveDef.afterViewInit);\n }\n\n if (directiveDef.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, directiveDef.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [\n ])).push(i, directiveDef.afterViewChecked);\n }\n\n if (directiveDef.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, directiveDef.onDestroy);\n }\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n/**\n * Executes necessary hooks at the start of executing a template.\n *\n * Executes hooks that are to be run during the initialization of a directive such\n * as `onChanges`, `onInit`, and `doCheck`.\n *\n * @param lView The current view\n * @param tView Static data for the view containing the hooks to be executed\n * @param checkNoChangesMode Whether or not we're in checkNoChanges mode.\n * @param @param currentNodeIndex 2 cases depending the the value:\n * - undefined: execute hooks only from the saved index until the end of the array (pre-order case,\n * when flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executePreOrderHooks(\n currentView: LView, tView: TView, checkNoChangesMode: boolean,\n currentNodeIndex: number | undefined): void {\n if (!checkNoChangesMode) {\n executeHooks(\n currentView, tView.preOrderHooks, tView.preOrderCheckHooks, checkNoChangesMode,\n InitPhaseState.OnInitHooksToBeRun,\n currentNodeIndex !== undefined ? currentNodeIndex : null);\n }\n}\n\n/**\n * Executes hooks against the given `LView` based off of whether or not\n * This is the first pass.\n *\n * @param currentView The view instance data to run the hooks against\n * @param firstPassHooks An array of hooks to run if we're in the first view pass\n * @param checkHooks An Array of hooks to run if we're not in the first view pass.\n * @param checkNoChangesMode Whether or not we're in no changes mode.\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeHooks(\n currentView: LView, firstPassHooks: HookData | null, checkHooks: HookData | null,\n checkNoChangesMode: boolean, initPhaseState: InitPhaseState,\n currentNodeIndex: number | null | undefined): void {\n if (checkNoChangesMode) return;\n const hooksToCall = (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState ?\n firstPassHooks :\n checkHooks;\n if (hooksToCall) {\n callHooks(currentView, hooksToCall, initPhaseState, currentNodeIndex);\n }\n // The init phase state must be always checked here as it may have been recursively updated\n if (currentNodeIndex == null &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhaseState &&\n initPhaseState !== InitPhaseState.InitPhaseCompleted) {\n currentView[FLAGS] &= LViewFlags.IndexWithinInitPhaseReset;\n currentView[FLAGS] += LViewFlags.InitPhaseStateIncrementer;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView, arr: HookData, initPhase: InitPhaseState,\n currentNodeIndex: number | null | undefined): void {\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < arr.length; i++) {\n const hook = arr[i + 1] as() => void;\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) + i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1] as() => void;\n const directiveIndex = isInitHook ? -arr[i] : arr[i] as number;\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively\n // updated\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n hook.call(directive);\n }\n } else {\n hook.call(directive);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {StylingContext} from '../interfaces/styling';\n\nlet stylingContext: StylingContext|null = null;\n\n/**\n * Gets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n */\nexport function getCachedStylingContext() {\n return stylingContext;\n}\n\n/**\n * Sets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n *\n * @param context The styling context value that will be stored\n */\nexport function setCachedStylingContext(context: StylingContext | null) {\n stylingContext = context;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertGreaterThan} from '../util/assert';\n\nimport {assertLViewOrUndefined} from './assert';\nimport {executeHooks} from './hooks';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {TElementNode, TNode, TViewNode} from './interfaces/node';\nimport {BINDING_INDEX, CONTEXT, DECLARATION_VIEW, FLAGS, InitPhaseState, LView, LViewFlags, OpaqueViewState, TVIEW} from './interfaces/view';\nimport {setCachedStylingContext} from './styling/state';\nimport {resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can than attach `LView` to only those elements.\n */\nlet elementDepthCount !: number;\n\nexport function getElementDepthCount() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n elementDepthCount--;\n}\n\nlet currentDirectiveDef: DirectiveDef<any>|ComponentDef<any>|null = null;\n\nexport function getCurrentDirectiveDef(): DirectiveDef<any>|ComponentDef<any>|null {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentDirectiveDef;\n}\n\nexport function setCurrentDirectiveDef(def: DirectiveDef<any>| ComponentDef<any>| null): void {\n currentDirectiveDef = def;\n}\n\n/**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` than we need to prevent the runtime form matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\nlet bindingsEnabled !: boolean;\n\nexport function getBindingsEnabled(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return bindingsEnabled;\n}\n\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n bindingsEnabled = true;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n bindingsEnabled = false;\n}\n\nexport function getLView(): LView {\n return lView;\n}\n\n/**\n * Used as the starting directive id value.\n *\n * All subsequent directives are incremented from this value onwards.\n * The reason why this value is `1` instead of `0` is because the `0`\n * value is reserved for the template.\n */\nconst MIN_DIRECTIVE_ID = 1;\n\nlet activeDirectiveId = MIN_DIRECTIVE_ID;\n\n/**\n * Position depth (with respect from leaf to root) in a directive sub-class inheritance chain.\n */\nlet activeDirectiveSuperClassDepthPosition = 0;\n\n/**\n * Total count of how many directives are a part of an inheritance chain.\n *\n * When directives are sub-classed (extended) from one to another, Angular\n * needs to keep track of exactly how many were encountered so it can accurately\n * generate the next directive id (once the next directive id is visited).\n * Normally the next directive id just a single incremented value from the\n * previous one, however, if the previous directive is a part of an inheritance\n * chain (a series of sub-classed directives) then the incremented value must\n * also take into account the total amount of sub-classed values.\n *\n * Note that this value resets back to zero once the next directive is\n * visited (when `incrementActiveDirectiveId` or `setActiveHostElement`\n * is called).\n */\nlet activeDirectiveSuperClassHeight = 0;\n\n/**\n * Sets the active directive host element and resets the directive id value\n * (when the provided elementIndex value has changed).\n *\n * @param elementIndex the element index value for the host element where\n * the directive/component instance lives\n */\nexport function setActiveHostElement(elementIndex: number | null = null) {\n if (_selectedIndex !== elementIndex) {\n setSelectedIndex(elementIndex == null ? -1 : elementIndex);\n activeDirectiveId = elementIndex == null ? 0 : MIN_DIRECTIVE_ID;\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n }\n}\n\n/**\n * Returns the current id value of the current directive.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (id == 1)\n * dirTwo->hostBindings() (id == 2)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function getActiveDirectiveId() {\n return activeDirectiveId;\n}\n\n/**\n * Increments the current directive id value.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (index = 1)\n * // increment\n * dirTwo->hostBindings() (index = 2)\n *\n * Depending on whether or not a previous directive had any inherited\n * directives present, that value will be incremented in addition\n * to the id jumping up by one.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\nexport function incrementActiveDirectiveId() {\n activeDirectiveId += 1 + activeDirectiveSuperClassHeight;\n\n // because we are dealing with a new directive this\n // means we have exited out of the inheritance chain\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n}\n\n/**\n * Set the current super class (reverse inheritance) position depth for a directive.\n *\n * For example we have two directives: Child and Other (but Child is a sub-class of Parent)\n * <div child-dir other-dir></div>\n *\n * // increment\n * parentInstance->hostBindings() (depth = 1)\n * // decrement\n * childInstance->hostBindings() (depth = 0)\n * otherInstance->hostBindings() (depth = 0 b/c it's a different directive)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function adjustActiveDirectiveSuperClassDepthPosition(delta: number) {\n activeDirectiveSuperClassDepthPosition += delta;\n\n // we keep track of the height value so that when the next directive is visited\n // then Angular knows to generate a new directive id value which has taken into\n // account how many sub-class directives were a part of the previous directive.\n activeDirectiveSuperClassHeight =\n Math.max(activeDirectiveSuperClassHeight, activeDirectiveSuperClassDepthPosition);\n}\n\n/**\n * Returns he current depth of the super/sub class inheritance chain.\n *\n * This will return how many inherited directive/component classes\n * exist in the current chain.\n *\n * ```typescript\n * @Directive({ selector: '[super-dir]' })\n * class SuperDir {}\n *\n * @Directive({ selector: '[sub-dir]' })\n * class SubDir extends SuperDir {}\n *\n * // if `<div sub-dir>` is used then the super class height is `1`\n * // if `<div super-dir>` is used then the super class height is `0`\n * ```\n */\nexport function getActiveDirectiveSuperClassHeight() {\n return activeDirectiveSuperClassHeight;\n}\n\n/**\n * Returns the current super class (reverse inheritance) depth for a directive.\n *\n * This is designed to help instruction code distinguish different hostBindings\n * calls from each other when a directive has extended from another directive.\n * Normally using the directive id value is enough, but with the case\n * of parent/sub-class directive inheritance more information is required.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\nexport function getActiveDirectiveSuperClassDepth() {\n return activeDirectiveSuperClassDepthPosition;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView(viewToRestore: OpaqueViewState) {\n contextLView = viewToRestore as any as LView;\n}\n\n/** Used to set the parent property when nodes are created and track query results. */\nlet previousOrParentTNode: TNode;\n\nexport function getPreviousOrParentTNode(): TNode {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return previousOrParentTNode;\n}\n\nexport function setPreviousOrParentTNode(tNode: TNode, _isParent: boolean) {\n previousOrParentTNode = tNode;\n isParent = _isParent;\n}\n\nexport function setTNodeAndViewData(tNode: TNode, view: LView) {\n ngDevMode && assertLViewOrUndefined(view);\n previousOrParentTNode = tNode;\n lView = view;\n}\n\n/**\n * If `isParent` is:\n * - `true`: then `previousOrParentTNode` points to a parent node.\n * - `false`: then `previousOrParentTNode` points to previous node (sibling).\n */\nlet isParent: boolean;\n\nexport function getIsParent(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return isParent;\n}\n\nexport function setIsNotParent(): void {\n isParent = false;\n}\nexport function setIsParent(): void {\n isParent = true;\n}\n\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView = lView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nlet lView: LView;\n\n/**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\nlet contextLView: LView = null !;\n\nexport function getContextLView(): LView {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return contextLView;\n}\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nlet checkNoChangesMode = false;\n\nexport function getCheckNoChangesMode(): boolean {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return checkNoChangesMode;\n}\n\nexport function setCheckNoChangesMode(mode: boolean): void {\n checkNoChangesMode = mode;\n}\n\n/**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\nlet bindingRootIndex: number = -1;\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n return bindingRootIndex;\n}\n\nexport function setBindingRoot(value: number) {\n bindingRootIndex = value;\n}\n\n/**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\nlet currentQueryIndex: number = 0;\n\nexport function getCurrentQueryIndex(): number {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n currentQueryIndex = value;\n}\n\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nexport function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView {\n ngDevMode && assertLViewOrUndefined(newView);\n const oldView = lView;\n if (newView) {\n const tView = newView[TVIEW];\n bindingRootIndex = tView.bindingStartIndex;\n }\n\n previousOrParentTNode = hostTNode !;\n isParent = true;\n\n lView = contextLView = newView;\n return oldView;\n}\n\nexport function nextContextImpl<T = any>(level: number = 1): T {\n contextLView = walkUpViews(level, contextLView !);\n return contextLView[CONTEXT] as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW] !;\n nestingLevel--;\n }\n return currentView;\n}\n\n/**\n * Resets the application state.\n */\nexport function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null !;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}\n\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n *\n * @param newView New state to become active\n * @param safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.\n * This is not always the case (for example, the application may have crashed and `leaveView` is\n * being executed while unwinding the call stack).\n */\nexport function leaveView(newView: LView, safeToRunHooks: boolean): void {\n const tView = lView[TVIEW];\n if (isCreationMode(lView)) {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n } else {\n try {\n resetPreOrderHookFlags(lView);\n safeToRunHooks && executeHooks(\n lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode,\n InitPhaseState.AfterViewInitHooksToBeRun, undefined);\n } finally {\n // Views are clean and in update mode after being checked, so these bits are cleared\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n }\n }\n setCachedStylingContext(null);\n enterView(newView, null);\n}\n\nlet _selectedIndex = -1;\n\n/**\n * Gets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return _selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function setSelectedIndex(index: number) {\n _selectedIndex = index;\n\n // remove the styling context from the cache\n // because we are now on a different element\n setCachedStylingContext(null);\n}\n\n\nlet _currentNamespace: string|null = null;\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n _currentNamespace = 'http://www.w3.org/2000/svg';\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n _currentNamespace = 'http://www.w3.org/1998/MathML/';\n}\n\n/**\n * Sets the namespace used to create elements no `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n _currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n return _currentNamespace;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst BRAND = '__SANITIZER_TRUSTED_BRAND__';\n\nexport const enum BypassType {\n Url = 'Url',\n Html = 'Html',\n ResourceUrl = 'ResourceUrl',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * A branded trusted string used with sanitization.\n *\n * See: {@link TrustedHtmlString}, {@link TrustedResourceUrlString}, {@link TrustedScriptString},\n * {@link TrustedStyleString}, {@link TrustedUrlString}\n */\nexport interface TrustedString extends String { [BRAND]: BypassType; }\n\n/**\n * A branded trusted string used with sanitization of `html` strings.\n *\n * See: {@link bypassSanitizationTrustHtml} and {@link htmlSanitizer}.\n */\nexport interface TrustedHtmlString extends TrustedString { [BRAND]: BypassType.Html; }\n\n/**\n * A branded trusted string used with sanitization of `style` strings.\n *\n * See: {@link bypassSanitizationTrustStyle} and {@link styleSanitizer}.\n */\nexport interface TrustedStyleString extends TrustedString { [BRAND]: BypassType.Style; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustScript} and {@link scriptSanitizer}.\n */\nexport interface TrustedScriptString extends TrustedString { [BRAND]: BypassType.Script; }\n\n/**\n * A branded trusted string used with sanitization of `url` strings.\n *\n * See: {@link bypassSanitizationTrustUrl} and {@link urlSanitizer}.\n */\nexport interface TrustedUrlString extends TrustedString { [BRAND]: BypassType.Url; }\n\n/**\n * A branded trusted string used with sanitization of `resourceUrl` strings.\n *\n * See: {@link bypassSanitizationTrustResourceUrl} and {@link resourceUrlSanitizer}.\n */\nexport interface TrustedResourceUrlString extends TrustedString { [BRAND]: BypassType.ResourceUrl; }\n\nexport function allowSanitizationBypass(value: any, type: BypassType): boolean {\n return (value instanceof String && (value as TrustedStyleString)[BRAND] === type);\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): TrustedHtmlString {\n return bypassSanitizationTrustString(trustedHtml, BypassType.Html);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): TrustedStyleString {\n return bypassSanitizationTrustString(trustedStyle, BypassType.Style);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): TrustedScriptString {\n return bypassSanitizationTrustString(trustedScript, BypassType.Script);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): TrustedUrlString {\n return bypassSanitizationTrustString(trustedUrl, BypassType.Url);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string):\n TrustedResourceUrlString {\n return bypassSanitizationTrustString(trustedResourceUrl, BypassType.ResourceUrl);\n}\n\n\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Html): TrustedHtmlString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Style): TrustedStyleString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Script): TrustedScriptString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.Url): TrustedUrlString;\nfunction bypassSanitizationTrustString(\n trustedString: string, mode: BypassType.ResourceUrl): TrustedResourceUrlString;\nfunction bypassSanitizationTrustString(trustedString: string, mode: BypassType): TrustedString {\n const trusted = new String(trustedString) as TrustedString;\n trusted[BRAND] = mode;\n return trusted;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n\nlet _devMode: boolean = true;\nlet _runModeLocked: boolean = false;\n\n\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n _runModeLocked = true;\n return _devMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nexport class InertBodyHelper {\n private inertBodyElement: HTMLElement;\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n\n if (this.inertBodyElement == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n * The implementation of this is determined in the constructor, when the class is instantiated.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n private getInertBodyElement_XHR(html: string) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n } catch {\n return null;\n }\n const xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(undefined);\n const body: HTMLBodyElement = xhr.response.body;\n body.removeChild(body.firstChild !);\n return body;\n }\n\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n private getInertBodyElement_DOMParser(html: string) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n const body = new (window as any)\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body as HTMLBodyElement;\n body.removeChild(body.firstChild !);\n return body;\n } catch {\n return null;\n }\n }\n\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n private getInertBodyElement_InertDocument(html: string) {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n\n this.inertBodyElement.innerHTML = html;\n\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if ((this.defaultDoc as any).documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n\n return this.inertBodyElement;\n }\n\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n private stripCustomNsAttrs(el: Element) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib !.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild as Node | null;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode as Element);\n childNode = childNode.nextSibling;\n }\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!(window as any).DOMParser;\n } catch {\n return false;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n if (isDevMode()) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see http://g.co/ng/security#xss)`);\n }\n\n return 'unsafe:' + url;\n}\n\nexport function sanitizeSrcset(srcset: string): string {\n srcset = String(srcset);\n return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\nimport {InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS =\n merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n 'address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n\nexport const VALID_ELEMENTS =\n merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\n// Attributes that have special href set hence need to be sanitized\nexport const SRCSET_ATTRS = tagSet('srcset');\n\nconst HTML_ATTRS = tagSet(\n 'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current: Node = el.firstChild !;\n let traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue !);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild !;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = this.checkClobberedElement(current, current.nextSibling !);\n\n if (next) {\n current = next;\n break;\n }\n\n current = this.checkClobberedElement(current, current.parentNode !);\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr !.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr !.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n\n private chars(chars: string) { this.buf.push(encodeEntities(chars)); }\n\n checkClobberedElement(node: Node, nextNode: Node): Node {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\n `Failed to sanitize html because the element is clobbered: ${(node as Element).outerHTML}`);\n }\n return nextNode;\n }\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n return value.replace(/&/g, '&amp;')\n .replace(\n SURROGATE_PAIR_REGEXP,\n function(match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(\n NON_ALPHANUMERIC_REGEXP,\n function(match: string) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): string {\n let inertBodyElement: HTMLElement|null = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement !.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n getTemplateContent(inertBodyElement !) as Element || inertBodyElement);\n if (isDevMode() && sanitizer.sanitizedSomething) {\n console.warn(\n 'WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');\n }\n\n return safeHtml;\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node|null {\n return 'content' in (el as any /** Microsoft/TypeScript#21517 */) && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\n}\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '../util/is_dev_mode';\nimport {_sanitizeUrl} from './url_sanitizer';\n\n\n/**\n * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nconst VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nconst TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\nconst COLOR_FNS = '(?:rgb|hsl)a?';\nconst GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nconst CSS3_FNS = '(?:calc|attr)';\nconst FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nconst SAFE_STYLE_VALUE = new RegExp(\n `^(${VALUES}|` +\n `(?:${TRANSFORMATION_FNS}|${COLOR_FNS}|${GRADIENTS}|${CSS3_FNS})` +\n `${FN_ARGS})$`,\n 'g');\n\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nconst URL_RE = /^url\\(([^)]+)\\)$/;\n\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value: string) {\n let outsideSingle = true;\n let outsideDouble = true;\n for (let i = 0; i < value.length; i++) {\n const c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n } else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n}\n\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nexport function _sanitizeStyle(value: string): string {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value) return '';\n\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n const urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n\n if (isDevMode()) {\n console.warn(\n `WARNING: sanitizing unsafe style value ${value} (see http://g.co/ng/security#xss).`);\n }\n\n return 'unsafe';\n}\n\n\n/**\n * A series of flags to instruct a style sanitizer to either validate\n * or sanitize a value.\n *\n * Because sanitization is dependent on the style property (i.e. style\n * sanitization for `width` is much different than for `background-image`)\n * the sanitization function (e.g. `StyleSanitizerFn`) needs to check a\n * property value first before it actually sanitizes any values.\n *\n * This enum exist to allow a style sanitization function to either only\n * do validation (check the property to see whether a value will be\n * sanitized or not) or to sanitize the value (or both).\n *\n * @publicApi\n */\nexport const enum StyleSanitizeMode {\n /** Just check to see if the property is required to be sanitized or not */\n ValidateProperty = 0b01,\n /** Skip checking the property; just sanitize the value */\n SanitizeOnly = 0b10,\n /** Check the property and (if true) then sanitize the value */\n ValidateAndSanitize = 0b11,\n}\n\n/**\n * Used to intercept and sanitize style values before they are written to the renderer.\n *\n * This function is designed to be called in two modes. When a value is not provided\n * then the function will return a boolean whether a property will be sanitized later.\n * If a value is provided then the sanitized version of that will be returned.\n */\nexport interface StyleSanitizeFn {\n (prop: string, value: string|null, mode?: StyleSanitizeMode): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/misc_utils';\n\nimport {BypassType, allowSanitizationBypass} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer, SecurityContext} from './security';\nimport {StyleSanitizeFn, StyleSanitizeMode, _sanitizeStyle as _sanitizeStyle} from './style_sanitizer';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n }\n if (allowSanitizationBypass(unsafeHtml, BypassType.Html)) {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypass(unsafeStyle, BypassType.Style)) {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(renderStringify(unsafeStyle));\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypass(unsafeUrl, BypassType.Url)) {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n }\n if (allowSanitizationBypass(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return unsafeResourceUrl.toString();\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';\n }\n if (allowSanitizationBypass(unsafeScript, BypassType.Script)) {\n return unsafeScript.toString();\n }\n throw new Error('unsafe value used in a script context');\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||\n tag === 'media' || tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @publicApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\n/**\n * The default style sanitizer will handle sanitization for style properties by\n * sanitizing any CSS property that can include a `url` value (usually image-based properties)\n *\n * @publicApi\n */\nexport const ɵɵdefaultStyleSanitizer =\n (function(prop: string, value: string|null, mode?: StyleSanitizeMode): string | boolean | null {\n mode = mode || StyleSanitizeMode.ValidateAndSanitize;\n let doSanitizeValue = true;\n if (mode & StyleSanitizeMode.ValidateProperty) {\n doSanitizeValue = prop === 'background-image' || prop === 'background' ||\n prop === 'border-image' || prop === 'filter' || prop === 'list-style' ||\n prop === 'list-style-image' || prop === 'clip-path';\n }\n\n if (mode & StyleSanitizeMode.SanitizeOnly) {\n return doSanitizeValue ? ɵɵsanitizeStyle(value) : value;\n } else {\n return doSanitizeValue;\n }\n } as StyleSanitizeFn);\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new Error(msg);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new Error(msg);\n }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n const lView = getLView();\n return lView && lView[SANITIZER];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\nimport {InjectFlags} from '../../di/interface/injector';\nimport {Type} from '../../interface/type';\n\nimport {TElementNode} from './node';\nimport {LView, TData} from './view';\n\nexport const TNODE = 8;\nexport const PARENT_INJECTOR = 8;\nexport const INJECTOR_BLOOM_PARENT_SIZE = 9;\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport interface RelativeInjectorLocation { __brand__: 'RelativeInjectorLocationFlags'; }\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR: RelativeInjectorLocation = -1 as any;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n* Factory for creating instances of injectors in the NodeInjector.\n*\n* This factory is complicated by the fact that it can resolve `multi` factories as well.\n*\n* NOTE: Some of the fields are optional which means that this class has two hidden classes.\n* - One without `multi` support (most common)\n* - One with `multi` values, (rare).\n*\n* Since VMs can cache up to 4 inline hidden classes this is OK.\n*\n* - Single factory: Only `resolving` and `factory` is defined.\n* - `providers` factory: `componentProviders` is a number and `index = -1`.\n* - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n*/\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```\n * component:\n * provides: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * provides: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `provides` and `viewProvides` it is\n * possible for `viewProvides` to shadow the `provides`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```\n * provides: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProvides`\n * `Factory` has a pointer to the shadowed `provides` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory|null;\n\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory:\n (this: NodeInjectorFactory, _: null,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TElementNode) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T)) {\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n // See: https://jsperf.com/instanceof-vs-getprototypeof\n return obj !== null && typeof obj == 'object' &&\n Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual} from '../util/assert';\nimport {TNode, TNodeType} from './interfaces/node';\n\nexport function assertNodeType(tNode: TNode, type: TNodeType) {\n assertDefined(tNode, 'should be called with a TNode');\n assertEqual(tNode.type, type, `should be a ${typeName(type)}`);\n}\n\nexport function assertNodeOfPossibleTypes(tNode: TNode, ...types: TNodeType[]) {\n assertDefined(tNode, 'should be called with a TNode');\n const found = types.some(type => tNode.type === type);\n assertEqual(\n found, true,\n `Should be one of ${types.map(typeName).join(', ')} but got ${typeName(tNode.type)}`);\n}\n\nfunction typeName(type: TNodeType): string {\n if (type == TNodeType.Projection) return 'Projection';\n if (type == TNodeType.Container) return 'Container';\n if (type == TNodeType.View) return 'View';\n if (type == TNodeType.Element) return 'Element';\n if (type == TNodeType.ElementContainer) return 'ElementContainer';\n return '<unknown>';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * The goal here is to make sure that the browser DOM API is the Renderer.\n * We do this by defining a subset of DOM API to be the renderer and than\n * use that time for rendering.\n *\n * At runtime we can then use the DOM api directly, in server or web-worker\n * it will be easy to implement such API.\n */\n\nimport {RendererStyleFlags2, RendererType2} from '../../render/api';\n\n\n// TODO: cleanup once the code is merged in angular/angular\nexport enum RendererStyleFlags3 {\n Important = 1 << 0,\n DashCase = 1 << 1\n}\n\nexport type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;\n\nexport type GlobalTargetName = 'document' | 'window' | 'body';\n\nexport type GlobalTargetResolver = (element: any) => {\n name: GlobalTargetName, target: EventTarget\n};\n\n/**\n * Object Oriented style of API needed to create elements and text nodes.\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade\n * (reducing payload size).\n * */\nexport interface ObjectOrientedRenderer3 {\n createComment(data: string): RComment;\n createElement(tagName: string): RElement;\n createElementNS(namespace: string, tagName: string): RElement;\n createTextNode(data: string): RText;\n\n querySelector(selectors: string): RElement|null;\n}\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nexport function isProceduralRenderer(renderer: ProceduralRenderer3 | ObjectOrientedRenderer3):\n renderer is ProceduralRenderer3 {\n return !!((renderer as any).listen);\n}\n\n/**\n * Procedural style of API needed to create elements and text nodes.\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the\n * facade that enables element manipulation. This also facilitates backwards compatibility\n * with Renderer2.\n */\nexport interface ProceduralRenderer3 {\n destroy(): void;\n createComment(value: string): RComment;\n createElement(name: string, namespace?: string|null): RElement;\n createText(value: string): RText;\n /**\n * This property is allowed to be null / undefined,\n * in which case the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode?: ((node: RNode) => void)|null;\n appendChild(parent: RElement, newChild: RNode): void;\n insertBefore(parent: RNode, newChild: RNode, refChild: RNode|null): void;\n removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;\n selectRootElement(selectorOrNode: string|any): RElement;\n\n parentNode(node: RNode): RElement|null;\n nextSibling(node: RNode): RNode|null;\n\n setAttribute(el: RElement, name: string, value: string, namespace?: string|null): void;\n removeAttribute(el: RElement, name: string, namespace?: string|null): void;\n addClass(el: RElement, name: string): void;\n removeClass(el: RElement, name: string): void;\n setStyle(\n el: RElement, style: string, value: any,\n flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n setProperty(el: RElement, name: string, value: any): void;\n setValue(node: RText|RComment, value: string): void;\n\n // TODO(misko): Deprecate in favor of addEventListener/removeEventListener\n listen(\n target: GlobalTargetName|RNode, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n}\n\nexport interface RendererFactory3 {\n createRenderer(hostElement: RElement|null, rendererType: RendererType2|null): Renderer3;\n begin?(): void;\n end?(): void;\n}\n\nexport const domRendererFactory3: RendererFactory3 = {\n createRenderer: (hostElement: RElement | null, rendererType: RendererType2 | null):\n Renderer3 => { return document;}\n};\n\n/** Subset of API needed for appending elements and text nodes. */\nexport interface RNode {\n /**\n * Returns the parent Element, Document, or DocumentFragment\n */\n parentNode: RNode|null;\n\n\n /**\n * Returns the parent Element if there is one\n */\n parentElement: RElement|null;\n\n /**\n * Gets the Node immediately following this one in the parent's childNodes\n */\n nextSibling: RNode|null;\n\n /**\n * Removes a child from the current node and returns the removed node\n * @param oldChild the child node to remove\n */\n removeChild(oldChild: RNode): RNode;\n\n /**\n * Insert a child node.\n *\n * Used exclusively for adding View root nodes into ViewAnchor location.\n */\n insertBefore(newChild: RNode, refChild: RNode|null, isViewRoot: boolean): void;\n\n /**\n * Append a child node.\n *\n * Used exclusively for building up DOM which are static (ie not View roots)\n */\n appendChild(newChild: RNode): RNode;\n}\n\n/**\n * Subset of API needed for writing attributes, properties, and setting up\n * listeners on Element.\n */\nexport interface RElement extends RNode {\n style: RCssStyleDeclaration;\n classList: RDomTokenList;\n className: string;\n setAttribute(name: string, value: string): void;\n removeAttribute(name: string): void;\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\n removeEventListener(type: string, listener?: EventListener, options?: boolean): void;\n\n setProperty?(name: string, value: any): void;\n}\n\nexport interface RCssStyleDeclaration {\n removeProperty(propertyName: string): string;\n setProperty(propertyName: string, value: string|null, priority?: string): void;\n}\n\nexport interface RDomTokenList {\n add(token: string): void;\n remove(token: string): void;\n}\n\nexport interface RText extends RNode { textContent: string|null; }\n\nexport interface RComment extends RNode { textContent: string|null; }\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../util/ng_dev_mode';\n\nimport {assertDomNode} from '../util/assert';\n\nimport {EMPTY_ARRAY} from './empty';\nimport {LContext, MONKEY_PATCH_KEY_NAME} from './interfaces/context';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer';\nimport {CONTEXT, HEADER_OFFSET, HOST, LView, TVIEW} from './interfaces/view';\nimport {getComponentViewByIndex, getNativeByTNode, readPatchedData, unwrapRNode} from './util/view_utils';\n\n\n\n/** Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext|null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n const lView: LView = mpValue !;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[]|null|undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n let lView: LView|null;\n if (Array.isArray(parentContext)) {\n lView = parentContext as LView;\n } else {\n lView = parentContext.lView;\n }\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let lView = readPatchedData(componentInstance);\n let view: LView;\n\n if (Array.isArray(lView)) {\n const nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentViewByIndex(nodeIndex, lView);\n const context = createLContext(lView, nodeIndex, view[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = lView as any as LContext;\n view = getComponentViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n}\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView | LContext) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ngComponentDef;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ngDirectiveDef;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const native = getNativeByTNode(tNode, lView) !;\n if (native === target) {\n return tNode.index;\n }\n tNode = traverseNextElement(tNode);\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode|null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nexport function getDirectivesAtNodeIndex(\n nodeIndex: number, lView: LView, includeComponents: boolean): any[]|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0) return EMPTY_ARRAY;\n const directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & TNodeFlags.isComponent) directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n return tNode.flags & TNodeFlags.isComponent ? lView[directiveStartIndex] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {PlayState, Player, PlayerHandler} from '../interfaces/player';\n\nexport class CorePlayerHandler implements PlayerHandler {\n private _players: Player[] = [];\n\n flushPlayers() {\n for (let i = 0; i < this._players.length; i++) {\n const player = this._players[i];\n if (!player.parent && player.state === PlayState.Pending) {\n player.play();\n }\n }\n this._players.length = 0;\n }\n\n queuePlayer(player: Player) { this._players.push(player); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * The default directive styling index value for template-based bindings.\n *\n * All host-level bindings (e.g. `hostStyleProp` and `hostStyleMap`) are\n * assigned a directive styling index value based on the current directive\n * uniqueId and the directive super-class inheritance depth. But for template\n * bindings they always have the same directive styling index value.\n */\nexport const DEFAULT_TEMPLATE_DIRECTIVE_INDEX = 0;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../../util/ng_dev_mode';\n\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {getLContext} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {LContext} from '../interfaces/context';\nimport {AttributeMarker, TAttributes, TNode, TNodeFlags} from '../interfaces/node';\nimport {PlayState, Player, PlayerContext, PlayerIndex} from '../interfaces/player';\nimport {RElement} from '../interfaces/renderer';\nimport {DirectiveRegistryValuesIndex, InitialStylingValues, StylingContext, StylingFlags, StylingIndex} from '../interfaces/styling';\nimport {HEADER_OFFSET, HOST, LView, RootContext} from '../interfaces/view';\nimport {getTNode, isStylingContext} from '../util/view_utils';\n\nimport {CorePlayerHandler} from './core_player_handler';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from './shared';\n\nexport const ANIMATION_PROP_PREFIX = '@';\n\nexport function createEmptyStylingContext(\n wrappedElement?: LContainer | LView | RElement | null, sanitizer?: StyleSanitizeFn | null,\n initialStyles?: InitialStylingValues | null,\n initialClasses?: InitialStylingValues | null): StylingContext {\n const context: StylingContext = [\n wrappedElement || null, // Element\n 0, // MasterFlags\n [] as any, // DirectiveRefs (this gets filled below)\n initialStyles || [null, null], // InitialStyles\n initialClasses || [null, null], // InitialClasses\n [0, 0], // SinglePropOffsets\n [0], // CachedMultiClassValue\n [0], // CachedMultiStyleValue\n null, // HostBuffer\n null, // PlayerContext\n ];\n\n // whenever a context is created there is always a `null` directive\n // that is registered (which is a placeholder for the \"template\").\n allocateOrUpdateDirectiveIntoContext(context, DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n return context;\n}\n\n/**\n * Allocates (registers) a directive into the directive registry within the provided styling\n * context.\n *\n * For each and every `[style]`, `[style.prop]`, `[class]`, `[class.name]` binding\n * (as well as static style and class attributes) a directive, component or template\n * is marked as the owner. When an owner is determined (this happens when the template\n * is first passed over) the directive owner is allocated into the styling context. When\n * this happens, each owner gets its own index value. This then ensures that once any\n * style and/or class binding are assigned into the context then they are marked to\n * that directive's index value.\n *\n * @param context the target StylingContext\n * @param directiveRef the directive that will be allocated into the context\n * @returns the index where the directive was inserted into\n */\nexport function allocateOrUpdateDirectiveIntoContext(\n context: StylingContext, directiveIndex: number, singlePropValuesIndex: number = -1,\n styleSanitizer?: StyleSanitizeFn | null | undefined): void {\n const directiveRegistry = context[StylingIndex.DirectiveRegistryPosition];\n\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n // we preemptively make space into the directives array and then\n // assign values slot-by-slot to ensure that if the directive ordering\n // changes then it will still function\n const limit = index + DirectiveRegistryValuesIndex.Size;\n for (let i = directiveRegistry.length; i < limit; i += DirectiveRegistryValuesIndex.Size) {\n // -1 is used to signal that the directive has been allocated, but\n // no actual style or class bindings have been registered yet...\n directiveRegistry.push(-1, null);\n }\n\n const propValuesStartPosition = index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset;\n if (singlePropValuesIndex >= 0 && directiveRegistry[propValuesStartPosition] === -1) {\n directiveRegistry[propValuesStartPosition] = singlePropValuesIndex;\n directiveRegistry[index + DirectiveRegistryValuesIndex.StyleSanitizerOffset] =\n styleSanitizer || null;\n }\n}\n\n/**\n * Used clone a copy of a pre-computed template of a styling context.\n *\n * A pre-computed template is designed to be computed once for a given element\n * (instructions.ts has logic for caching this).\n */\nexport function allocStylingContext(\n element: RElement | null, templateStyleContext: StylingContext): StylingContext {\n // each instance gets a copy\n const context = templateStyleContext.slice() as any as StylingContext;\n\n // the HEADER values contain arrays which also need\n // to be copied over into the new context\n for (let i = 0; i < StylingIndex.SingleStylesStartPosition; i++) {\n const value = templateStyleContext[i];\n if (Array.isArray(value)) {\n context[i] = value.slice();\n }\n }\n\n context[StylingIndex.ElementPosition] = element;\n\n // this will prevent any other directives from extending the context\n context[StylingIndex.MasterFlagPosition] |= StylingFlags.BindingAllocationLocked;\n return context;\n}\n\n/**\n * Retrieve the `StylingContext` at a given index.\n *\n * This method lazily creates the `StylingContext`. This is because in most cases\n * we have styling without any bindings. Creating `StylingContext` eagerly would mean that\n * every style declaration such as `<div style=\"color: red\">` would result `StyleContext`\n * which would create unnecessary memory pressure.\n *\n * @param index Index of the style allocation. See: `styling`.\n * @param viewData The view to search for the styling context\n */\nexport function getStylingContextFromLView(index: number, viewData: LView): StylingContext {\n let storageIndex = index;\n let slotValue: LContainer|LView|StylingContext|RElement = viewData[storageIndex];\n let wrapper: LContainer|LView|StylingContext = viewData;\n\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST] as LView | StylingContext | RElement;\n }\n\n if (isStylingContext(wrapper)) {\n return wrapper;\n } else {\n // This is an LView or an LContainer\n const stylingTemplate = getTNode(index - HEADER_OFFSET, viewData).stylingTemplate;\n\n if (wrapper !== viewData) {\n storageIndex = HOST;\n }\n\n return wrapper[storageIndex] = stylingTemplate ?\n allocStylingContext(slotValue, stylingTemplate) :\n createEmptyStylingContext(slotValue);\n }\n}\n\n\nexport function isAnimationProp(name: string): boolean {\n return name[0] === ANIMATION_PROP_PREFIX;\n}\n\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\n}\n\nexport function forceClassesAsString(classes: string | {[key: string]: any} | null | undefined):\n string {\n if (classes && typeof classes !== 'string') {\n classes = Object.keys(classes).join(' ');\n }\n return (classes as string) || '';\n}\n\nexport function forceStylesAsString(styles: {[key: string]: any} | null | undefined): string {\n let str = '';\n if (styles) {\n const props = Object.keys(styles);\n for (let i = 0; i < props.length; i++) {\n const prop = props[i];\n str += (i ? ';' : '') + `${prop}:${styles[prop]}`;\n }\n }\n return str;\n}\n\nexport function addPlayerInternal(\n playerContext: PlayerContext, rootContext: RootContext, element: HTMLElement,\n player: Player | null, playerContextIndex: number, ref?: any): boolean {\n ref = ref || element;\n if (playerContextIndex) {\n playerContext[playerContextIndex] = player;\n } else {\n playerContext.push(player);\n }\n\n if (player) {\n player.addEventListener(PlayState.Destroyed, () => {\n const index = playerContext.indexOf(player);\n const nonFactoryPlayerIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n\n // if the player is being removed from the factory side of the context\n // (which is where the [style] and [class] bindings do their thing) then\n // that side of the array cannot be resized since the respective bindings\n // have pointer index values that point to the associated factory instance\n if (index) {\n if (index < nonFactoryPlayerIndex) {\n playerContext[index] = null;\n } else {\n playerContext.splice(index, 1);\n }\n }\n player.destroy();\n });\n\n const playerHandler =\n rootContext.playerHandler || (rootContext.playerHandler = new CorePlayerHandler());\n playerHandler.queuePlayer(player, ref);\n return true;\n }\n\n return false;\n}\n\nexport function getPlayersInternal(playerContext: PlayerContext): Player[] {\n const players: Player[] = [];\n const nonFactoryPlayersStart = playerContext[PlayerIndex.NonBuilderPlayersStart];\n\n // add all factory-based players (which are apart of [style] and [class] bindings)\n for (let i = PlayerIndex.PlayerBuildersStartPosition + PlayerIndex.PlayerOffsetPosition;\n i < nonFactoryPlayersStart; i += PlayerIndex.PlayerAndPlayerBuildersTupleSize) {\n const player = playerContext[i] as Player | null;\n if (player) {\n players.push(player);\n }\n }\n\n // add all custom players (not apart of [style] and [class] bindings)\n for (let i = nonFactoryPlayersStart; i < playerContext.length; i++) {\n players.push(playerContext[i] as Player);\n }\n\n return players;\n}\n\n\nexport function getOrCreatePlayerContext(target: {}, context?: LContext | null): PlayerContext|\n null {\n context = context || getLContext(target) !;\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return null;\n }\n\n const {lView, nodeIndex} = context;\n const stylingContext = getStylingContextFromLView(nodeIndex, lView);\n return getPlayerContext(stylingContext) || allocPlayerContext(stylingContext);\n}\n\nexport function getPlayerContext(stylingContext: StylingContext): PlayerContext|null {\n return stylingContext[StylingIndex.PlayerContext];\n}\n\nexport function allocPlayerContext(data: StylingContext): PlayerContext {\n return data[StylingIndex.PlayerContext] =\n [PlayerIndex.SinglePlayerBuildersStartPosition, null, null, null, null];\n}\n\nexport function throwInvalidRefError() {\n throw new Error('Only elements that exist in an Angular application can be used for animations');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {ProceduralRenderer3, RElement, isProceduralRenderer} from '../interfaces/renderer';\nimport {RENDERER} from '../interfaces/view';\nimport {getLView} from '../state';\nimport {isAnimationProp} from '../styling/util';\n\n\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n *\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(native: RElement, attrs: TAttributes): number {\n const renderer = getLView()[RENDERER];\n const isProc = isProceduralRenderer(renderer);\n\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n (renderer as ProceduralRenderer3).setProperty(native, attrName, attrVal);\n }\n } else {\n isProc ?\n (renderer as ProceduralRenderer3)\n .setAttribute(native, attrName as string, attrVal as string) :\n native.setAttribute(attrName as string, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n\nexport function attrsStylingIndexOf(attrs: TAttributes, startIndex: number): number {\n for (let i = startIndex; i < attrs.length; i++) {\n const val = attrs[i];\n if (val === AttributeMarker.Classes || val === AttributeMarker.Styles) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string | AttributeMarker | CssSelector) {\n return marker === AttributeMarker.Bindings || marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, LView} from '../interfaces/view';\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW] !;\n viewOffset--;\n }\n return parentView;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {TNodeType} from '../interfaces/node';\nimport {CONTEXT, DECLARATION_VIEW, FLAGS, LView, LViewFlags, PARENT, RootContext, T_HOST} from '../interfaces/view';\n\nimport {isLContainer, isLView, readPatchedLView} from './view_utils';\n\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView|null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] ! : parent;\n}\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView(componentOrLView: LView | {}): LView {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView) !;\n while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n lView = getLViewParent(lView) !;\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Given an `LView`, find the closest declaration view which is not an embedded view.\n *\n * This method searches for the `LView` associated with the component which declared the `LView`.\n *\n * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise\n * it walks the declaration parents until it finds a component view (non-embedded-view.)\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nexport function findComponentView(lView: LView): LView {\n let rootTNode = lView[T_HOST];\n while (rootTNode !== null && rootTNode.type === TNodeType.View) {\n ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');\n lView = lView[DECLARATION_VIEW] !;\n rootTNode = lView[T_HOST];\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext(viewOrComponent: LView | {}): RootContext {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as RootContext;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags, InjectionToken} from '../di';\nimport {Injector} from '../di/injector';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/injector_compatibility';\nimport {getInjectableDef, getInjectorDef} from '../di/interface/defs';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual} from '../util/assert';\n\nimport {getComponentDef, getDirectiveDef, getPipeDef} from './definition';\nimport {NG_ELEMENT_ID} from './fields';\nimport {DirectiveDef, FactoryFn} from './interfaces/definition';\nimport {NO_PARENT_INJECTOR, NodeInjectorFactory, PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags, TNODE, isFactory} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {DECLARATION_VIEW, INJECTOR, LView, TData, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {getLView, getPreviousOrParentTNode, setTNodeAndViewData} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {isComponent, isComponentDef} from './util/view_utils';\n\n\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nfunction setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number, tView: TView, type: Type<any>| InjectionToken<any>| string): void {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'expected firstTemplatePass to be true');\n let id: number|undefined =\n typeof type !== 'string' ? (type as any)[NG_ELEMENT_ID] : type.charCodeAt(0) || 0;\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomBit = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomBit;\n\n // Use the raw bloomBit number to determine which bloom filter bucket we should check\n // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n const b7 = bloomBit & 0x80;\n const b6 = bloomBit & 0x40;\n const b5 = bloomBit & 0x20;\n const tData = tView.data as number[];\n\n if (b7) {\n b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :\n (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));\n } else {\n b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :\n (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));\n }\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param hostView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode | TContainerNode | TElementContainerNode, hostView: LView): number {\n const existingInjectorIndex = getInjectorIndex(tNode, hostView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = hostView[TVIEW];\n if (tView.firstTemplatePass) {\n tNode.injectorIndex = hostView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(hostView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n\n ngDevMode && assertEqual(\n tNode.flags === 0 || tNode.flags === TNodeFlags.isComponent, true,\n 'expected tNode.flags to not be initialized');\n }\n\n const parentLoc = getParentInjectorLocation(tNode, hostView);\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, hostView);\n\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < 8; i++) {\n hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode | null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\n\nexport function getInjectorIndex(tNode: TNode, hostView: LView): number {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {\n return -1;\n } else {\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`\n */\nexport function getParentInjectorLocation(tNode: TNode, view: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n return tNode.parent.injectorIndex as any; // ViewOffset is 0\n }\n\n // For most cases, the parent injector index can be found on the host node (e.g. for component\n // or container), so this loop will be skipped, but we must keep the loop here to support\n // the rarer case of deeply nested <ng-template> tags or inline views.\n let hostTNode = view[T_HOST];\n let viewOffset = 1;\n while (hostTNode && hostTNode.injectorIndex === -1) {\n view = view[DECLARATION_VIEW] !;\n hostTNode = view ? view[T_HOST] : null;\n viewOffset++;\n }\n\n return hostTNode ?\n hostTNode.injectorIndex | (viewOffset << RelativeInjectorLocationFlags.ViewOffsetShift) :\n -1 as any;\n}\n\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number, view: LView, token: InjectionToken<any>| Type<any>): void {\n bloomAdd(injectorIndex, view[TVIEW], token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string|null {\n ngDevMode && assertNodeOfPossibleTypes(\n tNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n if (value === AttributeMarker.Classes && attrNameToInject === 'class') {\n let accumulatedClasses = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedClasses += ' ' + attrs[i++];\n }\n return accumulatedClasses.trim();\n } else if (value === AttributeMarker.Styles && attrNameToInject === 'style') {\n let accumulatedStyles = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedStyles += `${attrs[i++]}: ${attrs[i++]}; `;\n }\n return accumulatedStyles.trim();\n } else {\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. Negative values are reserved for special objects.\n * - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TElementNode | TContainerNode | TElementContainerNode | null, lView: LView,\n token: Type<T>| InjectionToken<T>, flags: InjectFlags = InjectFlags.Default,\n notFoundValue?: any): T|null {\n if (tNode) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n const savePreviousOrParentTNode = getPreviousOrParentTNode();\n const saveLView = getLView();\n setTNodeAndViewData(tNode, lView);\n try {\n const value = bloomHash();\n if (value == null && !(flags & InjectFlags.Optional)) {\n throw new Error(`No provider for ${stringifyForError(token)}!`);\n } else {\n return value;\n }\n } finally {\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n } else if (typeof bloomHash == 'number') {\n if (bloomHash === -1) {\n // `-1` is a special value used to identify `Injector` types.\n return new NodeInjector(tNode, lView) as any;\n }\n // If the token has a bloom hash, then it is a token which could be in NodeInjector.\n\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView|null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation: RelativeInjectorLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode|null =\n flags & InjectFlags.Host ? findComponentView(lView)[T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching\n // the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + PARENT_INJECTOR];\n\n if (!shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n parentLocation = lView[injectorIndex + PARENT_INJECTOR];\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T|null = searchTokensOnInjector<T>(\n injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n if (shouldSearchParent(\n flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n if (flags & InjectFlags.Optional) {\n return notFoundValue;\n } else {\n throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);\n }\n}\n\nconst NOT_FOUND = {};\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number, lView: LView, token: Type<T>| InjectionToken<T>,\n previousTView: TView | null, flags: InjectFlags, hostTElementNode: TNode | null) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponent(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && (tNode.type === TNodeType.Element));\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(currentTView.data, lView, injectableIdx, tNode as TElementNode);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode, tView: TView, token: Type<T>| InjectionToken<T>, canAccessViewProviders: boolean,\n isHostSpecialCase: boolean | number): number|null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex =\n canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as InjectionToken<any>| Type<any>| DirectiveDef<any>;\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n* Retrieve or instantiate the injectable from the `lData` at particular `index`.\n*\n* This function checks to see if the value has already been instantiated and if so returns the\n* cached `injectable`. Otherwise if it detects that the value is still a factory it\n* instantiates the `injectable` and caches the value.\n*/\nexport function getNodeInjectable(\n tData: TData, lData: LView, index: number, tNode: TElementNode): any {\n let value = lData[index];\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n let previousInjectImplementation;\n if (factory.injectImpl) {\n previousInjectImplementation = setInjectImplementation(factory.injectImpl);\n }\n const savePreviousOrParentTNode = getPreviousOrParentTNode();\n const saveLView = getLView();\n setTNodeAndViewData(tNode, lData);\n try {\n value = lData[index] = factory.factory(null, tData, lData, tNode);\n } finally {\n if (factory.injectImpl) setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(token: Type<any>| InjectionToken<any>| string): number|\n Function|undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number|undefined = (token as any)[NG_ELEMENT_ID];\n // Negative token IDs are used for special objects such as `Injector`\n return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId;\n}\n\nexport function bloomHasToken(\n bloomHash: number, injectorIndex: number, injectorView: LView | TData) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n const b7 = bloomHash & 0x80;\n const b6 = bloomHash & 0x40;\n const b5 = bloomHash & 0x20;\n\n // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n let value: number;\n\n if (b7) {\n value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :\n (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);\n } else {\n value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :\n (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);\n }\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean|number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode|TContainerNode|TElementContainerNode|null,\n private _lView: LView) {}\n\n get(token: any, notFoundValue?: any): any {\n return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n }\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetFactoryOf<T>(type: Type<any>): FactoryFn<T>|null {\n const typeAny = type as any;\n const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||\n getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;\n const factory = ɵɵgetFactoryOf<T>(proto);\n if (factory !== null) {\n return factory;\n } else {\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return (t) => new t();\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER, ERROR_ORIGINAL_ERROR, ERROR_TYPE} from './util/errors';\nimport {DebugContext} from './view';\n\nexport function getType(error: Error): Function {\n return (error as any)[ERROR_TYPE];\n}\n\nexport function getDebugContext(error: Error): DebugContext {\n return (error as any)[ERROR_DEBUG_CONTEXT];\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n\nexport function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void {\n return (error as any)[ERROR_LOGGER] || defaultErrorLogger;\n}\n\n\nfunction defaultErrorLogger(console: Console, ...values: any[]) {\n (<any>console.error)(...values);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getDebugContext, getErrorLogger, getOriginalError} from './errors';\n\n\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n const originalError = this._findOriginalError(error);\n const context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n const errorLogger = getErrorLogger(error);\n\n errorLogger(this._console, `ERROR`, error);\n if (originalError) {\n errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n }\n\n /** @internal */\n _findContext(error: any): any {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n\n return null;\n }\n\n /** @internal */\n _findOriginalError(error: Error): any {\n let e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A schema definition associated with an NgModule.\n *\n * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata { name: string; }\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n name: 'custom-elements'\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema'\n};\n","\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport './ng_dev_mode';\nimport {global} from './global';\n\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n\n\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\nexport function createNamedArrayType(name: string): typeof Array {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // We need to do it this way so that TypeScript does not down-level the below code.\n const FunctionConstructor: any = createNamedArrayType.constructor;\n return (new FunctionConstructor('Array', `return class ABC extends Array{}`))(Array);\n } catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n } else {\n throw new Error(\n 'Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function normalizeDebugBindingName(name: string) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n } catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {TStylingContext} from '../styling_next/interfaces';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer';\nimport {StylingContext} from './styling';\nimport {LView, TView} from './view';\n\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0,\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 1,\n /**\n * The TNode contains information about an {@link LView}\n */\n View = 2,\n /**\n * The TNode contains information about a DOM element aka {@link RNode}.\n */\n Element = 3,\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 4,\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n IcuContainer = 5,\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** This bit is set if the node is a component */\n isComponent = 0b000001,\n\n /** This bit is set if the node has been projected */\n isProjected = 0b000010,\n\n /** This bit is set if any directive on this node has content queries */\n hasContentQuery = 0b000100,\n\n /** This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0b001000,\n\n /** This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0b010000,\n\n /** This bit is set if the node has been detached by i18n */\n isDetached = 0b100000,\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 = 0b00000000000000001111111111111111,\n\n /** The count of view providers from the component on this node is encoded on the 16 most\n significant bits */\n CptViewProvidersCountShift = 16,\n CptViewProvidersCountShifter = 0b00000000000000010000000000000000,\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 * 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 `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,\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 * 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 * 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 injector\n * in the same view. We pass the parent injector index down the node tree of a view so it's\n * possible to find the parent injector without walking a potentially deep node tree. Injector\n * indices are not set across view boundaries because there could be multiple component hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /**\n * Stores starting index of the directives.\n */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n */\n directiveEnd: number;\n\n /**\n * Stores the first index where property binding metadata is stored for\n * this node.\n */\n propertyMetadataStartIndex: number;\n\n /**\n * Stores the exclusive final index where property binding metadata is\n * stored for this node.\n */\n propertyMetadataEndIndex: number;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\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 /** The tag name associated with this node. */\n tagName: string|null;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various use-cases\n * (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 * 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.\n *\n * - `undefined` means that the prop has not been initialized yet,\n * - `null` means that the prop has been initialized but no inputs have been found.\n */\n inputs: PropertyAliases|null|undefined;\n\n /**\n * Output data for all directives on this node.\n *\n * - `undefined` means that the prop has not been initialized yet,\n * - `null` means that the prop has been initialized but no outputs have been found.\n */\n outputs: PropertyAliases|null|undefined;\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 basis\n * the act of projecting nodes might change nodes relationship at the insertion point (target\n * view). At the same time we need to keep initial relationship between nodes as expressed in\n * 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 stylingTemplate: StylingContext|null;\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 as\n * 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 buffer of functions that will be called once `elementEnd` (or `element`) completes.\n *\n * Due to the nature of how directives work in Angular, some directive code may\n * need to fire after any template-level code runs. If present, this array will\n * be flushed (each function will be invoked) once the associated element is\n * created.\n *\n * If an element is created multiple times then this function will be populated\n * with functions each time the creation block is called.\n */\n onElementCreationFns: Function[]|null;\n // TODO (matsko): rename this to `styles` once the old styling impl is gone\n newStyles: TStylingContext|null;\n // TODO (matsko): rename this to `classes` once the old styling impl is gone\n newClasses: TStylingContext|null;\n}\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 or\n * a component without projection, it will be null.\n */\n projection: (TNode|RNode[])[]|null;\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}\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: TElementNode|TTextNode|null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n /**\n * Indicates the current active case for an ICU expression.\n * It is null when there is no active case.\n */\n activeCaseIndex: number|null;\n}\n\n/** Static data for a view */\nexport interface TViewNode extends TNode {\n /** If -1, it's a dynamically created view. Otherwise, it is the view block ID. */\n index: number;\n child: TElementNode|TTextNode|TElementContainerNode|TContainerNode|TProjectionNode|null;\n parent: TContainerNode|null;\n tViews: null;\n projection: null;\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}\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: publicName\n * i+2: privateName\n *\n * e.g. [0, 'change', '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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Expresses a single CSS Selector.\n *\n * Beginning of array\n * - First index: element name\n * - Subsequent odd indices: attr keys\n * - Subsequent even indices: attr values\n *\n * After SelectorFlags.CLASS flag\n * - Class name values\n *\n * SelectorFlags.NOT flag\n * - Changes the mode to NOT\n * - Can be combined with other flags to set the element / attr / class mode\n *\n * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT\n *\n * Example:\n * Original: `div.foo.bar[attr1=val1][attr2]`\n * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']\n *\n * Original: 'div[attr1]:not(.foo[attr2])\n * Parsed: [\n * 'div', 'attr1', '',\n * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'\n * ]\n *\n * See more examples in node_selector_matcher_spec.ts\n */\nexport type CssSelector = (string | SelectorFlags)[];\n\n/**\n * A list of CssSelectors.\n *\n * A directive or component can have multiple selectors. This type is used for\n * directive defs so any of the selectors in the list will match that directive.\n *\n * Original: 'form, [ngForm]'\n * Parsed: [['form'], ['', 'ngForm', '']]\n */\nexport type CssSelectorList = CssSelector[];\n\n/**\n * List of slots for a projection. A slot can be either based on a parsed CSS selector\n * which will be used to determine nodes which are projected into that slot.\n *\n * When set to \"*\", the slot is reserved and can be used for multi-slot projection\n * using {@link ViewContainerRef#createComponent}. The last slot that specifies the\n * wildcard selector will retrieve all projectable nodes which do not match any selector.\n */\nexport type ProjectionSlots = (CssSelectorList | '*')[];\n\n/** Flags used to build up CssSelectors */\nexport const enum SelectorFlags {\n /** Indicates this is the beginning of a new negative selector */\n NOT = 0b0001,\n\n /** Mode for matching attributes */\n ATTRIBUTE = 0b0010,\n\n /** Mode for matching tag names */\n ELEMENT = 0b0100,\n\n /** Mode for matching class names */\n CLASS = 0b1000,\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n brand: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE = {} as NO_CHANGE;\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {HostInstructionsQueue, HostInstructionsQueueIndex, StylingContext, StylingIndex} from '../interfaces/styling';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from '../styling/shared';\n\n/*\n * This file contains the logic to defer all hostBindings-related styling code to run\n * at a later point, instead of immediately (as is the case with how template-level\n * styling instructions are run).\n *\n * Certain styling instructions, present within directives, components and sub-classed\n * directives, are evaluated at different points (depending on priority) and will therefore\n * not be applied to the styling context of an element immediately. They are instead\n * designed to be applied just before styling is applied to an element.\n *\n * (The priority for when certain host-related styling operations are executed is discussed\n * more within `interfaces/styling.ts`.)\n */\n\nexport function registerHostDirective(context: StylingContext, directiveIndex: number) {\n let buffer = context[StylingIndex.HostInstructionsQueue];\n if (!buffer) {\n buffer = context[StylingIndex.HostInstructionsQueue] = [DEFAULT_TEMPLATE_DIRECTIVE_INDEX];\n }\n buffer[HostInstructionsQueueIndex.LastRegisteredDirectiveIndexPosition] = directiveIndex;\n}\n\n/**\n * Queues a styling instruction to be run just before `renderStyling()` is executed.\n */\nexport function enqueueHostInstruction<T extends Function>(\n context: StylingContext, priority: number, instructionFn: T, instructionFnArgs: ParamsOf<T>) {\n const buffer: HostInstructionsQueue|null = context[StylingIndex.HostInstructionsQueue];\n // Buffer may be null if host element is a template node. In this case, just ignore the style.\n if (buffer != null) {\n const index = findNextInsertionIndex(buffer, priority);\n buffer.splice(index, 0, priority, instructionFn, instructionFnArgs);\n }\n}\n\n/**\n * Figures out where exactly to to insert the next host instruction queue entry.\n */\nfunction findNextInsertionIndex(buffer: HostInstructionsQueue, priority: number): number {\n for (let i = HostInstructionsQueueIndex.ValuesStartPosition; i < buffer.length;\n i += HostInstructionsQueueIndex.Size) {\n const p = buffer[i + HostInstructionsQueueIndex.DirectiveIndexOffset] as number;\n if (p > priority) {\n return i;\n }\n }\n return buffer.length;\n}\n\n/**\n * Iterates through the host instructions queue (if present within the provided\n * context) and executes each queued instruction entry.\n */\nexport function flushQueue(context: StylingContext): void {\n const buffer = context[StylingIndex.HostInstructionsQueue];\n if (buffer) {\n for (let i = HostInstructionsQueueIndex.ValuesStartPosition; i < buffer.length;\n i += HostInstructionsQueueIndex.Size) {\n const fn = buffer[i + HostInstructionsQueueIndex.InstructionFnOffset] as Function;\n const args = buffer[i + HostInstructionsQueueIndex.ParamsOffset] as any[];\n fn.apply(this, args);\n }\n buffer.length = HostInstructionsQueueIndex.ValuesStartPosition;\n }\n}\n\n/**\n * Determines whether or not to allow the host instructions queue to be flushed or not.\n *\n * Because the hostBindings function code is unaware of the presence of other host bindings\n * (as well as the template function) then styling is evaluated multiple times per element.\n * To prevent style and class values from being applied to the element multiple times, a\n * flush is only allowed when the last directive (the directive that was registered into\n * the styling context) attempts to render its styling.\n */\nexport function allowFlush(context: StylingContext, directiveIndex: number): boolean {\n const buffer = context[StylingIndex.HostInstructionsQueue];\n if (buffer) {\n return buffer[HostInstructionsQueueIndex.LastRegisteredDirectiveIndexPosition] ===\n directiveIndex;\n }\n return true;\n}\n\n/**\n * Infers the parameters of a given function into a typed array.\n */\nexport type ParamsOf<T> = T extends(...args: infer T) => any ? T : never;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {PlayerFactory, PlayerFactoryBuildFn} from '../interfaces/player';\n\n/**\n * Combines the binding value and a factory for an animation player.\n *\n * Used to bind a player to an element template binding (currently only\n * `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings\n * supported). The provided `factoryFn` function will be run once all\n * the associated bindings have been evaluated on the element and is\n * designed to return a player which will then be placed on the element.\n *\n * @param factoryFn The function that is used to create a player\n * once all the rendering-related (styling values) have been\n * processed for the element binding.\n * @param value The raw value that will be exposed to the binding\n * so that the binding can update its internal values when\n * any changes are evaluated.\n */\nexport function bindPlayerFactory<T>(factoryFn: PlayerFactoryBuildFn, value: T): PlayerFactory {\n return new BoundPlayerFactory(factoryFn, value) as any;\n}\n\nexport class BoundPlayerFactory<T> {\n '__brand__': 'Brand for PlayerFactory that nothing will match';\n constructor(public fn: PlayerFactoryBuildFn, public value: T) {}\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {BindingStore, BindingType, Player, PlayerBuilder, PlayerFactory, PlayerIndex} from '../interfaces/player';\nimport {RElement, Renderer3, RendererStyleFlags3, isProceduralRenderer} from '../interfaces/renderer';\nimport {DirectiveOwnerAndPlayerBuilderIndex, DirectiveRegistryValuesIndex, InitialStylingValues, InitialStylingValuesIndex, MapBasedOffsetValues, MapBasedOffsetValuesIndex, SinglePropOffsetValues, SinglePropOffsetValuesIndex, StylingContext, StylingFlags, StylingIndex} from '../interfaces/styling';\nimport {LView, RootContext} from '../interfaces/view';\nimport {NO_CHANGE} from '../tokens';\nimport {getRootContext} from '../util/view_traversal_utils';\n\nimport {allowFlush as allowHostInstructionsQueueFlush, flushQueue as flushHostInstructionsQueue} from './host_instructions_queue';\nimport {BoundPlayerFactory} from './player_factory';\nimport {addPlayerInternal, allocPlayerContext, allocateOrUpdateDirectiveIntoContext, createEmptyStylingContext, getPlayerContext} from './util';\n\n\n/**\n * This file includes the code to power all styling-binding operations in Angular.\n *\n * These include:\n * [style]=\"myStyleObj\"\n * [class]=\"myClassObj\"\n * [style.prop]=\"myPropValue\"\n * [class.name]=\"myClassValue\"\n *\n * It also includes code that will allow style binding code to operate within host\n * bindings for components/directives.\n *\n * There are many different ways in which these functions below are called. Please see\n * `render3/interfaces/styling.ts` to get a better idea of how the styling algorithm works.\n */\n\n\n\n/**\n * Creates a new StylingContext an fills it with the provided static styling attribute values.\n */\nexport function initializeStaticContext(\n attrs: TAttributes, stylingStartIndex: number, directiveIndex: number = 0): StylingContext {\n const context = createEmptyStylingContext();\n patchContextWithStaticAttrs(context, attrs, stylingStartIndex, directiveIndex);\n return context;\n}\n\n/**\n * Designed to update an existing styling context with new static styling\n * data (classes and styles).\n *\n * @param context the existing styling context\n * @param attrs an array of new static styling attributes that will be\n * assigned to the context\n * @param attrsStylingStartIndex what index to start iterating within the\n * provided `attrs` array to start reading style and class values\n */\nexport function patchContextWithStaticAttrs(\n context: StylingContext, attrs: TAttributes, attrsStylingStartIndex: number,\n directiveIndex: number): void {\n // this means the context has already been set and instantiated\n if (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) return;\n\n allocateOrUpdateDirectiveIntoContext(context, directiveIndex);\n\n let initialClasses: InitialStylingValues|null = null;\n let initialStyles: InitialStylingValues|null = null;\n let mode = -1;\n for (let i = attrsStylingStartIndex; i < attrs.length; i++) {\n const attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n } else if (mode == AttributeMarker.Classes) {\n initialClasses = initialClasses || context[StylingIndex.InitialClassValuesPosition];\n patchInitialStylingValue(initialClasses, attr as string, true, directiveIndex);\n } else if (mode == AttributeMarker.Styles) {\n initialStyles = initialStyles || context[StylingIndex.InitialStyleValuesPosition];\n patchInitialStylingValue(initialStyles, attr as string, attrs[++i], directiveIndex);\n }\n }\n}\n\n/**\n * Designed to add a style or class value into the existing set of initial styles.\n *\n * The function will search and figure out if a style/class value is already present\n * within the provided initial styling array. If and when a style/class value is\n * present (allocated) then the code below will set the new value depending on the\n * following cases:\n *\n * 1) if the existing value is falsy (this happens because a `[class.prop]` or\n * `[style.prop]` binding was set, but there wasn't a matching static style\n * or class present on the context)\n * 2) if the value was set already by the template, component or directive, but the\n * new value is set on a higher level (i.e. a sub component which extends a parent\n * component sets its value after the parent has already set the same one)\n * 3) if the same directive provides a new set of styling values to set\n *\n * @param initialStyling the initial styling array where the new styling entry will be added to\n * @param prop the property value of the new entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the new entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n */\nfunction patchInitialStylingValue(\n initialStyling: InitialStylingValues, prop: string, value: any,\n directiveOwnerIndex: number): void {\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialStyling.length;\n i += InitialStylingValuesIndex.Size) {\n const key = initialStyling[i + InitialStylingValuesIndex.PropOffset];\n if (key === prop) {\n const existingValue =\n initialStyling[i + InitialStylingValuesIndex.ValueOffset] as string | null | boolean;\n const existingOwner =\n initialStyling[i + InitialStylingValuesIndex.DirectiveOwnerOffset] as number;\n if (allowValueChange(existingValue, value, existingOwner, directiveOwnerIndex)) {\n addOrUpdateStaticStyle(i, initialStyling, prop, value, directiveOwnerIndex);\n }\n return;\n }\n }\n\n // We did not find existing key, add a new one.\n addOrUpdateStaticStyle(null, initialStyling, prop, value, directiveOwnerIndex);\n}\n\n/**\n * Runs through the initial class values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the classes were applied up until\n */\nexport function renderInitialClasses(\n element: RElement, context: StylingContext, renderer: Renderer3, startIndex?: number): number {\n const initialClasses = context[StylingIndex.InitialClassValuesPosition];\n let i = startIndex || InitialStylingValuesIndex.KeyValueStartPosition;\n while (i < initialClasses.length) {\n const value = initialClasses[i + InitialStylingValuesIndex.ValueOffset];\n if (value) {\n setClass(\n element, initialClasses[i + InitialStylingValuesIndex.PropOffset] as string, true,\n renderer, null);\n }\n i += InitialStylingValuesIndex.Size;\n }\n return i;\n}\n\n/**\n * Runs through the initial styles values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the styles were applied up until\n */\nexport function renderInitialStyles(\n element: RElement, context: StylingContext, renderer: Renderer3, startIndex?: number) {\n const initialStyles = context[StylingIndex.InitialStyleValuesPosition];\n let i = startIndex || InitialStylingValuesIndex.KeyValueStartPosition;\n while (i < initialStyles.length) {\n const value = initialStyles[i + InitialStylingValuesIndex.ValueOffset];\n if (value) {\n setStyle(\n element, initialStyles[i + InitialStylingValuesIndex.PropOffset] as string,\n value as string, renderer, null);\n }\n i += InitialStylingValuesIndex.Size;\n }\n return i;\n}\n\nexport function allowNewBindingsForStylingContext(context: StylingContext): boolean {\n return (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) === 0;\n}\n\n/**\n * Adds in new binding values to a styling context.\n *\n * If a directive value is provided then all provided class/style binding names will\n * reference the provided directive.\n *\n * @param context the existing styling context\n * @param classBindingNames an array of class binding names that will be added to the context\n * @param styleBindingNames an array of style binding names that will be added to the context\n * @param styleSanitizer an optional sanitizer that handle all sanitization on for each of\n * the bindings added to the context. Note that if a directive is provided then the sanitizer\n * instance will only be active if and when the directive updates the bindings that it owns.\n */\nexport function updateContextWithBindings(\n context: StylingContext, directiveIndex: number, classBindingNames?: string[] | null,\n styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null) {\n if (context[StylingIndex.MasterFlagPosition] & StylingFlags.BindingAllocationLocked) return;\n\n // this means the context has already been patched with the directive's bindings\n const isNewDirective =\n findOrPatchDirectiveIntoRegistry(context, directiveIndex, false, styleSanitizer);\n if (!isNewDirective) {\n // this means the directive has already been patched in ... No point in doing anything\n return;\n }\n\n if (styleBindingNames) {\n styleBindingNames = hyphenateEntries(styleBindingNames);\n }\n\n // there are alot of variables being used below to track where in the context the new\n // binding values will be placed. Because the context consists of multiple types of\n // entries (single classes/styles and multi classes/styles) alot of the index positions\n // need to be computed ahead of time and the context needs to be extended before the values\n // are inserted in.\n const singlePropOffsetValues = context[StylingIndex.SinglePropOffsetPositions];\n const totalCurrentClassBindings =\n singlePropOffsetValues[SinglePropOffsetValuesIndex.ClassesCountPosition];\n const totalCurrentStyleBindings =\n singlePropOffsetValues[SinglePropOffsetValuesIndex.StylesCountPosition];\n\n const cachedClassMapValues = context[StylingIndex.CachedMultiClasses];\n const cachedStyleMapValues = context[StylingIndex.CachedMultiStyles];\n\n const classesOffset = totalCurrentClassBindings * StylingIndex.Size;\n const stylesOffset = totalCurrentStyleBindings * StylingIndex.Size;\n\n const singleStylesStartIndex = StylingIndex.SingleStylesStartPosition;\n let singleClassesStartIndex = singleStylesStartIndex + stylesOffset;\n let multiStylesStartIndex = singleClassesStartIndex + classesOffset;\n let multiClassesStartIndex = multiStylesStartIndex + stylesOffset;\n\n // because we're inserting more bindings into the context, this means that the\n // binding values need to be referenced the singlePropOffsetValues array so that\n // the template/directive can easily find them inside of the `styleProp`\n // and the `classProp` functions without iterating through the entire context.\n // The first step to setting up these reference points is to mark how many bindings\n // are being added. Even if these bindings already exist in the context, the directive\n // or template code will still call them unknowingly. Therefore the total values need\n // to be registered so that we know how many bindings are assigned to each directive.\n const currentSinglePropsLength = singlePropOffsetValues.length;\n singlePropOffsetValues.push(\n styleBindingNames ? styleBindingNames.length : 0,\n classBindingNames ? classBindingNames.length : 0);\n\n // the code below will check to see if a new style binding already exists in the context\n // if so then there is no point in inserting it into the context again. Whether or not it\n // exists the styling offset code will now know exactly where it is\n let insertionOffset = 0;\n const filteredStyleBindingNames: string[] = [];\n if (styleBindingNames && styleBindingNames.length) {\n for (let i = 0; i < styleBindingNames.length; i++) {\n const name = styleBindingNames[i];\n let singlePropIndex =\n getMatchingBindingIndex(context, name, singleStylesStartIndex, singleClassesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = singleClassesStartIndex + insertionOffset;\n insertionOffset += StylingIndex.Size;\n filteredStyleBindingNames.push(name);\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n\n // just like with the style binding loop above, the new class bindings get the same treatment...\n const filteredClassBindingNames: string[] = [];\n if (classBindingNames && classBindingNames.length) {\n for (let i = 0; i < classBindingNames.length; i++) {\n const name = classBindingNames[i];\n let singlePropIndex =\n getMatchingBindingIndex(context, name, singleClassesStartIndex, multiStylesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = multiStylesStartIndex + insertionOffset;\n insertionOffset += StylingIndex.Size;\n filteredClassBindingNames.push(name);\n } else {\n singlePropIndex += filteredStyleBindingNames.length * StylingIndex.Size;\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n\n // because new styles are being inserted, this means the existing collection of style offset\n // index values are incorrect (they point to the wrong values). The code below will run through\n // the entire offset array and update the existing set of index values to point to their new\n // locations while taking the new binding values into consideration.\n let i = SinglePropOffsetValuesIndex.ValueStartPosition;\n if (filteredStyleBindingNames.length) {\n while (i < currentSinglePropsLength) {\n const totalStyles =\n singlePropOffsetValues[i + SinglePropOffsetValuesIndex.StylesCountPosition];\n const totalClasses =\n singlePropOffsetValues[i + SinglePropOffsetValuesIndex.ClassesCountPosition];\n if (totalClasses) {\n const start = i + SinglePropOffsetValuesIndex.ValueStartPosition + totalStyles;\n for (let j = start; j < start + totalClasses; j++) {\n singlePropOffsetValues[j] += filteredStyleBindingNames.length * StylingIndex.Size;\n }\n }\n\n const total = totalStyles + totalClasses;\n i += SinglePropOffsetValuesIndex.ValueStartPosition + total;\n }\n }\n\n const totalNewEntries = filteredClassBindingNames.length + filteredStyleBindingNames.length;\n\n // in the event that there are new style values being inserted, all existing class and style\n // bindings need to have their pointer values offsetted with the new amount of space that is\n // used for the new style/class bindings.\n for (let i = singleStylesStartIndex; i < context.length; i += StylingIndex.Size) {\n const isMultiBased = i >= multiStylesStartIndex;\n const isClassBased = i >= (isMultiBased ? multiClassesStartIndex : singleClassesStartIndex);\n const flag = getPointers(context, i);\n const staticIndex = getInitialIndex(flag);\n let singleOrMultiIndex = getMultiOrSingleIndex(flag);\n if (isMultiBased) {\n singleOrMultiIndex +=\n isClassBased ? (filteredStyleBindingNames.length * StylingIndex.Size) : 0;\n } else {\n singleOrMultiIndex += (totalNewEntries * StylingIndex.Size) +\n ((isClassBased ? filteredStyleBindingNames.length : 0) * StylingIndex.Size);\n }\n setFlag(context, i, pointers(flag, staticIndex, singleOrMultiIndex));\n }\n\n // this is where we make space in the context for the new style bindings\n for (let i = 0; i < filteredStyleBindingNames.length * StylingIndex.Size; i++) {\n context.splice(multiClassesStartIndex, 0, null);\n context.splice(singleClassesStartIndex, 0, null);\n singleClassesStartIndex++;\n multiStylesStartIndex++;\n multiClassesStartIndex += 2; // both single + multi slots were inserted\n }\n\n // this is where we make space in the context for the new class bindings\n for (let i = 0; i < filteredClassBindingNames.length * StylingIndex.Size; i++) {\n context.splice(multiStylesStartIndex, 0, null);\n context.push(null);\n multiStylesStartIndex++;\n multiClassesStartIndex++;\n }\n\n const initialClasses = context[StylingIndex.InitialClassValuesPosition];\n const initialStyles = context[StylingIndex.InitialStyleValuesPosition];\n\n // the code below will insert each new entry into the context and assign the appropriate\n // flags and index values to them. It's important this runs at the end of this function\n // because the context, property offset and index values have all been computed just before.\n for (let i = 0; i < totalNewEntries; i++) {\n const entryIsClassBased = i >= filteredStyleBindingNames.length;\n const adjustedIndex = entryIsClassBased ? (i - filteredStyleBindingNames.length) : i;\n const propName = entryIsClassBased ? filteredClassBindingNames[adjustedIndex] :\n filteredStyleBindingNames[adjustedIndex];\n\n let multiIndex, singleIndex;\n if (entryIsClassBased) {\n multiIndex = multiClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * StylingIndex.Size);\n singleIndex = singleClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * StylingIndex.Size);\n } else {\n multiIndex =\n multiStylesStartIndex + ((totalCurrentStyleBindings + adjustedIndex) * StylingIndex.Size);\n singleIndex = singleStylesStartIndex +\n ((totalCurrentStyleBindings + adjustedIndex) * StylingIndex.Size);\n }\n\n // if a property is not found in the initial style values list then it\n // is ALWAYS added in case a follow-up directive introduces the same initial\n // style/class value later on.\n let initialValuesToLookup = entryIsClassBased ? initialClasses : initialStyles;\n let indexForInitial = getInitialStylingValuesIndexOf(initialValuesToLookup, propName);\n if (indexForInitial === -1) {\n indexForInitial = addOrUpdateStaticStyle(\n null, initialValuesToLookup, propName, entryIsClassBased ? false : null,\n directiveIndex) +\n InitialStylingValuesIndex.ValueOffset;\n } else {\n indexForInitial += InitialStylingValuesIndex.ValueOffset;\n }\n\n const initialFlag =\n prepareInitialFlag(context, propName, entryIsClassBased, styleSanitizer || null);\n\n setFlag(context, singleIndex, pointers(initialFlag, indexForInitial, multiIndex));\n setProp(context, singleIndex, propName);\n setValue(context, singleIndex, null);\n setPlayerBuilderIndex(context, singleIndex, 0, directiveIndex);\n\n setFlag(context, multiIndex, pointers(initialFlag, indexForInitial, singleIndex));\n setProp(context, multiIndex, propName);\n setValue(context, multiIndex, null);\n setPlayerBuilderIndex(context, multiIndex, 0, directiveIndex);\n }\n\n // the total classes/style values are updated so the next time the context is patched\n // additional style/class bindings from another directive then it knows exactly where\n // to insert them in the context\n singlePropOffsetValues[SinglePropOffsetValuesIndex.ClassesCountPosition] =\n totalCurrentClassBindings + filteredClassBindingNames.length;\n singlePropOffsetValues[SinglePropOffsetValuesIndex.StylesCountPosition] =\n totalCurrentStyleBindings + filteredStyleBindingNames.length;\n\n // the map-based values also need to know how many entries got inserted\n cachedClassMapValues[MapBasedOffsetValuesIndex.EntriesCountPosition] +=\n filteredClassBindingNames.length;\n cachedStyleMapValues[MapBasedOffsetValuesIndex.EntriesCountPosition] +=\n filteredStyleBindingNames.length;\n const newStylesSpaceAllocationSize = filteredStyleBindingNames.length * StylingIndex.Size;\n const newClassesSpaceAllocationSize = filteredClassBindingNames.length * StylingIndex.Size;\n\n // update the multi styles cache with a reference for the directive that was just inserted\n const directiveMultiStylesStartIndex =\n multiStylesStartIndex + totalCurrentStyleBindings * StylingIndex.Size;\n const cachedStyleMapIndex = cachedStyleMapValues.length;\n registerMultiMapEntry(\n context, directiveIndex, false, directiveMultiStylesStartIndex,\n filteredStyleBindingNames.length);\n\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < cachedStyleMapIndex;\n i += MapBasedOffsetValuesIndex.Size) {\n // multi values start after all the single values (which is also where classes are) in the\n // context therefore the new class allocation size should be taken into account\n cachedStyleMapValues[i + MapBasedOffsetValuesIndex.PositionStartOffset] +=\n newClassesSpaceAllocationSize + newStylesSpaceAllocationSize;\n }\n\n // update the multi classes cache with a reference for the directive that was just inserted\n const directiveMultiClassesStartIndex =\n multiClassesStartIndex + totalCurrentClassBindings * StylingIndex.Size;\n const cachedClassMapIndex = cachedClassMapValues.length;\n registerMultiMapEntry(\n context, directiveIndex, true, directiveMultiClassesStartIndex,\n filteredClassBindingNames.length);\n\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < cachedClassMapIndex;\n i += MapBasedOffsetValuesIndex.Size) {\n // the reason why both the styles + classes space is allocated to the existing offsets is\n // because the styles show up before the classes in the context and any new inserted\n // styles will offset any existing class entries in the context (even if there are no\n // new class entries added) also the reason why it's *2 is because both single + multi\n // entries for each new style have been added in the context before the multi class values\n // actually start\n cachedClassMapValues[i + MapBasedOffsetValuesIndex.PositionStartOffset] +=\n (newStylesSpaceAllocationSize * 2) + newClassesSpaceAllocationSize;\n }\n\n // there is no initial value flag for the master index since it doesn't\n // reference an initial style value\n const masterFlag = pointers(0, 0, multiStylesStartIndex);\n setFlag(context, StylingIndex.MasterFlagPosition, masterFlag);\n}\n\n/**\n * Searches through the existing registry of directives\n */\nexport function findOrPatchDirectiveIntoRegistry(\n context: StylingContext, directiveIndex: number, staticModeOnly: boolean,\n styleSanitizer?: StyleSanitizeFn | null): boolean {\n const directiveRegistry = context[StylingIndex.DirectiveRegistryPosition];\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n const singlePropStartPosition = index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset;\n\n // this means that the directive has already been registered into the registry\n if (index < directiveRegistry.length &&\n (directiveRegistry[singlePropStartPosition] as number) >= 0)\n return false;\n\n const singlePropsStartIndex =\n staticModeOnly ? -1 : context[StylingIndex.SinglePropOffsetPositions].length;\n allocateOrUpdateDirectiveIntoContext(\n context, directiveIndex, singlePropsStartIndex, styleSanitizer);\n return true;\n}\n\nfunction getMatchingBindingIndex(\n context: StylingContext, bindingName: string, start: number, end: number) {\n for (let j = start; j < end; j += StylingIndex.Size) {\n if (getProp(context, j) === bindingName) return j;\n }\n return -1;\n}\n\n/**\n * Registers the provided multi class values to the context.\n *\n * This function will iterate over the provided `classesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngClass` and `[class]`\n * both update the `foo` className value at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param classesInput The key/value map of CSS class names that will be used for the update.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\nexport function updateClassMap(\n context: StylingContext, classesInput: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n directiveIndex: number = 0): void {\n updateStylingMap(context, classesInput, true, directiveIndex);\n}\n\n/**\n * Registers the provided multi style values to the context.\n *\n * This function will iterate over the provided `stylesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngStyle` and `[style]`\n * both update the `width` property at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\nexport function updateStyleMap(\n context: StylingContext, stylesInput: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n directiveIndex: number = 0): void {\n updateStylingMap(context, stylesInput, false, directiveIndex);\n}\n\nfunction updateStylingMap(\n context: StylingContext, input: {[key: string]: any} | string |\n BoundPlayerFactory<null|string|{[key: string]: any}>| null,\n entryIsClassBased: boolean, directiveIndex: number = 0): void {\n ngDevMode && (entryIsClassBased ? ngDevMode.classMap++ : ngDevMode.styleMap++);\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n\n // early exit (this is what's done to avoid using ctx.bind() to cache the value)\n if (isMultiValueCacheHit(context, entryIsClassBased, directiveIndex, input)) return;\n\n input =\n input === NO_CHANGE ? readCachedMapValue(context, entryIsClassBased, directiveIndex) : input;\n\n const element = context[StylingIndex.ElementPosition] !as HTMLElement;\n const playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(\n input as any, element, entryIsClassBased ? BindingType.Class : BindingType.Style) :\n null;\n\n const rawValue =\n playerBuilder ? (input as BoundPlayerFactory<{[key: string]: any}|string>) !.value : input;\n\n // the position is always the same, but whether the player builder gets set\n // at all (depending if its set) will be reflected in the index value below...\n const playerBuilderPosition = entryIsClassBased ? PlayerIndex.ClassMapPlayerBuilderPosition :\n PlayerIndex.StyleMapPlayerBuilderPosition;\n let playerBuilderIndex = playerBuilder ? playerBuilderPosition : 0;\n let playerBuildersAreDirty = false;\n if (hasPlayerBuilderChanged(context, playerBuilder, playerBuilderPosition)) {\n setPlayerBuilder(context, playerBuilder, playerBuilderPosition);\n playerBuildersAreDirty = true;\n }\n\n // each time a string-based value pops up then it shouldn't require a deep\n // check of what's changed.\n let startIndex: number;\n let endIndex: number;\n let propNames: string[];\n let applyAll = false;\n if (entryIsClassBased) {\n if (typeof rawValue == 'string') {\n propNames = rawValue.split(/\\s+/);\n // this boolean is used to avoid having to create a key/value map of `true` values\n // since a className string implies that all those classes are added\n applyAll = true;\n } else {\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY;\n }\n startIndex = getMultiClassesStartIndex(context);\n endIndex = context.length;\n } else {\n startIndex = getMultiStylesStartIndex(context);\n endIndex = getMultiClassesStartIndex(context);\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY;\n }\n\n const values = (rawValue || EMPTY_OBJ) as{[key: string]: any};\n patchStylingMapIntoContext(\n context, directiveIndex, playerBuilderIndex, startIndex, endIndex, propNames,\n applyAll || values, input, entryIsClassBased);\n\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n\n ngDevMode && (entryIsClassBased ? ngDevMode.classMapCacheMiss++ : ngDevMode.styleMapCacheMiss++);\n}\n\n/**\n * Applies the given multi styling (styles or classes) values to the context.\n *\n * The styling algorithm code that applies multi-level styling (things like `[style]` and `[class]`\n * values) resides here.\n *\n * Because this function understands that multiple directives may all write to the `[style]` and\n * `[class]` bindings (through host bindings), it relies of each directive applying its binding\n * value in order. This means that a directive like `classADirective` will always fire before\n * `classBDirective` and therefore its styling values (classes and styles) will always be evaluated\n * in the same order. Because of this consistent ordering, the first directive has a higher priority\n * than the second one. It is with this prioritzation mechanism that the styling algorithm knows how\n * to merge and apply redudant styling properties.\n *\n * The function itself applies the key/value entries (or an array of keys) to\n * the context in the following steps.\n *\n * STEP 1:\n * First check to see what properties are already set and in use by another directive in the\n * context (e.g. `ngClass` set the `width` value and `[style.width]=\"w\"` in a directive is\n * attempting to set it as well).\n *\n * STEP 2:\n * All remaining properties (that were not set prior to this directive) are now updated in\n * the context. Any new properties are inserted exactly at their spot in the context and any\n * previously set properties are shifted to exactly where the cursor sits while iterating over\n * the context. The end result is a balanced context that includes the exact ordering of the\n * styling properties/values for the provided input from the directive.\n *\n * STEP 3:\n * Any unmatched properties in the context that belong to the directive are set to null\n *\n * Once the updating phase is done, then the algorithm will decide whether or not to flag the\n * follow-up directives (the directives that will pass in their styling values) depending on if\n * the \"shape\" of the multi-value map has changed (either if any keys are removed or added or\n * if there are any new `null` values). If any follow-up directives are flagged as dirty then the\n * algorithm will run again for them. Otherwise if the shape did not change then any follow-up\n * directives will not run (so long as their binding values stay the same).\n *\n * @returns the total amount of new slots that were allocated into the context due to new styling\n * properties that were detected.\n */\nfunction patchStylingMapIntoContext(\n context: StylingContext, directiveIndex: number, playerBuilderIndex: number, ctxStart: number,\n ctxEnd: number, props: (string | null)[], values: {[key: string]: any} | true, cacheValue: any,\n entryIsClassBased: boolean): number {\n let dirty = false;\n\n const cacheIndex = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n\n // the cachedValues array is the registry of all multi style values (map values). Each\n // value is stored (cached) each time is updated.\n const cachedValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n\n // this is the index in which this directive has ownership access to write to this\n // value (anything before is owned by a previous directive that is more important)\n const ownershipValuesStartIndex =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.PositionStartOffset];\n\n const existingCachedValue = cachedValues[cacheIndex + MapBasedOffsetValuesIndex.ValueOffset];\n const existingCachedValueCount =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.ValueCountOffset];\n const existingCachedValueIsDirty =\n cachedValues[cacheIndex + MapBasedOffsetValuesIndex.DirtyFlagOffset] === 1;\n\n // A shape change means the provided map value has either removed or added new properties\n // compared to what were in the last time. If a shape change occurs then it means that all\n // follow-up multi-styling entries are obsolete and will be examined again when CD runs\n // them. If a shape change has not occurred then there is no reason to check any other\n // directive values if their identity has not changed. If a previous directive set this\n // value as dirty (because its own shape changed) then this means that the object has been\n // offset to a different area in the context. Because its value has been offset then it\n // can't write to a region that it wrote to before (which may have been apart of another\n // directive) and therefore its shape changes too.\n let valuesEntryShapeChange =\n existingCachedValueIsDirty || ((!existingCachedValue && cacheValue) ? true : false);\n\n let totalUniqueValues = 0;\n let totalNewAllocatedSlots = 0;\n\n // this is a trick to avoid building {key:value} map where all the values\n // are `true` (this happens when a className string is provided instead of a\n // map as an input value to this styling algorithm)\n const applyAllProps = values === true;\n\n // STEP 1:\n // loop through the earlier directives and figure out if any properties here will be placed\n // in their area (this happens when the value is null because the earlier directive erased it).\n let ctxIndex = ctxStart;\n let totalRemainingProperties = props.length;\n while (ctxIndex < ownershipValuesStartIndex) {\n const currentProp = getProp(context, ctxIndex);\n if (totalRemainingProperties) {\n for (let i = 0; i < props.length; i++) {\n const mapProp = props[i];\n const normalizedProp = mapProp ? (entryIsClassBased ? mapProp : hyphenate(mapProp)) : null;\n if (normalizedProp && currentProp === normalizedProp) {\n const currentValue = getValue(context, ctxIndex);\n const currentDirectiveIndex = getDirectiveIndexFromEntry(context, ctxIndex);\n const value = applyAllProps ? true : (values as{[key: string]: any})[normalizedProp];\n const currentFlag = getPointers(context, ctxIndex);\n if (hasValueChanged(currentFlag, currentValue, value) &&\n allowValueChange(currentValue, value, currentDirectiveIndex, directiveIndex)) {\n setValue(context, ctxIndex, value);\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n if (hasInitialValueChanged(context, currentFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n props[i] = null;\n totalRemainingProperties--;\n break;\n }\n }\n }\n ctxIndex += StylingIndex.Size;\n }\n\n // STEP 2:\n // apply the left over properties to the context in the correct order.\n if (totalRemainingProperties) {\n const sanitizer = entryIsClassBased ? null : getStyleSanitizer(context, directiveIndex);\n propertiesLoop: for (let i = 0; i < props.length; i++) {\n const mapProp = props[i];\n\n if (!mapProp) {\n // this is an early exit in case a value was already encountered above in the\n // previous loop (which means that the property was applied or rejected)\n continue;\n }\n\n const value = applyAllProps ? true : (values as{[key: string]: any})[mapProp];\n const normalizedProp = entryIsClassBased ? mapProp : hyphenate(mapProp);\n const isInsideOwnershipArea = ctxIndex >= ownershipValuesStartIndex;\n\n for (let j = ctxIndex; j < ctxEnd; j += StylingIndex.Size) {\n const distantCtxProp = getProp(context, j);\n if (distantCtxProp === normalizedProp) {\n const distantCtxDirectiveIndex = getDirectiveIndexFromEntry(context, j);\n const distantCtxPlayerBuilderIndex = getPlayerBuilderIndex(context, j);\n const distantCtxValue = getValue(context, j);\n const distantCtxFlag = getPointers(context, j);\n\n if (allowValueChange(distantCtxValue, value, distantCtxDirectiveIndex, directiveIndex)) {\n // even if the entry isn't updated (by value or directiveIndex) then\n // it should still be moved over to the correct spot in the array so\n // the iteration loop is tighter.\n if (isInsideOwnershipArea) {\n swapMultiContextEntries(context, ctxIndex, j);\n totalUniqueValues++;\n }\n\n if (hasValueChanged(distantCtxFlag, distantCtxValue, value)) {\n if (value === null || value === undefined && value !== distantCtxValue) {\n valuesEntryShapeChange = true;\n }\n\n setValue(context, ctxIndex, value);\n\n // SKIP IF INITIAL CHECK\n // If the former `value` is `null` then it means that an initial value\n // could be being rendered on screen. If that is the case then there is\n // no point in updating the value in case it matches. In other words if the\n // new value is the exact same as the previously rendered value (which\n // happens to be the initial value) then do nothing.\n if (distantCtxValue !== null ||\n hasInitialValueChanged(context, distantCtxFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n\n if (distantCtxDirectiveIndex !== directiveIndex ||\n playerBuilderIndex !== distantCtxPlayerBuilderIndex) {\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n }\n\n ctxIndex += StylingIndex.Size;\n continue propertiesLoop;\n }\n }\n\n // fallback case ... value not found at all in the context\n if (value != null) {\n valuesEntryShapeChange = true;\n totalUniqueValues++;\n const flag = prepareInitialFlag(context, normalizedProp, entryIsClassBased, sanitizer) |\n StylingFlags.Dirty;\n\n const insertionIndex = isInsideOwnershipArea ?\n ctxIndex :\n (ownershipValuesStartIndex + totalNewAllocatedSlots * StylingIndex.Size);\n insertNewMultiProperty(\n context, insertionIndex, entryIsClassBased, normalizedProp, flag, value, directiveIndex,\n playerBuilderIndex);\n\n totalNewAllocatedSlots++;\n ctxEnd += StylingIndex.Size;\n ctxIndex += StylingIndex.Size;\n\n dirty = true;\n }\n }\n }\n\n // STEP 3:\n // Remove (nullify) any existing entries in the context that were not apart of the\n // map input value that was passed into this algorithm for this directive.\n while (ctxIndex < ctxEnd) {\n valuesEntryShapeChange = true; // some values are missing\n const ctxValue = getValue(context, ctxIndex);\n const ctxFlag = getPointers(context, ctxIndex);\n const ctxDirective = getDirectiveIndexFromEntry(context, ctxIndex);\n if (ctxValue != null) {\n valuesEntryShapeChange = true;\n }\n if (hasValueChanged(ctxFlag, ctxValue, null)) {\n setValue(context, ctxIndex, null);\n // only if the initial value is falsy then\n if (hasInitialValueChanged(context, ctxFlag, ctxValue)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n ctxIndex += StylingIndex.Size;\n }\n\n // Because the object shape has changed, this means that all follow-up directives will need to\n // reapply their values into the object. For this to happen, the cached array needs to be updated\n // with dirty flags so that follow-up calls to `updateStylingMap` will reapply their styling code.\n // the reapplication of styling code within the context will reshape it and update the offset\n // values (also follow-up directives can write new values in case earlier directives set anything\n // to null due to removals or falsy values).\n valuesEntryShapeChange = valuesEntryShapeChange || existingCachedValueCount !== totalUniqueValues;\n updateCachedMapValue(\n context, directiveIndex, entryIsClassBased, cacheValue, ownershipValuesStartIndex, ctxEnd,\n totalUniqueValues, valuesEntryShapeChange);\n\n if (dirty) {\n setContextDirty(context, true);\n }\n\n return totalNewAllocatedSlots;\n}\n\n/**\n * Sets and resolves a single class value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * @param context The styling context that will be updated with the\n * newly provided class value.\n * @param offset The index of the CSS class which is being updated.\n * @param addOrRemove Whether or not to add or remove the CSS class\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\nexport function updateClassProp(\n context: StylingContext, offset: number,\n input: boolean | BoundPlayerFactory<boolean|null>| null, directiveIndex: number = 0,\n forceOverride?: boolean): void {\n updateSingleStylingValue(context, offset, input, true, directiveIndex, forceOverride);\n}\n\n/**\n * Sets and resolves a single style value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * Note that prop-level styling values are considered higher priority than any styling that\n * has been applied using `updateStylingMap`, therefore, when styling values are rendered\n * then any styles/classes that have been applied using this function will be considered first\n * (then multi values second and then initial values as a backup).\n *\n * @param context The styling context that will be updated with the\n * newly provided style value.\n * @param offset The index of the property which is being updated.\n * @param value The CSS style value that will be assigned\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\nexport function updateStyleProp(\n context: StylingContext, offset: number,\n input: string | boolean | null | BoundPlayerFactory<string|boolean|null>,\n directiveIndex: number = 0, forceOverride?: boolean): void {\n updateSingleStylingValue(context, offset, input, false, directiveIndex, forceOverride);\n}\n\nfunction updateSingleStylingValue(\n context: StylingContext, offset: number,\n input: string | boolean | null | BoundPlayerFactory<string|boolean|null>, isClassBased: boolean,\n directiveIndex: number, forceOverride?: boolean): void {\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n const singleIndex = getSinglePropIndexValue(context, directiveIndex, offset, isClassBased);\n const currValue = getValue(context, singleIndex);\n const currFlag = getPointers(context, singleIndex);\n const currDirective = getDirectiveIndexFromEntry(context, singleIndex);\n const value: string|boolean|null = (input instanceof BoundPlayerFactory) ? input.value : input;\n\n ngDevMode && ngDevMode.stylingProp++;\n\n if (hasValueChanged(currFlag, currValue, value) &&\n (forceOverride || allowValueChange(currValue, value, currDirective, directiveIndex))) {\n const isClassBased = (currFlag & StylingFlags.Class) === StylingFlags.Class;\n const element = context[StylingIndex.ElementPosition] !as HTMLElement;\n const playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(\n input as any, element, isClassBased ? BindingType.Class : BindingType.Style) :\n null;\n const value = (playerBuilder ? (input as BoundPlayerFactory<any>).value : input) as string |\n boolean | null;\n const currPlayerIndex = getPlayerBuilderIndex(context, singleIndex);\n\n let playerBuildersAreDirty = false;\n let playerBuilderIndex = playerBuilder ? currPlayerIndex : 0;\n if (hasPlayerBuilderChanged(context, playerBuilder, currPlayerIndex)) {\n const newIndex = setPlayerBuilder(context, playerBuilder, currPlayerIndex);\n playerBuilderIndex = playerBuilder ? newIndex : 0;\n playerBuildersAreDirty = true;\n }\n\n if (playerBuildersAreDirty || currDirective !== directiveIndex) {\n setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex, directiveIndex);\n }\n\n if (currDirective !== directiveIndex) {\n const prop = getProp(context, singleIndex);\n const sanitizer = getStyleSanitizer(context, directiveIndex);\n setSanitizeFlag(\n context, singleIndex,\n (sanitizer && sanitizer(prop, null, StyleSanitizeMode.ValidateProperty)) ? true : false);\n }\n\n // the value will always get updated (even if the dirty flag is skipped)\n setValue(context, singleIndex, value);\n const indexForMulti = getMultiOrSingleIndex(currFlag);\n\n // if the value is the same in the multi-area then there's no point in re-assembling\n const valueForMulti = getValue(context, indexForMulti);\n if (!valueForMulti || hasValueChanged(currFlag, valueForMulti, value)) {\n let multiDirty = false;\n let singleDirty = true;\n\n // only when the value is set to `null` should the multi-value get flagged\n if (!valueExists(value, isClassBased) && valueExists(valueForMulti, isClassBased)) {\n multiDirty = true;\n singleDirty = false;\n }\n\n setDirty(context, indexForMulti, multiDirty);\n setDirty(context, singleIndex, singleDirty);\n setContextDirty(context, true);\n }\n\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n\n ngDevMode && ngDevMode.stylingPropCacheMiss++;\n }\n}\n\n\n/**\n * Renders all queued styling using a renderer onto the given element.\n *\n * This function works by rendering any styles (that have been applied\n * using `updateStylingMap`) and any classes (that have been applied using\n * `updateStyleProp`) onto the provided element using the provided renderer.\n * Just before the styles/classes are rendered a final key/value style map\n * will be assembled (if `styleStore` or `classStore` are provided).\n *\n * @param lElement the element that the styles will be rendered on\n * @param context The styling context that will be used to determine\n * what styles will be rendered\n * @param renderer the renderer that will be used to apply the styling\n * @param classesStore if provided, the updated class values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @param stylesStore if provided, the updated style values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @returns number the total amount of players that got queued for animation (if any)\n */\nexport function renderStyling(\n context: StylingContext, renderer: Renderer3 | null, rootOrView: RootContext | LView,\n isFirstRender: boolean, classesStore?: BindingStore | null, stylesStore?: BindingStore | null,\n directiveIndex: number = 0): number {\n let totalPlayersQueued = 0;\n ngDevMode && ngDevMode.stylingApply++;\n\n // this prevents multiple attempts to render style/class values on\n // the same element...\n if (allowHostInstructionsQueueFlush(context, directiveIndex)) {\n // all styling instructions present within any hostBindings functions\n // do not update the context immediately when called. They are instead\n // queued up and applied to the context right at this point. Why? This\n // is because Angular evaluates component/directive and directive\n // sub-class code at different points and it's important that the\n // styling values are applied to the context in the right order\n // (see `interfaces/styling.ts` for more information).\n flushHostInstructionsQueue(context);\n\n if (isContextDirty(context)) {\n ngDevMode && ngDevMode.stylingApplyCacheMiss++;\n\n // this is here to prevent things like <ng-container [style] [class]>...</ng-container>\n // or if there are any host style or class bindings present in a directive set on\n // a container node\n const native = context[StylingIndex.ElementPosition] !as HTMLElement;\n\n const flushPlayerBuilders: any =\n context[StylingIndex.MasterFlagPosition] & StylingFlags.PlayerBuildersDirty;\n const multiStartIndex = getMultiStylesStartIndex(context);\n\n for (let i = StylingIndex.SingleStylesStartPosition; i < context.length;\n i += StylingIndex.Size) {\n // there is no point in rendering styles that have not changed on screen\n if (isDirty(context, i)) {\n const flag = getPointers(context, i);\n const directiveIndex = getDirectiveIndexFromEntry(context, i);\n const prop = getProp(context, i);\n const value = getValue(context, i);\n const styleSanitizer =\n (flag & StylingFlags.Sanitize) ? getStyleSanitizer(context, directiveIndex) : null;\n const playerBuilder = getPlayerBuilder(context, i);\n const isClassBased = flag & StylingFlags.Class ? true : false;\n const isInSingleRegion = i < multiStartIndex;\n\n let valueToApply: string|boolean|null = value;\n\n // VALUE DEFER CASE 1: Use a multi value instead of a null single value\n // this check implies that a single value was removed and we\n // should now defer to a multi value and use that (if set).\n if (isInSingleRegion && !valueExists(valueToApply, isClassBased)) {\n // single values ALWAYS have a reference to a multi index\n const multiIndex = getMultiOrSingleIndex(flag);\n valueToApply = getValue(context, multiIndex);\n }\n\n // VALUE DEFER CASE 2: Use the initial value if all else fails (is falsy)\n // the initial value will always be a string or null,\n // therefore we can safely adopt it in case there's nothing else\n // note that this should always be a falsy check since `false` is used\n // for both class and style comparisons (styles can't be false and false\n // classes are turned off and should therefore defer to their initial values)\n // Note that we ignore class-based deferals because otherwise a class can never\n // be removed in the case that it exists as true in the initial classes list...\n if (!valueExists(valueToApply, isClassBased)) {\n valueToApply = getInitialValue(context, flag);\n }\n\n // if the first render is true then we do not want to start applying falsy\n // values to the DOM element's styling. Otherwise then we know there has\n // been a change and even if it's falsy then it's removing something that\n // was truthy before.\n const doApplyValue = renderer && (isFirstRender ? valueToApply : true);\n if (doApplyValue) {\n if (isClassBased) {\n setClass(\n native, prop, valueToApply ? true : false, renderer !, classesStore,\n playerBuilder);\n } else {\n setStyle(\n native, prop, valueToApply as string | null, renderer !, styleSanitizer,\n stylesStore, playerBuilder);\n }\n }\n\n setDirty(context, i, false);\n }\n }\n\n if (flushPlayerBuilders) {\n const rootContext =\n Array.isArray(rootOrView) ? getRootContext(rootOrView) : rootOrView as RootContext;\n const playerContext = getPlayerContext(context) !;\n const playersStartIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n for (let i = PlayerIndex.PlayerBuildersStartPosition; i < playersStartIndex;\n i += PlayerIndex.PlayerAndPlayerBuildersTupleSize) {\n const builder = playerContext[i] as ClassAndStylePlayerBuilder<any>| null;\n const playerInsertionIndex = i + PlayerIndex.PlayerOffsetPosition;\n const oldPlayer = playerContext[playerInsertionIndex] as Player | null;\n if (builder) {\n const player = builder.buildPlayer(oldPlayer, isFirstRender);\n if (player !== undefined) {\n if (player != null) {\n const wasQueued = addPlayerInternal(\n playerContext, rootContext, native as HTMLElement, player,\n playerInsertionIndex);\n wasQueued && totalPlayersQueued++;\n }\n if (oldPlayer) {\n oldPlayer.destroy();\n }\n }\n } else if (oldPlayer) {\n // the player builder has been removed ... therefore we should delete the associated\n // player\n oldPlayer.destroy();\n }\n }\n setContextPlayersDirty(context, false);\n }\n\n setContextDirty(context, false);\n }\n }\n\n return totalPlayersQueued;\n}\n\n/**\n * Assigns a style value to a style property for the given element.\n *\n * This function renders a given CSS prop/value entry using the\n * provided renderer. If a `store` value is provided then\n * that will be used a render context instead of the provided\n * renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nexport function setStyle(\n native: any, prop: string, value: string | null, renderer: Renderer3,\n sanitizer: StyleSanitizeFn | null, store?: BindingStore | null,\n playerBuilder?: ClassAndStylePlayerBuilder<any>| null) {\n value =\n sanitizer && value ? sanitizer(prop, value, StyleSanitizeMode.ValidateAndSanitize) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n } else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n } else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n}\n\n/**\n * Adds/removes the provided className value to the provided element.\n *\n * This function renders a given CSS class value using the provided\n * renderer (by adding or removing it from the provided element).\n * If a `store` value is provided then that will be used a render\n * context instead of the provided renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nfunction setClass(\n native: any, className: string, add: boolean, renderer: Renderer3, store?: BindingStore | null,\n playerBuilder?: ClassAndStylePlayerBuilder<any>| null) {\n if (store || playerBuilder) {\n if (store) {\n store.setValue(className, add);\n }\n if (playerBuilder) {\n playerBuilder.setValue(className, add);\n }\n // DOMTokenList will throw if we try to add or remove an empty string.\n } else if (className !== '') {\n if (add) {\n ngDevMode && ngDevMode.rendererAddClass++;\n isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native['classList'].add(className);\n } else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native['classList'].remove(className);\n }\n }\n}\n\nfunction setSanitizeFlag(context: StylingContext, index: number, sanitizeYes: boolean) {\n if (sanitizeYes) {\n (context[index] as number) |= StylingFlags.Sanitize;\n } else {\n (context[index] as number) &= ~StylingFlags.Sanitize;\n }\n}\n\nfunction setDirty(context: StylingContext, index: number, isDirtyYes: boolean) {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n if (isDirtyYes) {\n (context[adjustedIndex] as number) |= StylingFlags.Dirty;\n } else {\n (context[adjustedIndex] as number) &= ~StylingFlags.Dirty;\n }\n}\n\nfunction isDirty(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Dirty) == StylingFlags.Dirty;\n}\n\nexport function isClassBasedValue(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Class) == StylingFlags.Class;\n}\n\nfunction isSanitizable(context: StylingContext, index: number): boolean {\n const adjustedIndex =\n index >= StylingIndex.SingleStylesStartPosition ? (index + StylingIndex.FlagsOffset) : index;\n return ((context[adjustedIndex] as number) & StylingFlags.Sanitize) == StylingFlags.Sanitize;\n}\n\nfunction pointers(configFlag: number, staticIndex: number, dynamicIndex: number) {\n return (configFlag & StylingFlags.BitMask) | (staticIndex << StylingFlags.BitCountSize) |\n (dynamicIndex << (StylingIndex.BitCountSize + StylingFlags.BitCountSize));\n}\n\nfunction getInitialValue(context: StylingContext, flag: number): string|boolean|null {\n const index = getInitialIndex(flag);\n const entryIsClassBased = flag & StylingFlags.Class;\n const initialValues = entryIsClassBased ? context[StylingIndex.InitialClassValuesPosition] :\n context[StylingIndex.InitialStyleValuesPosition];\n return initialValues[index] as string | boolean | null;\n}\n\nfunction getInitialIndex(flag: number): number {\n return (flag >> StylingFlags.BitCountSize) & StylingIndex.BitMask;\n}\n\nfunction getMultiOrSingleIndex(flag: number): number {\n const index =\n (flag >> (StylingIndex.BitCountSize + StylingFlags.BitCountSize)) & StylingIndex.BitMask;\n return index >= StylingIndex.SingleStylesStartPosition ? index : -1;\n}\n\nfunction getMultiStartIndex(context: StylingContext): number {\n return getMultiOrSingleIndex(context[StylingIndex.MasterFlagPosition]) as number;\n}\n\nfunction getMultiClassesStartIndex(context: StylingContext): number {\n const classCache = context[StylingIndex.CachedMultiClasses];\n return classCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n}\n\nfunction getMultiStylesStartIndex(context: StylingContext): number {\n const stylesCache = context[StylingIndex.CachedMultiStyles];\n return stylesCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n}\n\nfunction setProp(context: StylingContext, index: number, prop: string) {\n context[index + StylingIndex.PropertyOffset] = prop;\n}\n\nfunction setValue(context: StylingContext, index: number, value: string | null | boolean) {\n context[index + StylingIndex.ValueOffset] = value;\n}\n\nfunction hasPlayerBuilderChanged(\n context: StylingContext, builder: ClassAndStylePlayerBuilder<any>| null, index: number) {\n const playerContext = context[StylingIndex.PlayerContext] !;\n if (builder) {\n if (!playerContext || index === 0) {\n return true;\n }\n } else if (!playerContext) {\n return false;\n }\n return playerContext[index] !== builder;\n}\n\nfunction setPlayerBuilder(\n context: StylingContext, builder: ClassAndStylePlayerBuilder<any>| null,\n insertionIndex: number): number {\n let playerContext = context[StylingIndex.PlayerContext] || allocPlayerContext(context);\n if (insertionIndex > 0) {\n playerContext[insertionIndex] = builder;\n } else {\n insertionIndex = playerContext[PlayerIndex.NonBuilderPlayersStart];\n playerContext.splice(insertionIndex, 0, builder, null);\n playerContext[PlayerIndex.NonBuilderPlayersStart] +=\n PlayerIndex.PlayerAndPlayerBuildersTupleSize;\n }\n return insertionIndex;\n}\n\nexport function directiveOwnerPointers(directiveIndex: number, playerIndex: number) {\n return (playerIndex << DirectiveOwnerAndPlayerBuilderIndex.BitCountSize) | directiveIndex;\n}\n\nfunction setPlayerBuilderIndex(\n context: StylingContext, index: number, playerBuilderIndex: number, directiveIndex: number) {\n const value = directiveOwnerPointers(directiveIndex, playerBuilderIndex);\n context[index + StylingIndex.PlayerBuilderIndexOffset] = value;\n}\n\nfunction getPlayerBuilderIndex(context: StylingContext, index: number): number {\n const flag = context[index + StylingIndex.PlayerBuilderIndexOffset] as number;\n const playerBuilderIndex = (flag >> DirectiveOwnerAndPlayerBuilderIndex.BitCountSize) &\n DirectiveOwnerAndPlayerBuilderIndex.BitMask;\n return playerBuilderIndex;\n}\n\nfunction getPlayerBuilder(context: StylingContext, index: number): ClassAndStylePlayerBuilder<any>|\n null {\n const playerBuilderIndex = getPlayerBuilderIndex(context, index);\n if (playerBuilderIndex) {\n const playerContext = context[StylingIndex.PlayerContext];\n if (playerContext) {\n return playerContext[playerBuilderIndex] as ClassAndStylePlayerBuilder<any>| null;\n }\n }\n return null;\n}\n\nfunction setFlag(context: StylingContext, index: number, flag: number) {\n const adjustedIndex =\n index === StylingIndex.MasterFlagPosition ? index : (index + StylingIndex.FlagsOffset);\n context[adjustedIndex] = flag;\n}\n\nfunction getPointers(context: StylingContext, index: number): number {\n const adjustedIndex =\n index === StylingIndex.MasterFlagPosition ? index : (index + StylingIndex.FlagsOffset);\n return context[adjustedIndex] as number;\n}\n\nexport function getValue(context: StylingContext, index: number): string|boolean|null {\n return context[index + StylingIndex.ValueOffset] as string | boolean | null;\n}\n\nexport function getProp(context: StylingContext, index: number): string {\n return context[index + StylingIndex.PropertyOffset] as string;\n}\n\nexport function isContextDirty(context: StylingContext): boolean {\n return isDirty(context, StylingIndex.MasterFlagPosition);\n}\n\nexport function setContextDirty(context: StylingContext, isDirtyYes: boolean): void {\n setDirty(context, StylingIndex.MasterFlagPosition, isDirtyYes);\n}\n\nexport function setContextPlayersDirty(context: StylingContext, isDirtyYes: boolean): void {\n if (isDirtyYes) {\n (context[StylingIndex.MasterFlagPosition] as number) |= StylingFlags.PlayerBuildersDirty;\n } else {\n (context[StylingIndex.MasterFlagPosition] as number) &= ~StylingFlags.PlayerBuildersDirty;\n }\n}\n\nfunction swapMultiContextEntries(context: StylingContext, indexA: number, indexB: number) {\n if (indexA === indexB) return;\n\n const tmpValue = getValue(context, indexA);\n const tmpProp = getProp(context, indexA);\n const tmpFlag = getPointers(context, indexA);\n const tmpPlayerBuilderIndex = getPlayerBuilderIndex(context, indexA);\n const tmpDirectiveIndex = getDirectiveIndexFromEntry(context, indexA);\n\n let flagA = tmpFlag;\n let flagB = getPointers(context, indexB);\n\n const singleIndexA = getMultiOrSingleIndex(flagA);\n if (singleIndexA >= 0) {\n const _flag = getPointers(context, singleIndexA);\n const _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexA, pointers(_flag, _initial, indexB));\n }\n\n const singleIndexB = getMultiOrSingleIndex(flagB);\n if (singleIndexB >= 0) {\n const _flag = getPointers(context, singleIndexB);\n const _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexB, pointers(_flag, _initial, indexA));\n }\n\n setValue(context, indexA, getValue(context, indexB));\n setProp(context, indexA, getProp(context, indexB));\n setFlag(context, indexA, getPointers(context, indexB));\n const playerIndexA = getPlayerBuilderIndex(context, indexB);\n const directiveIndexA = getDirectiveIndexFromEntry(context, indexB);\n setPlayerBuilderIndex(context, indexA, playerIndexA, directiveIndexA);\n\n setValue(context, indexB, tmpValue);\n setProp(context, indexB, tmpProp);\n setFlag(context, indexB, tmpFlag);\n setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex, tmpDirectiveIndex);\n}\n\nfunction updateSinglePointerValues(context: StylingContext, indexStartPosition: number) {\n for (let i = indexStartPosition; i < context.length; i += StylingIndex.Size) {\n const multiFlag = getPointers(context, i);\n const singleIndex = getMultiOrSingleIndex(multiFlag);\n if (singleIndex > 0) {\n const singleFlag = getPointers(context, singleIndex);\n const initialIndexForSingle = getInitialIndex(singleFlag);\n const flagValue = (isDirty(context, singleIndex) ? StylingFlags.Dirty : StylingFlags.None) |\n (isClassBasedValue(context, singleIndex) ? StylingFlags.Class : StylingFlags.None) |\n (isSanitizable(context, singleIndex) ? StylingFlags.Sanitize : StylingFlags.None);\n const updatedFlag = pointers(flagValue, initialIndexForSingle, i);\n setFlag(context, singleIndex, updatedFlag);\n }\n }\n}\n\nfunction insertNewMultiProperty(\n context: StylingContext, index: number, classBased: boolean, name: string, flag: number,\n value: string | boolean, directiveIndex: number, playerIndex: number): void {\n const doShift = index < context.length;\n\n // prop does not exist in the list, add it in\n context.splice(\n index, 0, flag | StylingFlags.Dirty | (classBased ? StylingFlags.Class : StylingFlags.None),\n name, value, 0);\n setPlayerBuilderIndex(context, index, playerIndex, directiveIndex);\n\n if (doShift) {\n // because the value was inserted midway into the array then we\n // need to update all the shifted multi values' single value\n // pointers to point to the newly shifted location\n updateSinglePointerValues(context, index + StylingIndex.Size);\n }\n}\n\nfunction valueExists(value: string | null | boolean, isClassBased?: boolean) {\n return value !== null;\n}\n\nfunction prepareInitialFlag(\n context: StylingContext, prop: string, entryIsClassBased: boolean,\n sanitizer?: StyleSanitizeFn | null) {\n let flag = (sanitizer && sanitizer(prop, null, StyleSanitizeMode.ValidateProperty)) ?\n StylingFlags.Sanitize :\n StylingFlags.None;\n\n let initialIndex: number;\n if (entryIsClassBased) {\n flag |= StylingFlags.Class;\n initialIndex =\n getInitialStylingValuesIndexOf(context[StylingIndex.InitialClassValuesPosition], prop);\n } else {\n initialIndex =\n getInitialStylingValuesIndexOf(context[StylingIndex.InitialStyleValuesPosition], prop);\n }\n\n initialIndex = initialIndex > 0 ? (initialIndex + InitialStylingValuesIndex.ValueOffset) : 0;\n return pointers(flag, initialIndex, 0);\n}\n\nfunction hasInitialValueChanged(context: StylingContext, flag: number, newValue: any) {\n const initialValue = getInitialValue(context, flag);\n return !initialValue || hasValueChanged(flag, initialValue, newValue);\n}\n\nfunction hasValueChanged(\n flag: number, a: string | boolean | null, b: string | boolean | null): boolean {\n const isClassBased = flag & StylingFlags.Class;\n const hasValues = a && b;\n const usesSanitizer = flag & StylingFlags.Sanitize;\n // the toString() comparison ensures that a value is checked\n // ... otherwise (during sanitization bypassing) the === comparsion\n // would fail since a new String() instance is created\n if (!isClassBased && hasValues && usesSanitizer) {\n // we know for sure we're dealing with strings at this point\n return (a as string).toString() !== (b as string).toString();\n }\n\n // everything else is safe to check with a normal equality check\n return a !== b;\n}\n\nexport class ClassAndStylePlayerBuilder<T> implements PlayerBuilder {\n private _values: {[key: string]: string | null} = {};\n private _dirty = false;\n private _factory: BoundPlayerFactory<T>;\n\n constructor(factory: PlayerFactory, private _element: HTMLElement, private _type: BindingType) {\n this._factory = factory as any;\n }\n\n setValue(prop: string, value: any) {\n if (this._values[prop] !== value) {\n this._values[prop] = value;\n this._dirty = true;\n }\n }\n\n buildPlayer(currentPlayer: Player|null, isFirstRender: boolean): Player|undefined|null {\n // if no values have been set here then this means the binding didn't\n // change and therefore the binding values were not updated through\n // `setValue` which means no new player will be provided.\n if (this._dirty) {\n const player = this._factory.fn(\n this._element, this._type, this._values !, isFirstRender, currentPlayer || null);\n this._values = {};\n this._dirty = false;\n return player;\n }\n\n return undefined;\n }\n}\n\n/**\n * Used to provide a summary of the state of the styling context.\n *\n * This is an internal interface that is only used inside of test tooling to\n * help summarize what's going on within the styling context. None of this code\n * is designed to be exported publicly and will, therefore, be tree-shaken away\n * during runtime.\n */\nexport interface LogSummary {\n name: string; //\n staticIndex: number; //\n dynamicIndex: number; //\n value: number; //\n flags: {\n dirty: boolean; //\n class: boolean; //\n sanitize: boolean; //\n playerBuildersDirty: boolean; //\n bindingAllocationLocked: boolean; //\n };\n}\n\n/**\n * This function is not designed to be used in production.\n * It is a utility tool for debugging and testing and it\n * will automatically be tree-shaken away during production.\n */\nexport function generateConfigSummary(source: number): LogSummary;\nexport function generateConfigSummary(source: StylingContext): LogSummary;\nexport function generateConfigSummary(source: StylingContext, index: number): LogSummary;\nexport function generateConfigSummary(source: number | StylingContext, index?: number): LogSummary {\n let flag, name = 'config value for ';\n if (Array.isArray(source)) {\n if (index) {\n name += 'index: ' + index;\n } else {\n name += 'master config';\n }\n index = index || StylingIndex.MasterFlagPosition;\n flag = source[index] as number;\n } else {\n flag = source;\n name += 'index: ' + flag;\n }\n const dynamicIndex = getMultiOrSingleIndex(flag);\n const staticIndex = getInitialIndex(flag);\n return {\n name,\n staticIndex,\n dynamicIndex,\n value: flag,\n flags: {\n dirty: flag & StylingFlags.Dirty ? true : false,\n class: flag & StylingFlags.Class ? true : false,\n sanitize: flag & StylingFlags.Sanitize ? true : false,\n playerBuildersDirty: flag & StylingFlags.PlayerBuildersDirty ? true : false,\n bindingAllocationLocked: flag & StylingFlags.BindingAllocationLocked ? true : false,\n }\n };\n}\n\nexport function getDirectiveIndexFromEntry(context: StylingContext, index: number) {\n const value = context[index + StylingIndex.PlayerBuilderIndexOffset] as number;\n return value & DirectiveOwnerAndPlayerBuilderIndex.BitMask;\n}\n\nfunction getInitialStylingValuesIndexOf(keyValues: InitialStylingValues, key: string): number {\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < keyValues.length;\n i += InitialStylingValuesIndex.Size) {\n if (keyValues[i] === key) return i;\n }\n return -1;\n}\n\nexport function compareLogSummaries(a: LogSummary, b: LogSummary) {\n const log: string[] = [];\n const diffs: [string, any, any][] = [];\n diffSummaryValues(diffs, 'staticIndex', 'staticIndex', a, b);\n diffSummaryValues(diffs, 'dynamicIndex', 'dynamicIndex', a, b);\n Object.keys(a.flags).forEach(\n name => { diffSummaryValues(diffs, 'flags.' + name, name, a.flags, b.flags); });\n\n if (diffs.length) {\n log.push('Log Summaries for:');\n log.push(' A: ' + a.name);\n log.push(' B: ' + b.name);\n log.push('\\n Differ in the following way (A !== B):');\n diffs.forEach(result => {\n const [name, aVal, bVal] = result;\n log.push(' => ' + name);\n log.push(' => ' + aVal + ' !== ' + bVal + '\\n');\n });\n }\n\n return log;\n}\n\nfunction diffSummaryValues(result: any[], name: string, prop: string, a: any, b: any) {\n const aVal = a[prop];\n const bVal = b[prop];\n if (aVal !== bVal) {\n result.push([name, aVal, bVal]);\n }\n}\n\nexport function getSinglePropIndexValue(\n context: StylingContext, directiveIndex: number, offset: number, isClassBased: boolean) {\n const singlePropOffsetRegistryIndex =\n context[StylingIndex.DirectiveRegistryPosition]\n [(directiveIndex * DirectiveRegistryValuesIndex.Size) +\n DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset] as number;\n const offsets = context[StylingIndex.SinglePropOffsetPositions];\n const indexForOffset = singlePropOffsetRegistryIndex +\n SinglePropOffsetValuesIndex.ValueStartPosition +\n (isClassBased ?\n offsets\n [singlePropOffsetRegistryIndex + SinglePropOffsetValuesIndex.StylesCountPosition] :\n 0) +\n offset;\n return offsets[indexForOffset];\n}\n\nfunction getStyleSanitizer(context: StylingContext, directiveIndex: number): StyleSanitizeFn|null {\n const dirs = context[StylingIndex.DirectiveRegistryPosition];\n const value = dirs\n [directiveIndex * DirectiveRegistryValuesIndex.Size +\n DirectiveRegistryValuesIndex.StyleSanitizerOffset] ||\n dirs[DirectiveRegistryValuesIndex.StyleSanitizerOffset] || null;\n return value as StyleSanitizeFn | null;\n}\n\nfunction allowValueChange(\n currentValue: string | boolean | null, newValue: string | boolean | null,\n currentDirectiveOwner: number, newDirectiveOwner: number) {\n // the code below relies the importance of directive's being tied to their\n // index value. The index values for each directive are derived from being\n // registered into the styling context directive registry. The most important\n // directive is the parent component directive (the template) and each directive\n // that is added after is considered less important than the previous entry. This\n // prioritization of directives enables the styling algorithm to decide if a style\n // or class should be allowed to be updated/replaced in case an earlier directive\n // already wrote to the exact same style-property or className value. In other words\n // this decides what to do if and when there is a collision.\n if (currentValue != null) {\n if (newValue != null) {\n // if a directive index is lower than it always has priority over the\n // previous directive's value...\n return newDirectiveOwner <= currentDirectiveOwner;\n } else {\n // only write a null value in case it's the same owner writing it.\n // this avoids having a higher-priority directive write to null\n // only to have a lesser-priority directive change right to a\n // non-null value immediately afterwards.\n return currentDirectiveOwner === newDirectiveOwner;\n }\n }\n return true;\n}\n\n/**\n * Returns the className string of all the initial classes for the element.\n *\n * This function is designed to populate and cache all the static class\n * values into a className string. The caching mechanism works by placing\n * the completed className string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the className string (e.g. `on active red`)\n */\nexport function getInitialClassNameValue(context: StylingContext): string {\n const initialClassValues = context[StylingIndex.InitialClassValuesPosition];\n let className = initialClassValues[InitialStylingValuesIndex.CachedStringValuePosition];\n if (className === null) {\n className = '';\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialClassValues.length;\n i += InitialStylingValuesIndex.Size) {\n const isPresent = initialClassValues[i + 1];\n if (isPresent) {\n className += (className.length ? ' ' : '') + initialClassValues[i];\n }\n }\n initialClassValues[InitialStylingValuesIndex.CachedStringValuePosition] = className;\n }\n return className;\n}\n\n/**\n * Returns the style string of all the initial styles for the element.\n *\n * This function is designed to populate and cache all the static style\n * values into a style string. The caching mechanism works by placing\n * the completed style string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the style string (e.g. `width:100px;height:200px`)\n */\nexport function getInitialStyleStringValue(context: StylingContext): string {\n const initialStyleValues = context[StylingIndex.InitialStyleValuesPosition];\n let styleString = initialStyleValues[InitialStylingValuesIndex.CachedStringValuePosition];\n if (styleString === null) {\n styleString = '';\n for (let i = InitialStylingValuesIndex.KeyValueStartPosition; i < initialStyleValues.length;\n i += InitialStylingValuesIndex.Size) {\n const value = initialStyleValues[i + 1];\n if (value !== null) {\n styleString += (styleString.length ? ';' : '') + `${initialStyleValues[i]}:${value}`;\n }\n }\n initialStyleValues[InitialStylingValuesIndex.CachedStringValuePosition] = styleString;\n }\n return styleString;\n}\n\n/**\n * Returns the current cached multi-value for a given directiveIndex within the provided context.\n */\nfunction readCachedMapValue(\n context: StylingContext, entryIsClassBased: boolean, directiveIndex: number) {\n const values: MapBasedOffsetValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n return values[index + MapBasedOffsetValuesIndex.ValueOffset] || null;\n}\n\n/**\n * Determines whether the provided multi styling value should be updated or not.\n *\n * Because `[style]` and `[class]` bindings rely on an identity change to occur before\n * applying new values, the styling algorithm may not update an existing entry into\n * the context if a previous directive's entry changed shape.\n *\n * This function will decide whether or not a value should be applied (if there is a\n * cache miss) to the context based on the following rules:\n *\n * - If there is an identity change between the existing value and new value\n * - If there is no existing value cached (first write)\n * - If a previous directive flagged the existing cached value as dirty\n */\nfunction isMultiValueCacheHit(\n context: StylingContext, entryIsClassBased: boolean, directiveIndex: number,\n newValue: any): boolean {\n const indexOfCachedValues =\n entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles;\n const cachedValues = context[indexOfCachedValues] as MapBasedOffsetValues;\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n if (cachedValues[index + MapBasedOffsetValuesIndex.DirtyFlagOffset]) return false;\n return newValue === NO_CHANGE ||\n readCachedMapValue(context, entryIsClassBased, directiveIndex) === newValue;\n}\n\n/**\n * Updates the cached status of a multi-styling value in the context.\n *\n * The cached map array (which exists in the context) contains a manifest of\n * each multi-styling entry (`[style]` and `[class]` entries) for the template\n * as well as all directives.\n *\n * This function will update the cached status of the provided multi-style\n * entry within the cache.\n *\n * When called, this function will update the following information:\n * - The actual cached value (the raw value that was passed into `[style]` or `[class]`)\n * - The total amount of unique styling entries that this value has written into the context\n * - The exact position of where the multi styling entries start in the context for this binding\n * - The dirty flag will be set to true\n *\n * If the `dirtyFutureValues` param is provided then it will update all future entries (binding\n * entries that exist as apart of other directives) to be dirty as well. This will force the\n * styling algorithm to reapply those values once change detection checks them (which will in\n * turn cause the styling context to update itself and the correct styling values will be\n * rendered on screen).\n */\nfunction updateCachedMapValue(\n context: StylingContext, directiveIndex: number, entryIsClassBased: boolean, cacheValue: any,\n startPosition: number, endPosition: number, totalValues: number, dirtyFutureValues: boolean) {\n const values =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n\n const index = MapBasedOffsetValuesIndex.ValuesStartPosition +\n directiveIndex * MapBasedOffsetValuesIndex.Size;\n\n // in the event that this is true we assume that future values are dirty and therefore\n // will be checked again in the next CD cycle\n if (dirtyFutureValues) {\n const nextStartPosition = startPosition + totalValues * MapBasedOffsetValuesIndex.Size;\n for (let i = index + MapBasedOffsetValuesIndex.Size; i < values.length;\n i += MapBasedOffsetValuesIndex.Size) {\n values[i + MapBasedOffsetValuesIndex.PositionStartOffset] = nextStartPosition;\n values[i + MapBasedOffsetValuesIndex.DirtyFlagOffset] = 1;\n }\n }\n\n values[index + MapBasedOffsetValuesIndex.DirtyFlagOffset] = 0;\n values[index + MapBasedOffsetValuesIndex.PositionStartOffset] = startPosition;\n values[index + MapBasedOffsetValuesIndex.ValueOffset] = cacheValue;\n values[index + MapBasedOffsetValuesIndex.ValueCountOffset] = totalValues;\n\n // the code below counts the total amount of styling values that exist in\n // the context up until this directive. This value will be later used to\n // update the cached value map's total counter value.\n let totalStylingEntries = totalValues;\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < index;\n i += MapBasedOffsetValuesIndex.Size) {\n totalStylingEntries += values[i + MapBasedOffsetValuesIndex.ValueCountOffset];\n }\n\n // because style values come before class values in the context this means\n // that if any new values were inserted then the cache values array for\n // classes is out of sync. The code below will update the offsets to point\n // to their new values.\n if (!entryIsClassBased) {\n const classCache = context[StylingIndex.CachedMultiClasses];\n const classesStartPosition = classCache\n [MapBasedOffsetValuesIndex.ValuesStartPosition +\n MapBasedOffsetValuesIndex.PositionStartOffset];\n const diffInStartPosition = endPosition - classesStartPosition;\n for (let i = MapBasedOffsetValuesIndex.ValuesStartPosition; i < classCache.length;\n i += MapBasedOffsetValuesIndex.Size) {\n classCache[i + MapBasedOffsetValuesIndex.PositionStartOffset] += diffInStartPosition;\n }\n }\n\n values[MapBasedOffsetValuesIndex.EntriesCountPosition] = totalStylingEntries;\n}\n\nfunction hyphenateEntries(entries: string[]): string[] {\n const newEntries: string[] = [];\n for (let i = 0; i < entries.length; i++) {\n newEntries.push(hyphenate(entries[i]));\n }\n return newEntries;\n}\n\nfunction hyphenate(value: string): string {\n return value.replace(\n /[a-z][A-Z]/g, match => `${match.charAt(0)}-${match.charAt(1).toLowerCase()}`);\n}\n\nfunction registerMultiMapEntry(\n context: StylingContext, directiveIndex: number, entryIsClassBased: boolean,\n startPosition: number, count = 0) {\n const cachedValues =\n context[entryIsClassBased ? StylingIndex.CachedMultiClasses : StylingIndex.CachedMultiStyles];\n if (directiveIndex > 0) {\n const limit = MapBasedOffsetValuesIndex.ValuesStartPosition +\n (directiveIndex * MapBasedOffsetValuesIndex.Size);\n while (cachedValues.length < limit) {\n // this means that ONLY directive class styling (like ngClass) was used\n // therefore the root directive will still need to be filled in as well\n // as any other directive spaces in case they only used static values\n cachedValues.push(0, startPosition, null, 0);\n }\n }\n cachedValues.push(0, startPosition, null, count);\n}\n\n/**\n * Inserts or updates an existing entry in the provided `staticStyles` collection.\n *\n * @param index the index representing an existing styling entry in the collection:\n * if provided (numeric): then it will update the existing entry at the given position\n * if null: then it will insert a new entry within the collection\n * @param staticStyles a collection of style or class entries where the value will\n * be inserted or patched\n * @param prop the property value of the entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n * @returns the index of the updated or new entry within the collection\n */\nfunction addOrUpdateStaticStyle(\n index: number | null, staticStyles: InitialStylingValues, prop: string,\n value: string | boolean | null, directiveOwnerIndex: number) {\n if (index === null) {\n index = staticStyles.length;\n staticStyles.push(null, null, null);\n staticStyles[index + InitialStylingValuesIndex.PropOffset] = prop;\n }\n staticStyles[index + InitialStylingValuesIndex.ValueOffset] = value;\n staticStyles[index + InitialStylingValuesIndex.DirectiveOwnerOffset] = directiveOwnerIndex;\n return index;\n}\n\nfunction assertValidDirectiveIndex(context: StylingContext, directiveIndex: number) {\n const dirs = context[StylingIndex.DirectiveRegistryPosition];\n const index = directiveIndex * DirectiveRegistryValuesIndex.Size;\n if (index >= dirs.length ||\n dirs[index + DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset] === -1) {\n throw new Error('The provided directive is not registered with the styling context');\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';\nimport {getInitialClassNameValue} from './styling/class_and_style_bindings';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2;\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\nfunction isCssClassMatching(nodeClassAttrVal: string, cssClassToMatch: string): boolean {\n const nodeClassesLen = nodeClassAttrVal.length;\n const matchIndex = nodeClassAttrVal !.indexOf(cssClassToMatch);\n const matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal ![matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal ![matchEndIdx] !== ' ')) // no space after\n {\n return false;\n }\n return true;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode, currentSelector: string, isProjectionMode: boolean): boolean {\n const tagNameToCompare = tNode.type === TNodeType.Container && !isProjectionMode ?\n NG_TEMPLATE_SELECTOR :\n tNode.tagName;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs || [];\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current as number)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & SelectorFlags.CLASS ? current : selector[++i];\n\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & SelectorFlags.CLASS) && tNode.stylingTemplate) {\n if (!isCssClassMatching(readClassValueFromTNode(tNode), selectorAttrValue as string)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n\n const isInlineTemplate =\n tNode.type == TNodeType.Container && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n const attrIndexInNode =\n findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate, isProjectionMode);\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode && assertNotEqual(\n nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes');\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1] as string;\n }\n\n const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n !isCssClassMatching(compareAgainstClassName, selectorAttrValue as string) ||\n mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\nfunction readClassValueFromTNode(tNode: TNode): string {\n // comparing against CSS class values is complex because the compiler doesn't place them as\n // regular attributes when an element is created. Instead, the classes (and styles for\n // that matter) are placed in a special styling context that is used for resolving all\n // class/style values across static attributes, [style]/[class] and [style.prop]/[class.name]\n // bindings. Therefore if and when the styling context exists then the class values are to be\n // extracted by the context helper code below...\n return tNode.stylingTemplate ? getInitialClassNameValue(tNode.stylingTemplate) : '';\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string, attrs: TAttributes | null, isInlineTemplate: boolean,\n isProjectionMode: boolean): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {\n bindingsMode = true;\n } else if (maybeAttrName === AttributeMarker.Classes) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode, selector: CssSelectorList, isProjectionMode: boolean = false): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector|null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n if (attrs[i] === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset.\n * 2) Reference node index offset.\n * 3) The OpCode to execute.\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nimport {SanitizerFn} from './sanitization';\n\nexport const enum I18nMutateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 3,\n /**\n * Stores shift amount for bits 31-17 that contain parent index.\n */\n SHIFT_PARENT = 17,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b111,\n\n /**\n * OpCode to select a node. (next OpCode will contain the operation.)\n */\n Select = 0b000,\n /**\n * OpCode to append the current node to `PARENT`.\n */\n AppendChild = 0b001,\n /**\n * OpCode to remove the `REF` node from `PARENT`.\n */\n Remove = 0b011,\n /**\n * OpCode to set the attribute of a node.\n */\n Attr = 0b100,\n /**\n * OpCode to simulate elementEnd()\n */\n ElementEnd = 0b101,\n /**\n * OpCode to read the remove OpCodes for the nested ICU\n */\n RemoveNestedIcu = 0b110,\n}\n\n/**\n * Marks that the next string is for element.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element'\n};\nexport interface ELEMENT_MARKER { marker: 'element'; }\n\n/**\n * Marks that the next string is for comment.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const COMMENT_MARKER: COMMENT_MARKER = {\n marker: 'comment'\n};\n\nexport interface COMMENT_MARKER { marker: 'comment'; }\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n * // For adding text nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createTextNode('abc');\n * // lView[1].insertBefore(node, lView[2]);\n * 'abc', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createTextNode('xyz');\n * // lView[1].appendChild(node);\n * 'xyz', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createElement('div');\n * // lView[1].insertBefore(node, lView[2]);\n * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createElement('div');\n * // lView[1].appendChild(node);\n * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // const node = lView[index++] = document.createComment('');\n * // lView[1].insertBefore(node, lView[2]);\n * COMMENT_MARKER, '', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[index++] = document.createComment('');\n * // lView[1].appendChild(node);\n * COMMENT_MARKER, '', 1 << SHIFT_PARENT | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].insertBefore(node, lView[3]);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 3 << SHIFT_REF | InsertBefore,\n *\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | AppendChild,\n *\n * // For removing existing nodes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // removeChild(tView.data(1), node, lView);\n * 1 << SHIFT_REF | Remove,\n *\n * // For writing attributes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // node.setAttribute('attr', 'value');\n * 1 << SHIFT_REF | Select, 'attr', 'value'\n * // NOTE: Select followed by two string (vs select followed by OpCode)\n * ];\n * ```\n * NOTE:\n * - `index` is initial location where the extra nodes should be stored in the EXPANDO section of\n * `LVIewData`.\n *\n * See: `applyI18nCreateOpCodes`;\n */\nexport interface I18nMutateOpCodes extends Array<number|string|ELEMENT_MARKER|COMMENT_MARKER|null> {\n}\n\nexport const enum I18nUpdateOpCode {\n /**\n * Stores shift amount for bits 17-2 that contain reference index.\n */\n SHIFT_REF = 2,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b11,\n\n /**\n * OpCode to update a text node.\n */\n Text = 0b00,\n /**\n * OpCode to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * OpCode to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * OpCode to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n * if (rf & RenderFlags.Update) {\n * i18nExp(bind(ctx.exp1)); // If changed set mask bit 1\n * i18nExp(bind(ctx.exp2)); // If changed set mask bit 2\n * i18nExp(bind(ctx.exp3)); // If changed set mask bit 3\n * i18nExp(bind(ctx.exp4)); // If changed set mask bit 4\n * i18nApply(0); // Apply all changes by executing the OpCodes.\n * }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n * // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n * // If `changeMask & 0b11`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `7` values and start processing next OpCodes.\n * 0b11, 7,\n * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n * 'pre', -4, 'in', -3, 'post',\n * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n * // If `changeMask & 0b100`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b100, 4,\n * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n * 'Hello ', -2, '!',\n * // Update text: `lView[1].textContent = newValue;`\n * 1 << SHIFT_REF | Text,\n *\n * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n * // If `changeMask & 0b1000`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b1000, 4,\n * // Concatenate `newValue = lView[bindIndex -1];`.\n * -1,\n * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n * -1, 1,\n * // Update ICU: `icuUpdateCase(lView[1], 0);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string|number|SanitizerFn|null> {}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n /**\n * Number of slots to allocate in expando.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number;\n\n /**\n * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n *\n * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n */\n create: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes which will be executed on each change detection to determine if any changes to\n * DOM are required.\n */\n update: I18nUpdateOpCodes;\n\n /**\n * A list of ICUs in a translation block (or `null` if block has no ICUs).\n *\n * Example:\n * Given: `<div i18n>You have {count, plural, ...} and {state, switch, ...}</div>`\n * There would be 2 ICUs in this array.\n * 1. `{count, plural, ...}`\n * 2. `{state, switch, ...}`\n */\n icus: TIcu[]|null;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n select = 0,\n plural = 1,\n}\n\nexport interface TIcu {\n /**\n * Defines the ICU type of `select` or `plural`\n */\n type: IcuType;\n\n /**\n * Number of slots to allocate in expando for each case.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number[];\n\n /**\n * An optional array of child/sub ICUs.\n *\n * In case of nested ICUs such as:\n * ```\n * {�0�, plural,\n * =0 {zero}\n * other {�0� {�1�, select,\n * cat {cats}\n * dog {dogs}\n * other {animals}\n * }!\n * }\n * }\n * ```\n * When the parent ICU is changing it must clean up child ICUs as well. For this reason it needs\n * to know which child ICUs to run clean up for as well.\n *\n * In the above example this would be:\n * ```ts\n * [\n * [], // `=0` has no sub ICUs\n * [1], // `other` has one subICU at `1`st index.\n * ]\n * ```\n *\n * The reason why it is Array of Arrays is because first array represents the case, and second\n * represents the child ICUs to clean up. There may be more than one child ICUs per case.\n */\n childIcus: number[][];\n\n /**\n * A list of case values which the current ICU will try to match.\n *\n * The last value is `other`\n */\n cases: any[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: I18nMutateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nMutateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes[];\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\n\n/**\n * --------\n *\n * This file contains temporary code to incorporate the new styling refactor\n * code to work alongside the existing instruction set.\n *\n * This file will be removed once `select(n)` is fully functional (once\n * it is able to evaluate host bindings in sync element-by-element\n * with template code).\n *\n * --------\n */\n\n/**\n * A temporary enum of states that inform the core whether or not\n * to defer all styling instruction calls to the old or new\n * styling implementation.\n */\nexport const enum RuntimeStylingMode {\n UseOld = 0,\n UseBothOldAndNew = 1,\n UseNew = 2,\n}\n\nlet _stylingMode = 0;\n\n/**\n * Temporary function used to inform the existing styling algorithm\n * code to delegate all styling instruction calls to the new refactored\n * styling code.\n */\nexport function runtimeSetStylingMode(mode: RuntimeStylingMode) {\n _stylingMode = mode;\n}\n\nexport function runtimeIsNewStylingInUse() {\n return _stylingMode > RuntimeStylingMode.UseOld;\n}\n\nexport function runtimeAllowOldStyling() {\n return _stylingMode < RuntimeStylingMode.UseNew;\n}\n\nlet _currentSanitizer: Sanitizer|StyleSanitizeFn|null;\nexport function setCurrentStyleSanitizer(sanitizer: Sanitizer | StyleSanitizeFn | null) {\n _currentSanitizer = sanitizer;\n}\n\nexport function getCurrentStyleSanitizer() {\n return _currentSanitizer;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport function attachDebugObject(obj: any, debug: any) {\n Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {Sanitizer, SecurityContext} from '../../sanitization/security';\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {StylingContext} from '../interfaces/styling';\nimport {LView, SANITIZER} from '../interfaces/view';\nimport {getProp as getOldProp, getSinglePropIndexValue as getOldSinglePropIndexValue} from '../styling/class_and_style_bindings';\n\nimport {LStylingMap, LStylingMapIndex, TStylingConfigFlags, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\nimport {getCurrentStyleSanitizer, setCurrentStyleSanitizer} from './state';\n\nconst MAP_BASED_ENTRY_PROP_NAME = '--MAP--';\n\n/**\n * Creates a new instance of the `TStylingContext`.\n *\n * This function will also pre-fill the context with data\n * for map-based bindings.\n */\nexport function allocTStylingContext(): TStylingContext {\n // because map-based bindings deal with a dynamic set of values, there\n // is no way to know ahead of time whether or not sanitization is required.\n // For this reason the configuration will always mark sanitization as active\n // (this means that when map-based values are applied then sanitization will\n // be checked against each property).\n const mapBasedConfig = TStylingContextPropConfigFlags.SanitizationRequired;\n return [TStylingConfigFlags.Initial, 0, mapBasedConfig, 0, MAP_BASED_ENTRY_PROP_NAME];\n}\n\n/**\n * Temporary function that allows for a string-based property name to be\n * obtained from an index-based property identifier.\n *\n * This function will be removed once the new styling refactor code (which\n * lives inside of `render3/styling_next/`) replaces the existing styling\n * implementation.\n */\nexport function getBindingNameFromIndex(\n stylingContext: StylingContext, offset: number, directiveIndex: number, isClassBased: boolean) {\n const singleIndex =\n getOldSinglePropIndexValue(stylingContext, directiveIndex, offset, isClassBased);\n return getOldProp(stylingContext, singleIndex);\n}\n\nexport function updateContextDirectiveIndex(context: TStylingContext, index: number) {\n context[TStylingContextIndex.MaxDirectiveIndexPosition] = index;\n}\n\nfunction getConfig(context: TStylingContext) {\n return context[TStylingContextIndex.ConfigPosition];\n}\n\nexport function setConfig(context: TStylingContext, value: number) {\n context[TStylingContextIndex.ConfigPosition] = value;\n}\n\nexport function getProp(context: TStylingContext, index: number) {\n return context[index + TStylingContextIndex.PropOffset] as string;\n}\n\nfunction getPropConfig(context: TStylingContext, index: number): number {\n return (context[index + TStylingContextIndex.ConfigAndGuardOffset] as number) &\n TStylingContextPropConfigFlags.Mask;\n}\n\nexport function isSanitizationRequired(context: TStylingContext, index: number) {\n return (getPropConfig(context, index) & TStylingContextPropConfigFlags.SanitizationRequired) > 0;\n}\n\nexport function getGuardMask(context: TStylingContext, index: number) {\n const configGuardValue = context[index + TStylingContextIndex.ConfigAndGuardOffset] as number;\n return configGuardValue >> TStylingContextPropConfigFlags.TotalBits;\n}\n\nexport function setGuardMask(context: TStylingContext, index: number, maskValue: number) {\n const config = getPropConfig(context, index);\n const guardMask = maskValue << TStylingContextPropConfigFlags.TotalBits;\n context[index + TStylingContextIndex.ConfigAndGuardOffset] = config | guardMask;\n}\n\nexport function getValuesCount(context: TStylingContext, index: number) {\n return context[index + TStylingContextIndex.ValuesCountOffset] as number;\n}\n\nexport function getBindingValue(context: TStylingContext, index: number, offset: number) {\n return context[index + TStylingContextIndex.BindingsStartOffset + offset] as number | string;\n}\n\nexport function getDefaultValue(context: TStylingContext, index: number): string|boolean|null {\n const valuesCount = getValuesCount(context, index);\n return context[index + TStylingContextIndex.BindingsStartOffset + valuesCount - 1] as string |\n boolean | null;\n}\n\n/**\n * Temporary function which determines whether or not a context is\n * allowed to be flushed based on the provided directive index.\n */\nexport function allowStylingFlush(context: TStylingContext, index: number) {\n return index === context[TStylingContextIndex.MaxDirectiveIndexPosition];\n}\n\nexport function lockContext(context: TStylingContext) {\n setConfig(context, getConfig(context) | TStylingConfigFlags.Locked);\n}\n\nexport function isContextLocked(context: TStylingContext): boolean {\n return (getConfig(context) & TStylingConfigFlags.Locked) > 0;\n}\n\nexport function getPropValuesStartPosition(context: TStylingContext) {\n return TStylingContextIndex.MapBindingsBindingsStartPosition +\n context[TStylingContextIndex.MapBindingsValuesCountPosition];\n}\n\nexport function isMapBased(prop: string) {\n return prop === MAP_BASED_ENTRY_PROP_NAME;\n}\n\nexport function hasValueChanged(\n a: LStylingMap | number | String | string | null | boolean | undefined | {},\n b: LStylingMap | number | String | string | null | boolean | undefined | {}): boolean {\n const compareValueA = Array.isArray(a) ? a[LStylingMapIndex.RawValuePosition] : a;\n const compareValueB = Array.isArray(b) ? b[LStylingMapIndex.RawValuePosition] : b;\n return compareValueA !== compareValueB;\n}\n\n/**\n * Determines whether the provided styling value is truthy or falsy.\n */\nexport function isStylingValueDefined(value: any) {\n // the reason why null is compared against is because\n // a CSS class value that is set to `false` must be\n // respected (otherwise it would be treated as falsy).\n // Empty string values are because developers usually\n // set a value to an empty string to remove it.\n return value != null && value !== '';\n}\n\n/**\n * Returns the current style sanitizer function for the given view.\n *\n * The default style sanitizer (which lives inside of `LView`) will\n * be returned depending on whether the `styleSanitizer` instruction\n * was called or not prior to any styling instructions running.\n */\nexport function getCurrentOrLViewSanitizer(lView: LView): StyleSanitizeFn|null {\n const sanitizer: StyleSanitizeFn|null = (getCurrentStyleSanitizer() || lView[SANITIZER]) as any;\n if (sanitizer && typeof sanitizer !== 'function') {\n setCurrentStyleSanitizer(sanitizer);\n return sanitizeUsingSanitizerObject;\n }\n return sanitizer;\n}\n\n/**\n * Style sanitization function that internally uses a `Sanitizer` instance to handle style\n * sanitization.\n */\nconst sanitizeUsingSanitizerObject: StyleSanitizeFn =\n (prop: string, value: string, mode: StyleSanitizeMode) => {\n const sanitizer = getCurrentStyleSanitizer() as Sanitizer;\n if (sanitizer) {\n if (mode & StyleSanitizeMode.SanitizeOnly) {\n return sanitizer.sanitize(SecurityContext.STYLE, value);\n } else {\n return true;\n }\n }\n return value;\n };\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3, RendererStyleFlags3, isProceduralRenderer} from '../interfaces/renderer';\n\nimport {ApplyStylingFn, LStylingData, LStylingMap, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex, TStylingContextPropConfigFlags} from './interfaces';\nimport {allowStylingFlush, getBindingValue, getGuardMask, getProp, getPropValuesStartPosition, getValuesCount, hasValueChanged, isContextLocked, isSanitizationRequired, isStylingValueDefined, lockContext, setGuardMask} from './util';\n\n\n/**\n * --------\n *\n * This file contains the core logic for styling in Angular.\n *\n * All styling bindings (i.e. `[style]`, `[style.prop]`, `[class]` and `[class.name]`)\n * will have their values be applied through the logic in this file.\n *\n * When a binding is encountered (e.g. `<div [style.width]=\"w\">`) then\n * the binding data will be populated into a `TStylingContext` data-structure.\n * There is only one `TStylingContext` per `TNode` and each element instance\n * will update its style/class binding values in concert with the styling\n * context.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\nconst DEFAULT_BINDING_VALUE = null;\nconst DEFAULT_SIZE_VALUE = 1;\n\n// The first bit value reflects a map-based binding value's bit.\n// The reason why it's always activated for every entry in the map\n// is so that if any map-binding values update then all other prop\n// based bindings will pass the guard check automatically without\n// any extra code or flags.\nexport const DEFAULT_GUARD_MASK_VALUE = 0b1;\nconst STYLING_INDEX_FOR_MAP_BINDING = 0;\nconst STYLING_INDEX_START_VALUE = 1;\n\n// the values below are global to all styling code below. Each value\n// will either increment or mutate each time a styling instruction is\n// executed. Do not modify the values below.\nlet currentStyleIndex = STYLING_INDEX_START_VALUE;\nlet currentClassIndex = STYLING_INDEX_START_VALUE;\nlet stylesBitMask = 0;\nlet classesBitMask = 0;\nlet deferredBindingQueue: (TStylingContext | number | string | null | boolean)[] = [];\n\n/**\n * Visits a class-based binding and updates the new value (if changed).\n *\n * This function is called each time a class-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateClassBinding(\n context: TStylingContext, data: LStylingData, prop: string | null, bindingIndex: number,\n value: boolean | string | null | undefined | LStylingMap, deferRegistration: boolean,\n forceUpdate: boolean): void {\n const isMapBased = !prop;\n const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentClassIndex++;\n const updated = updateBindingData(\n context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, false);\n if (updated || forceUpdate) {\n classesBitMask |= 1 << index;\n }\n}\n\n/**\n * Visits a style-based binding and updates the new value (if changed).\n *\n * This function is called each time a style-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\nexport function updateStyleBinding(\n context: TStylingContext, data: LStylingData, prop: string | null, bindingIndex: number,\n value: String | string | number | null | undefined | LStylingMap,\n sanitizer: StyleSanitizeFn | null, deferRegistration: boolean, forceUpdate: boolean): void {\n const isMapBased = !prop;\n const index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentStyleIndex++;\n const sanitizationRequired = isMapBased ?\n true :\n (sanitizer ? sanitizer(prop !, null, StyleSanitizeMode.ValidateProperty) : false);\n const updated = updateBindingData(\n context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate,\n sanitizationRequired);\n if (updated || forceUpdate) {\n stylesBitMask |= 1 << index;\n }\n}\n\n/**\n * Called each time a binding value has changed within the provided `TStylingContext`.\n *\n * This function is designed to be called from `updateStyleBinding` and `updateClassBinding`.\n * If called during the first update pass, the binding will be registered in the context.\n * If the binding does get registered and the `deferRegistration` flag is true then the\n * binding data will be queued up until the context is later flushed in `applyStyling`.\n *\n * This function will also update binding slot in the provided `LStylingData` with the\n * new binding entry (if it has changed).\n *\n * @returns whether or not the binding value was updated in the `LStylingData`.\n */\nfunction updateBindingData(\n context: TStylingContext, data: LStylingData, counterIndex: number, prop: string | null,\n bindingIndex: number,\n value: string | String | number | boolean | null | undefined | LStylingMap,\n deferRegistration: boolean, forceUpdate: boolean, sanitizationRequired: boolean): boolean {\n if (!isContextLocked(context)) {\n if (deferRegistration) {\n deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n } else {\n deferredBindingQueue.length && flushDeferredBindings();\n\n // this will only happen during the first update pass of the\n // context. The reason why we can't use `tNode.firstTemplatePass`\n // here is because its not guaranteed to be true when the first\n // update pass is executed (remember that all styling instructions\n // are run in the update phase, and, as a result, are no more\n // styling instructions that are run in the creation phase).\n registerBinding(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n }\n }\n\n const changed = forceUpdate || hasValueChanged(data[bindingIndex], value);\n if (changed) {\n data[bindingIndex] = value;\n }\n return changed;\n}\n\n/**\n * Schedules a binding registration to be run at a later point.\n *\n * The reasoning for this feature is to ensure that styling\n * bindings are registered in the correct order for when\n * directives/components have a super/sub class inheritance\n * chains. Each directive's styling bindings must be\n * registered into the context in reverse order. Therefore all\n * bindings will be buffered in reverse order and then applied\n * after the inheritance chain exits.\n */\nfunction deferBindingRegistration(\n context: TStylingContext, counterIndex: number, prop: string | null, bindingIndex: number,\n sanitizationRequired: boolean) {\n deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n}\n\n/**\n * Flushes the collection of deferred bindings and causes each entry\n * to be registered into the context.\n */\nfunction flushDeferredBindings() {\n let i = 0;\n while (i < deferredBindingQueue.length) {\n const context = deferredBindingQueue[i++] as TStylingContext;\n const count = deferredBindingQueue[i++] as number;\n const prop = deferredBindingQueue[i++] as string;\n const bindingIndex = deferredBindingQueue[i++] as number | null;\n const sanitizationRequired = deferredBindingQueue[i++] as boolean;\n registerBinding(context, count, prop, bindingIndex, sanitizationRequired);\n }\n deferredBindingQueue.length = 0;\n}\n\n/**\n * Registers the provided binding (prop + bindingIndex) into the context.\n *\n * This function is shared between bindings that are assigned immediately\n * (via `updateBindingData`) and at a deferred stage. When called, it will\n * figure out exactly where to place the binding data in the context.\n *\n * It is needed because it will either update or insert a styling property\n * into the context at the correct spot.\n *\n * When called, one of two things will happen:\n *\n * 1) If the property already exists in the context then it will just add\n * the provided `bindingValue` to the end of the binding sources region\n * for that particular property.\n *\n * - If the binding value is a number then it will be added as a new\n * binding index source next to the other binding sources for the property.\n *\n * - Otherwise, if the binding value is a string/boolean/null type then it will\n * replace the default value for the property if the default value is `null`.\n *\n * 2) If the property does not exist then it will be inserted into the context.\n * The styling context relies on all properties being stored in alphabetical\n * order, so it knows exactly where to store it.\n *\n * When inserted, a default `null` value is created for the property which exists\n * as the default value for the binding. If the bindingValue property is inserted\n * and it is either a string, number or null value then that will replace the default\n * value.\n *\n * Note that this function is also used for map-based styling bindings. They are treated\n * much the same as prop-based bindings, but, because they do not have a property value\n * (since it's a map), all map-based entries are stored in an already populated area of\n * the context at the top (which is reserved for map-based entries).\n */\nexport function registerBinding(\n context: TStylingContext, countId: number, prop: string | null,\n bindingValue: number | null | string | boolean, sanitizationRequired?: boolean) {\n // prop-based bindings (e.g `<div [style.width]=\"w\" [class.foo]=\"f\">`)\n if (prop) {\n let found = false;\n let i = getPropValuesStartPosition(context);\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n const p = getProp(context, i);\n found = prop <= p;\n if (found) {\n // all style/class bindings are sorted by property name\n if (prop < p) {\n allocateNewContextEntry(context, i, prop, sanitizationRequired);\n }\n addBindingIntoContext(context, false, i, bindingValue, countId);\n break;\n }\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n\n if (!found) {\n allocateNewContextEntry(context, context.length, prop, sanitizationRequired);\n addBindingIntoContext(context, false, i, bindingValue, countId);\n }\n } else {\n // map-based bindings (e.g `<div [style]=\"s\" [class]=\"{className:true}\">`)\n // there is no need to allocate the map-based binding region into the context\n // since it is already there when the context is first created.\n addBindingIntoContext(\n context, true, TStylingContextIndex.MapBindingsPosition, bindingValue, countId);\n }\n}\n\nfunction allocateNewContextEntry(\n context: TStylingContext, index: number, prop: string, sanitizationRequired?: boolean) {\n // 1,2: splice index locations\n // 3: each entry gets a config value (guard mask + flags)\n // 4. each entry gets a size value (which is always one because there is always a default binding\n // value)\n // 5. the property that is getting allocated into the context\n // 6. the default binding value (usually `null`)\n const config = sanitizationRequired ? TStylingContextPropConfigFlags.SanitizationRequired :\n TStylingContextPropConfigFlags.Default;\n context.splice(index, 0, config, DEFAULT_SIZE_VALUE, prop, DEFAULT_BINDING_VALUE);\n setGuardMask(context, index, DEFAULT_GUARD_MASK_VALUE);\n}\n\n/**\n * Inserts a new binding value into a styling property tuple in the `TStylingContext`.\n *\n * A bindingValue is inserted into a context during the first update pass\n * of a template or host bindings function. When this occurs, two things\n * happen:\n *\n * - If the bindingValue value is a number then it is treated as a bindingIndex\n * value (a index in the `LView`) and it will be inserted next to the other\n * binding index entries.\n *\n * - Otherwise the binding value will update the default value for the property\n * and this will only happen if the default value is `null`.\n *\n * Note that this function also handles map-based bindings and will insert them\n * at the top of the context.\n */\nfunction addBindingIntoContext(\n context: TStylingContext, isMapBased: boolean, index: number,\n bindingValue: number | string | boolean | null, countId: number) {\n const valuesCount = getValuesCount(context, index);\n\n let lastValueIndex = index + TStylingContextIndex.BindingsStartOffset + valuesCount;\n if (!isMapBased) {\n // prop-based values all have default values, but map-based entries do not.\n // we want to access the index for the default value in this case and not just\n // the bindings...\n lastValueIndex--;\n }\n\n if (typeof bindingValue === 'number') {\n context.splice(lastValueIndex, 0, bindingValue);\n (context[index + TStylingContextIndex.ValuesCountOffset] as number)++;\n\n // now that a new binding index has been added to the property\n // the guard mask bit value (at the `countId` position) needs\n // to be included into the existing mask value.\n const guardMask = getGuardMask(context, index) | (1 << countId);\n setGuardMask(context, index, guardMask);\n } else if (typeof bindingValue === 'string' && context[lastValueIndex] == null) {\n context[lastValueIndex] = bindingValue;\n }\n}\n\n/**\n * Applies all class entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with class bindings.\n *\n * @returns whether or not the classes were flushed to the element.\n */\nexport function applyClasses(\n renderer: Renderer3 | ProceduralRenderer3 | null, data: LStylingData, context: TStylingContext,\n element: RElement, directiveIndex: number): boolean {\n let classesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n const isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (classesBitMask) {\n // there is no way to sanitize a class value therefore `sanitizer=null`\n applyStyling(context, renderer, element, data, classesBitMask, setClass, null);\n classesBitMask = 0;\n classesFlushed = true;\n }\n currentClassIndex = STYLING_INDEX_START_VALUE;\n }\n return classesFlushed;\n}\n\n/**\n * Applies all style entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with style bindings.\n *\n * @returns whether or not the styles were flushed to the element.\n */\nexport function applyStyles(\n renderer: Renderer3 | ProceduralRenderer3 | null, data: LStylingData, context: TStylingContext,\n element: RElement, directiveIndex: number, sanitizer: StyleSanitizeFn | null): boolean {\n let stylesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n const isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (stylesBitMask) {\n applyStyling(context, renderer, element, data, stylesBitMask, setStyle, sanitizer);\n stylesBitMask = 0;\n stylesFlushed = true;\n }\n currentStyleIndex = STYLING_INDEX_START_VALUE;\n return true;\n }\n return stylesFlushed;\n}\n\n/**\n * Runs through the provided styling context and applies each value to\n * the provided element (via the renderer) if one or more values are present.\n *\n * This function will iterate over all entries present in the provided\n * `TStylingContext` array (both prop-based and map-based bindings).-\n *\n * Each entry, within the `TStylingContext` array, is stored alphabetically\n * and this means that each prop/value entry will be applied in order\n * (so long as it is marked dirty in the provided `bitMask` value).\n *\n * If there are any map-based entries present (which are applied to the\n * element via the `[style]` and `[class]` bindings) then those entries\n * will be applied as well. However, the code for that is not apart of\n * this function. Instead, each time a property is visited, then the\n * code below will call an external function called `stylingMapsSyncFn`\n * and, if present, it will keep the application of styling values in\n * map-based bindings up to sync with the application of prop-based\n * bindings.\n *\n * Visit `styling_next/map_based_bindings.ts` to learn more about how the\n * algorithm works for map-based styling bindings.\n *\n * Note that this function is not designed to be called in isolation (use\n * `applyClasses` and `applyStyles` to actually apply styling values).\n */\nexport function applyStyling(\n context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n bindingData: LStylingData, bitMaskValue: number | boolean, applyStylingFn: ApplyStylingFn,\n sanitizer: StyleSanitizeFn | null) {\n deferredBindingQueue.length && flushDeferredBindings();\n\n const bitMask = normalizeBitMaskValue(bitMaskValue);\n const stylingMapsSyncFn = getStylingMapsSyncFn();\n const mapsGuardMask = getGuardMask(context, TStylingContextIndex.MapBindingsPosition);\n const applyAllValues = (bitMask & mapsGuardMask) > 0;\n const mapsMode =\n applyAllValues ? StylingMapsSyncMode.ApplyAllValues : StylingMapsSyncMode.TraverseValues;\n\n let i = getPropValuesStartPosition(context);\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n const guardMask = getGuardMask(context, i);\n if (bitMask & guardMask) {\n let valueApplied = false;\n const prop = getProp(context, i);\n const valuesCountUpToDefault = valuesCount - 1;\n const defaultValue = getBindingValue(context, i, valuesCountUpToDefault) as string | null;\n\n // case 1: apply prop-based values\n // try to apply the binding values and see if a non-null\n // value gets set for the styling binding\n for (let j = 0; j < valuesCountUpToDefault; j++) {\n const bindingIndex = getBindingValue(context, i, j) as number;\n const value = bindingData[bindingIndex];\n if (isStylingValueDefined(value)) {\n const finalValue = sanitizer && isSanitizationRequired(context, i) ?\n sanitizer(prop, value, StyleSanitizeMode.SanitizeOnly) :\n value;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndex);\n valueApplied = true;\n break;\n }\n }\n\n // case 2: apply map-based values\n // traverse through each map-based styling binding and update all values up to\n // the provided `prop` value. If the property was not applied in the loop above\n // then it will be attempted to be applied in the maps sync code below.\n if (stylingMapsSyncFn) {\n // determine whether or not to apply the target property or to skip it\n const mode = mapsMode | (valueApplied ? StylingMapsSyncMode.SkipTargetProp :\n StylingMapsSyncMode.ApplyTargetProp);\n const valueAppliedWithinMap = stylingMapsSyncFn(\n context, renderer, element, bindingData, applyStylingFn, sanitizer, mode, prop,\n defaultValue);\n valueApplied = valueApplied || valueAppliedWithinMap;\n }\n\n // case 3: apply the default value\n // if the value has not yet been applied then a truthy value does not exist in the\n // prop-based or map-based bindings code. If and when this happens, just apply the\n // default value (even if the default value is `null`).\n if (!valueApplied) {\n applyStylingFn(renderer, element, prop, defaultValue);\n }\n }\n\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n\n // the map-based styling entries may have not applied all their\n // values. For this reason, one more call to the sync function\n // needs to be issued at the end.\n if (stylingMapsSyncFn) {\n stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mapsMode);\n }\n}\n\nfunction normalizeBitMaskValue(value: number | boolean): number {\n // if pass => apply all values (-1 implies that all bits are flipped to true)\n if (value === true) return -1;\n\n // if pass => skip all values\n if (value === false) return 0;\n\n // return the bit mask value as is\n return value;\n}\n\nlet _activeStylingMapApplyFn: SyncStylingMapsFn|null = null;\nexport function getStylingMapsSyncFn() {\n return _activeStylingMapApplyFn;\n}\n\nexport function setStylingMapsSyncFn(fn: SyncStylingMapsFn) {\n _activeStylingMapApplyFn = fn;\n}\n\n/**\n * Assigns a style value to a style property for the given element.\n */\nconst setStyle: ApplyStylingFn =\n (renderer: Renderer3 | null, native: any, prop: string, value: string | null) => {\n if (value) {\n // opacity, z-index and flexbox all have number values\n // and these need to be converted into strings so that\n // they can be assigned properly.\n value = value.toString();\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n } else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n };\n\n/**\n * Adds/removes the provided className value to the provided element.\n */\nconst setClass: ApplyStylingFn =\n (renderer: Renderer3 | null, native: any, className: string, value: any) => {\n if (className !== '') {\n if (value) {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native.classList.add(className);\n } else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native.classList.remove(className);\n }\n }\n };\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {StyleSanitizeFn, StyleSanitizeMode} from '../../sanitization/style_sanitizer';\nimport {ProceduralRenderer3, RElement, Renderer3} from '../interfaces/renderer';\n\nimport {setStylingMapsSyncFn} from './bindings';\nimport {ApplyStylingFn, LStylingData, LStylingMap, LStylingMapIndex, StylingMapsSyncMode, SyncStylingMapsFn, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {getBindingValue, getValuesCount, isStylingValueDefined} from './util';\n\n\n/**\n * --------\n *\n * This file contains the algorithm logic for applying map-based bindings\n * such as `[style]` and `[class]`.\n *\n * --------\n */\n\n/**\n * Used to apply styling values presently within any map-based bindings on an element.\n *\n * Angular supports map-based styling bindings which can be applied via the\n * `[style]` and `[class]` bindings which can be placed on any HTML element.\n * These bindings can work independently, together or alongside prop-based\n * styling bindings (e.g. `<div [style]=\"x\" [style.width]=\"w\">`).\n *\n * If a map-based styling binding is detected by the compiler, the following\n * AOT code is produced:\n *\n * ```typescript\n * styleMap(ctx.styles); // styles = {key:value}\n * classMap(ctx.classes); // classes = {key:value}|string\n * ```\n *\n * If and when either of the instructions above are evaluated, then the code\n * present in this file is included into the bundle. The mechanism used, to\n * activate support for map-based bindings at runtime is possible via the\n * `activeStylingMapFeature` function (which is also present in this file).\n *\n * # The Algorithm\n * Whenever a map-based binding updates (which is when the identity of the\n * map-value changes) then the map is iterated over and a `LStylingMap` array\n * is produced. The `LStylingMap` instance is stored in the binding location\n * where the `BINDING_INDEX` is situated when the `styleMap()` or `classMap()`\n * instruction were called. Once the binding changes, then the internal `bitMask`\n * value is marked as dirty.\n *\n * Styling values are applied once CD exits the element (which happens when\n * the `select(n)` instruction is called or the template function exits). When\n * this occurs, all prop-based bindings are applied. If a map-based binding is\n * present then a special flushing function (called a sync function) is made\n * available and it will be called each time a styling property is flushed.\n *\n * The flushing algorithm is designed to apply styling for a property (which is\n * a CSS property or a className value) one by one. If map-based bindings\n * are present, then the flushing algorithm will keep calling the maps styling\n * sync function each time a property is visited. This way, the flushing\n * behavior of map-based bindings will always be at the same property level\n * as the current prop-based property being iterated over (because everything\n * is alphabetically sorted).\n *\n * Let's imagine we have the following HTML template code:\n *\n * ```html\n * <div [style]=\"{width:'100px', height:'200px', 'z-index':'10'}\"\n * [style.width.px]=\"200\">...</div>\n * ```\n *\n * When CD occurs, both the `[style]` and `[style.width]` bindings\n * are evaluated. Then when the styles are flushed on screen, the\n * following operations happen:\n *\n * 1. `[style.width]` is attempted to be written to the element.\n *\n * 2. Once that happens, the algorithm instructs the map-based\n * entries (`[style]` in this case) to \"catch up\" and apply\n * all values up to the `width` value. When this happens the\n * `height` value is applied to the element (since it is\n * alphabetically situated before the `width` property).\n *\n * 3. Since there are no more prop-based entries anymore, the\n * loop exits and then, just before the flushing ends, it\n * instructs all map-based bindings to \"finish up\" applying\n * their values.\n *\n * 4. The only remaining value within the map-based entries is\n * the `z-index` value (`width` got skipped because it was\n * successfully applied via the prop-based `[style.width]`\n * binding). Since all map-based entries are told to \"finish up\",\n * the `z-index` value is iterated over and it is then applied\n * to the element.\n *\n * The most important thing to take note of here is that prop-based\n * bindings are evaluated in order alongside map-based bindings.\n * This allows all styling across an element to be applied in O(n)\n * time (a similar algorithm is that of the array merge algorithm\n * in merge sort).\n */\nexport const syncStylingMap: SyncStylingMapsFn =\n (context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n mode: StylingMapsSyncMode, targetProp?: string | null,\n defaultValue?: string | null): boolean => {\n let targetPropValueWasApplied = false;\n\n // once the map-based styling code is activate it is never deactivated. For this reason a\n // check to see if the current styling context has any map based bindings is required.\n const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n if (totalMaps) {\n let runTheSyncAlgorithm = true;\n const loopUntilEnd = !targetProp;\n\n // If the code is told to finish up (run until the end), but the mode\n // hasn't been flagged to apply values (it only traverses values) then\n // there is no point in iterating over the array because nothing will\n // be applied to the element.\n if (loopUntilEnd && (mode & ~StylingMapsSyncMode.ApplyAllValues)) {\n runTheSyncAlgorithm = false;\n targetPropValueWasApplied = true;\n }\n\n if (runTheSyncAlgorithm) {\n targetPropValueWasApplied = innerSyncStylingMap(\n context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp || null,\n 0, defaultValue || null);\n }\n\n if (loopUntilEnd) {\n resetSyncCursors();\n }\n }\n\n return targetPropValueWasApplied;\n };\n\n/**\n * Recursive function designed to apply map-based styling to an element one map at a time.\n *\n * This function is designed to be called from the `syncStylingMap` function and will\n * apply map-based styling data one map at a time to the provided `element`.\n *\n * This function is recursive and it will call itself if a follow-up map value is to be\n * processed. To learn more about how the algorithm works, see `syncStylingMap`.\n */\nfunction innerSyncStylingMap(\n context: TStylingContext, renderer: Renderer3 | ProceduralRenderer3 | null, element: RElement,\n data: LStylingData, applyStylingFn: ApplyStylingFn, sanitizer: StyleSanitizeFn | null,\n mode: StylingMapsSyncMode, targetProp: string | null, currentMapIndex: number,\n defaultValue: string | null): boolean {\n let targetPropValueWasApplied = false;\n\n const totalMaps = getValuesCount(context, TStylingContextIndex.MapBindingsPosition);\n if (currentMapIndex < totalMaps) {\n const bindingIndex = getBindingValue(\n context, TStylingContextIndex.MapBindingsPosition, currentMapIndex) as number;\n const lStylingMap = data[bindingIndex] as LStylingMap;\n\n let cursor = getCurrentSyncCursor(currentMapIndex);\n while (cursor < lStylingMap.length) {\n const prop = getMapProp(lStylingMap, cursor);\n const iteratedTooFar = targetProp && prop > targetProp;\n const isTargetPropMatched = !iteratedTooFar && prop === targetProp;\n const value = getMapValue(lStylingMap, cursor);\n const valueIsDefined = isStylingValueDefined(value);\n\n // the recursive code is designed to keep applying until\n // it reaches or goes past the target prop. If and when\n // this happens then it will stop processing values, but\n // all other map values must also catch up to the same\n // point. This is why a recursive call is still issued\n // even if the code has iterated too far.\n const innerMode =\n iteratedTooFar ? mode : resolveInnerMapMode(mode, valueIsDefined, isTargetPropMatched);\n const innerProp = iteratedTooFar ? targetProp : prop;\n let valueApplied = innerSyncStylingMap(\n context, renderer, element, data, applyStylingFn, sanitizer, innerMode, innerProp,\n currentMapIndex + 1, defaultValue);\n\n if (iteratedTooFar) {\n break;\n }\n\n if (!valueApplied && isValueAllowedToBeApplied(mode, isTargetPropMatched)) {\n const useDefault = isTargetPropMatched && !valueIsDefined;\n const valueToApply = useDefault ? defaultValue : value;\n const bindingIndexToApply = useDefault ? bindingIndex : null;\n const finalValue = sanitizer ?\n sanitizer(prop, valueToApply, StyleSanitizeMode.ValidateAndSanitize) :\n valueToApply;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndexToApply);\n valueApplied = true;\n }\n\n targetPropValueWasApplied = valueApplied && isTargetPropMatched;\n cursor += LStylingMapIndex.TupleSize;\n }\n setCurrentSyncCursor(currentMapIndex, cursor);\n }\n\n return targetPropValueWasApplied;\n}\n\n\n/**\n * Enables support for map-based styling bindings (e.g. `[style]` and `[class]` bindings).\n */\nexport function activeStylingMapFeature() {\n setStylingMapsSyncFn(syncStylingMap);\n}\n\n/**\n * Used to determine the mode for the inner recursive call.\n *\n * If an inner map is iterated on then this is done so for one\n * of two reasons:\n *\n * - The target property was detected and the inner map\n * must now \"catch up\" (pointer-wise) up to where the current\n * map's cursor is situated.\n *\n * - The target property was not detected in the current map\n * and must be found in an inner map. This can only be allowed\n * if the current map iteration is not set to skip the target\n * property.\n */\nfunction resolveInnerMapMode(\n currentMode: number, valueIsDefined: boolean, isExactMatch: boolean): number {\n let innerMode = currentMode;\n if (!valueIsDefined && isExactMatch && !(currentMode & StylingMapsSyncMode.SkipTargetProp)) {\n // case 1: set the mode to apply the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= StylingMapsSyncMode.ApplyTargetProp;\n innerMode &= ~StylingMapsSyncMode.SkipTargetProp;\n } else {\n // case 2: set the mode to skip the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= StylingMapsSyncMode.SkipTargetProp;\n innerMode &= ~StylingMapsSyncMode.ApplyTargetProp;\n }\n return innerMode;\n}\n\n/**\n * Decides whether or not a prop/value entry will be applied to an element.\n *\n * To determine whether or not a value is to be applied,\n * the following procedure is evaluated:\n *\n * First check to see the current `mode` status:\n * 1. If the mode value permits all props to be applied then allow.\n * - But do not allow if the current prop is set to be skipped.\n * 2. Otherwise if the current prop is permitted then allow.\n */\nfunction isValueAllowedToBeApplied(mode: number, isTargetPropMatched: boolean) {\n let doApplyValue = (mode & StylingMapsSyncMode.ApplyAllValues) > 0;\n if (!doApplyValue) {\n if (mode & StylingMapsSyncMode.ApplyTargetProp) {\n doApplyValue = isTargetPropMatched;\n }\n } else if ((mode & StylingMapsSyncMode.SkipTargetProp) && isTargetPropMatched) {\n doApplyValue = false;\n }\n return doApplyValue;\n}\n\n/**\n * Used to keep track of concurrent cursor values for multiple map-based styling bindings present on\n * an element.\n */\nconst MAP_CURSORS: number[] = [];\n\n/**\n * Used to reset the state of each cursor value being used to iterate over map-based styling\n * bindings.\n */\nfunction resetSyncCursors() {\n for (let i = 0; i < MAP_CURSORS.length; i++) {\n MAP_CURSORS[i] = LStylingMapIndex.ValuesStartPosition;\n }\n}\n\n/**\n * Returns an active cursor value at a given mapIndex location.\n */\nfunction getCurrentSyncCursor(mapIndex: number) {\n if (mapIndex >= MAP_CURSORS.length) {\n MAP_CURSORS.push(LStylingMapIndex.ValuesStartPosition);\n }\n return MAP_CURSORS[mapIndex];\n}\n\n/**\n * Sets a cursor value at a given mapIndex location.\n */\nfunction setCurrentSyncCursor(mapIndex: number, indexValue: number) {\n MAP_CURSORS[mapIndex] = indexValue;\n}\n\n/**\n * Used to convert a {key:value} map into a `LStylingMap` array.\n *\n * This function will either generate a new `LStylingMap` instance\n * or it will patch the provided `newValues` map value into an\n * existing `LStylingMap` value (this only happens if `bindingValue`\n * is an instance of `LStylingMap`).\n *\n * If a new key/value map is provided with an old `LStylingMap`\n * value then all properties will be overwritten with their new\n * values or with `null`. This means that the array will never\n * shrink in size (but it will also not be created and thrown\n * away whenever the {key:value} map entries change).\n */\nexport function normalizeIntoStylingMap(\n bindingValue: null | LStylingMap,\n newValues: {[key: string]: any} | string | null | undefined): LStylingMap {\n const lStylingMap: LStylingMap = Array.isArray(bindingValue) ? bindingValue : [null];\n lStylingMap[LStylingMapIndex.RawValuePosition] = newValues || null;\n\n // because the new values may not include all the properties\n // that the old ones had, all values are set to `null` before\n // the new values are applied. This way, when flushed, the\n // styling algorithm knows exactly what style/class values\n // to remove from the element (since they are `null`).\n for (let j = LStylingMapIndex.ValuesStartPosition; j < lStylingMap.length;\n j += LStylingMapIndex.TupleSize) {\n setMapValue(lStylingMap, j, null);\n }\n\n let props: string[]|null = null;\n let map: {[key: string]: any}|undefined|null;\n let allValuesTrue = false;\n if (typeof newValues === 'string') { // [class] bindings allow string values\n if (newValues.length) {\n props = newValues.split(/\\s+/);\n allValuesTrue = true;\n }\n } else {\n props = newValues ? Object.keys(newValues) : null;\n map = newValues;\n }\n\n if (props) {\n outer: for (let i = 0; i < props.length; i++) {\n const prop = props[i] as string;\n const value = allValuesTrue ? true : map ![prop];\n for (let j = LStylingMapIndex.ValuesStartPosition; j < lStylingMap.length;\n j += LStylingMapIndex.TupleSize) {\n const propAtIndex = getMapProp(lStylingMap, j);\n if (prop <= propAtIndex) {\n if (propAtIndex === prop) {\n setMapValue(lStylingMap, j, value);\n } else {\n lStylingMap.splice(j, 0, prop, value);\n }\n continue outer;\n }\n }\n lStylingMap.push(prop, value);\n }\n }\n\n return lStylingMap;\n}\n\nexport function getMapProp(map: LStylingMap, index: number): string {\n return map[index + LStylingMapIndex.PropOffset] as string;\n}\n\nexport function setMapValue(map: LStylingMap, index: number, value: string | null): void {\n map[index + LStylingMapIndex.ValueOffset] = value;\n}\n\nexport function getMapValue(map: LStylingMap, index: number): string|null {\n return map[index + LStylingMapIndex.ValueOffset] as string | null;\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {RElement} from '../interfaces/renderer';\nimport {LView, SANITIZER} from '../interfaces/view';\nimport {attachDebugObject} from '../util/debug_utils';\n\nimport {applyStyling} from './bindings';\nimport {ApplyStylingFn, LStylingData, TStylingContext, TStylingContextIndex} from './interfaces';\nimport {activeStylingMapFeature} from './map_based_bindings';\nimport {getCurrentStyleSanitizer} from './state';\nimport {getCurrentOrLViewSanitizer, getDefaultValue, getGuardMask, getProp, getValuesCount, isContextLocked, isMapBased, isSanitizationRequired} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core debug functionality for styling in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n\n/**\n * A debug/testing-oriented summary of a styling entry.\n *\n * A value such as this is generated as an artifact of the `DebugStyling`\n * summary.\n */\nexport interface LStylingSummary {\n /** The style/class property that the summary is attached to */\n prop: string;\n\n /** The last applied value for the style/class property */\n value: string|boolean|null;\n\n /** The binding index of the last applied style/class property */\n bindingIndex: number|null;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries for a `DebugNode` instance.\n */\nexport interface DebugStyling {\n /** The associated TStylingContext instance */\n context: TStylingContext;\n\n /**\n * A summarization of each style/class property\n * present in the context.\n */\n summary: {[key: string]: LStylingSummary};\n\n /**\n * A key/value map of all styling properties and their\n * runtime values.\n */\n values: {[key: string]: string | number | null | boolean};\n\n /**\n * Overrides the sanitizer used to process styles.\n */\n overrideSanitizer(sanitizer: StyleSanitizeFn|null): void;\n}\n\n/**\n * A debug/testing-oriented summary of all styling entries within a `TStylingContext`.\n */\nexport interface TStylingTupleSummary {\n /** The property (style or class property) that this tuple represents */\n prop: string;\n\n /** The total amount of styling entries apart of this tuple */\n valuesCount: number;\n\n /**\n * The bit guard mask that is used to compare and protect against\n * styling changes when and styling bindings update\n */\n guardMask: number;\n\n /**\n * Whether or not the entry requires sanitization\n */\n sanitizationRequired: boolean;\n\n /**\n * The default value that will be applied if any bindings are falsy.\n */\n defaultValue: string|boolean|null;\n\n /**\n * All bindingIndex sources that have been registered for this style.\n */\n sources: (number|null|string)[];\n}\n\n/**\n * Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.\n */\nexport function attachStylingDebugObject(context: TStylingContext) {\n const debug = new TStylingContextDebug(context);\n attachDebugObject(context, debug);\n return debug;\n}\n\n/**\n * A human-readable debug summary of the styling data present within `TStylingContext`.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nclass TStylingContextDebug {\n constructor(public readonly context: TStylingContext) {}\n\n get isLocked() { return isContextLocked(this.context); }\n\n /**\n * Returns a detailed summary of each styling entry in the context.\n *\n * See `TStylingTupleSummary`.\n */\n get entries(): {[prop: string]: TStylingTupleSummary} {\n const context = this.context;\n const entries: {[prop: string]: TStylingTupleSummary} = {};\n const start = TStylingContextIndex.MapBindingsPosition;\n let i = start;\n while (i < context.length) {\n const valuesCount = getValuesCount(context, i);\n // the context may contain placeholder values which are populated ahead of time,\n // but contain no actual binding values. In this situation there is no point in\n // classifying this as an \"entry\" since no real data is stored here yet.\n if (valuesCount) {\n const prop = getProp(context, i);\n const guardMask = getGuardMask(context, i);\n const defaultValue = getDefaultValue(context, i);\n const sanitizationRequired = isSanitizationRequired(context, i);\n const bindingsStartPosition = i + TStylingContextIndex.BindingsStartOffset;\n\n const sources: (number | string | null)[] = [];\n for (let j = 0; j < valuesCount; j++) {\n sources.push(context[bindingsStartPosition + j] as number | string | null);\n }\n\n entries[prop] = {prop, guardMask, sanitizationRequired, valuesCount, defaultValue, sources};\n }\n\n i += TStylingContextIndex.BindingsStartOffset + valuesCount;\n }\n return entries;\n }\n}\n\n/**\n * A human-readable debug summary of the styling data present for a `DebugNode` instance.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\nexport class NodeStylingDebug implements DebugStyling {\n private _sanitizer: StyleSanitizeFn|null = null;\n\n constructor(\n public context: TStylingContext, private _data: LStylingData,\n private _isClassBased?: boolean) {}\n\n /**\n * Overrides the sanitizer used to process styles.\n */\n overrideSanitizer(sanitizer: StyleSanitizeFn|null) { this._sanitizer = sanitizer; }\n\n /**\n * Returns a detailed summary of each styling entry in the context and\n * what their runtime representation is.\n *\n * See `LStylingSummary`.\n */\n get summary(): {[key: string]: LStylingSummary} {\n const entries: {[key: string]: LStylingSummary} = {};\n this._mapValues((prop: string, value: any, bindingIndex: number | null) => {\n entries[prop] = {prop, value, bindingIndex};\n });\n return entries;\n }\n\n /**\n * Returns a key/value map of all the styles/classes that were last applied to the element.\n */\n get values(): {[key: string]: any} {\n const entries: {[key: string]: any} = {};\n this._mapValues((prop: string, value: any) => { entries[prop] = value; });\n return entries;\n }\n\n private _mapValues(fn: (prop: string, value: any, bindingIndex: number|null) => any) {\n // there is no need to store/track an element instance. The\n // element is only used when the styling algorithm attempts to\n // style the value (and we mock out the stylingApplyFn anyway).\n const mockElement = {} as any;\n const hasMaps = getValuesCount(this.context, TStylingContextIndex.MapBindingsPosition) > 0;\n if (hasMaps) {\n activeStylingMapFeature();\n }\n\n const mapFn: ApplyStylingFn =\n (renderer: any, element: RElement, prop: string, value: any, bindingIndex: number) => {\n fn(prop, value, bindingIndex || null);\n };\n\n const sanitizer = this._isClassBased ? null : (this._sanitizer ||\n getCurrentOrLViewSanitizer(this._data as LView));\n applyStyling(this.context, null, mockElement, this._data, true, mapFn, sanitizer);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentTemplate} from '..';\nimport {SchemaMetadata} from '../../core';\nimport {assertDefined} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../interfaces/container';\nimport {DirectiveDefList, PipeDefList, ViewQueriesFunction} from '../interfaces/definition';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, TIcu} from '../interfaces/i18n';\nimport {TElementNode, TNode, TViewNode} from '../interfaces/node';\nimport {LQueries} from '../interfaces/query';\nimport {RComment, RElement} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTENT_QUERIES, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, T_HOST} from '../interfaces/view';\nimport {runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {DebugStyling as DebugNewStyling, NodeStylingDebug} from '../styling_next/styling_debug';\nimport {attachDebugObject} from '../util/debug_utils';\nimport {getTNode, isStylingContext, unwrapRNode} from '../util/view_utils';\n\n\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n\n\nexport const LViewArray = ngDevMode && createNamedArrayType('LView');\nlet LVIEW_EMPTY: unknown[]; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nexport function cloneToLView(list: any[]): LView {\n if (LVIEW_EMPTY === undefined) LVIEW_EMPTY = new LViewArray !();\n return LVIEW_EMPTY.concat(list) as any;\n}\n\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up in\n * debug tools in ngDevMode.\n */\nexport const TViewConstructor = class TView implements ITView {\n constructor(\n public id: number, //\n public blueprint: LView, //\n public template: ComponentTemplate<{}>|null, //\n public viewQuery: ViewQueriesFunction<{}>|null, //\n public node: TViewNode|TElementNode|null, //\n public data: TData, //\n public bindingStartIndex: number, //\n public viewQueryStartIndex: number, //\n public expandoStartIndex: number, //\n public expandoInstructions: ExpandoInstructions|null, //\n public firstTemplatePass: boolean, //\n public staticViewQueries: boolean, //\n public staticContentQueries: boolean, //\n public preOrderHooks: HookData|null, //\n public preOrderCheckHooks: HookData|null, //\n public contentHooks: HookData|null, //\n public contentCheckHooks: HookData|null, //\n public viewHooks: HookData|null, //\n public viewCheckHooks: HookData|null, //\n public destroyHooks: HookData|null, //\n public cleanup: any[]|null, //\n public contentQueries: number[]|null, //\n public components: number[]|null, //\n public directiveRegistry: DirectiveDefList|null, //\n public pipeRegistry: PipeDefList|null, //\n public firstChild: TNode|null, //\n public schemas: SchemaMetadata[]|null, //\n ) {}\n};\n\nconst TViewData = ngDevMode && createNamedArrayType('TViewData');\nlet TVIEWDATA_EMPTY:\n unknown[]; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nexport function cloneToTViewData(list: any[]): TData {\n if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData !();\n return TVIEWDATA_EMPTY.concat(list) as any;\n}\n\nexport const LViewBlueprint = ngDevMode && createNamedArrayType('LViewBlueprint');\nexport const MatchesArray = ngDevMode && createNamedArrayType('MatchesArray');\nexport const TViewComponents = ngDevMode && createNamedArrayType('TViewComponents');\nexport const TNodeLocalNames = ngDevMode && createNamedArrayType('TNodeLocalNames');\nexport const TNodeInitialInputs = ngDevMode && createNamedArrayType('TNodeInitialInputs');\nexport const TNodeInitialData = ngDevMode && createNamedArrayType('TNodeInitialData');\nexport const LCleanup = ngDevMode && createNamedArrayType('LCleanup');\nexport const TCleanup = ngDevMode && createNamedArrayType('TCleanup');\n\n\n\nexport function attachLViewDebug(lView: LView) {\n attachDebugObject(lView, new LViewDebug(lView));\n}\n\nexport function attachLContainerDebug(lContainer: LContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nexport function toDebug(obj: LView): LViewDebug;\nexport function toDebug(obj: LView | null): LViewDebug|null;\nexport function toDebug(obj: LView | LContainer | null): LViewDebug|LContainerDebug|null;\nexport function toDebug(obj: any): any {\n if (obj) {\n const debug = (obj as any).debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n } else {\n return obj;\n }\n}\n\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element itself\n * (will not serialize child elements).\n */\nfunction toHtml(value: any, includeChildren: boolean = false): string|null {\n const node: HTMLElement|null = unwrapRNode(value) as any;\n if (node) {\n const isTextNode = node.nodeType === Node.TEXT_NODE;\n const outerHTML = (isTextNode ? node.textContent : node.outerHTML) || '';\n if (includeChildren || isTextNode) {\n return outerHTML;\n } else {\n const innerHTML = node.innerHTML;\n return outerHTML.split(innerHTML)[0] || null;\n }\n } else {\n return null;\n }\n}\n\nexport class LViewDebug {\n constructor(private readonly _raw_lView: LView) {}\n\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get flags() {\n const flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & LViewFlags.InitPhaseStateMask,\n creationMode: !!(flags & LViewFlags.CreationMode),\n firstViewPass: !!(flags & LViewFlags.FirstLViewPass),\n checkAlways: !!(flags & LViewFlags.CheckAlways),\n dirty: !!(flags & LViewFlags.Dirty),\n attached: !!(flags & LViewFlags.Attached),\n destroyed: !!(flags & LViewFlags.Destroyed),\n isRoot: !!(flags & LViewFlags.IsRoot),\n indexWithinInitPhase: flags >> LViewFlags.IndexWithinInitPhaseShift,\n };\n }\n get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lView[PARENT]); }\n get host(): string|null { return toHtml(this._raw_lView[HOST], true); }\n get context(): {}|null { return this._raw_lView[CONTEXT]; }\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into a\n * tree structure with relevant details pulled out for readability.\n */\n get nodes(): DebugNode[]|null {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }\n /**\n * Additional information which is hidden behind a property. The extra level of indirection is\n * done so that the debug view would not be cluttered with properties which are only rarely\n * relevant to the developer.\n */\n get __other__() {\n return {\n tView: this._raw_lView[TVIEW],\n cleanup: this._raw_lView[CLEANUP],\n injector: this._raw_lView[INJECTOR],\n rendererFactory: this._raw_lView[RENDERER_FACTORY],\n renderer: this._raw_lView[RENDERER],\n sanitizer: this._raw_lView[SANITIZER],\n childHead: toDebug(this._raw_lView[CHILD_HEAD]),\n next: toDebug(this._raw_lView[NEXT]),\n childTail: toDebug(this._raw_lView[CHILD_TAIL]),\n declarationView: toDebug(this._raw_lView[DECLARATION_VIEW]),\n contentQueries: this._raw_lView[CONTENT_QUERIES],\n queries: this._raw_lView[QUERIES],\n tHost: this._raw_lView[T_HOST],\n bindingIndex: this._raw_lView[BINDING_INDEX],\n };\n }\n\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get childViews(): Array<LViewDebug|LContainerDebug> {\n const childViews: Array<LViewDebug|LContainerDebug> = [];\n let child = this.__other__.childHead;\n while (child) {\n childViews.push(child);\n child = child.__other__.next;\n }\n return childViews;\n }\n}\n\nexport interface DebugNode {\n html: string|null;\n native: Node;\n styles: DebugNewStyling|null;\n classes: DebugNewStyling|null;\n nodes: DebugNode[]|null;\n component: LViewDebug|null;\n}\n\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nexport function toDebugNodes(tNode: TNode | null, lView: LView): DebugNode[]|null {\n if (tNode) {\n const debugNodes: DebugNode[] = [];\n let tNodeCursor: TNode|null = tNode;\n while (tNodeCursor) {\n const rawValue = lView[tNode.index];\n const native = unwrapRNode(rawValue);\n const componentLViewDebug =\n isStylingContext(rawValue) ? null : toDebug(readLViewValue(rawValue));\n\n let styles: DebugNewStyling|null = null;\n let classes: DebugNewStyling|null = null;\n if (runtimeIsNewStylingInUse()) {\n styles = tNode.newStyles ? new NodeStylingDebug(tNode.newStyles, lView, false) : null;\n classes = tNode.newClasses ? new NodeStylingDebug(tNode.newClasses, lView, true) : null;\n }\n\n debugNodes.push({\n html: toHtml(native),\n native: native as any, styles, classes,\n nodes: toDebugNodes(tNode.child, lView),\n component: componentLViewDebug,\n });\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n } else {\n return null;\n }\n}\n\nexport class LContainerDebug {\n constructor(private readonly _raw_lContainer: LContainer) {}\n\n get activeIndex(): number { return this._raw_lContainer[ACTIVE_INDEX]; }\n get views(): LViewDebug[] {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug as(l: LView) => LViewDebug);\n }\n get parent(): LViewDebug|LContainerDebug|null { return toDebug(this._raw_lContainer[PARENT]); }\n get queries(): LQueries|null { return this._raw_lContainer[QUERIES]; }\n get host(): RElement|RComment|StylingContext|LView { return this._raw_lContainer[HOST]; }\n get native(): RComment { return this._raw_lContainer[NATIVE]; }\n get __other__() {\n return {\n next: toDebug(this._raw_lContainer[NEXT]),\n };\n }\n}\n\n/**\n * Return an `LView` value if found.\n *\n * @param value `LView` if any\n */\nexport function readLViewValue(value: any): LView|null {\n while (Array.isArray(value)) {\n // This check is not quite right, as it does not take into account `StylingContext`\n // This is why it is in debug, not in util.ts\n if (value.length >= HEADER_OFFSET - 1) return value as LView;\n value = value[HOST];\n }\n return null;\n}\n\nexport class I18NDebugItem {\n [key: string]: any;\n\n get tNode() { return getTNode(this.nodeIndex, this._lView); }\n\n constructor(\n public __raw_opCode: any, private _lView: LView, public nodeIndex: number,\n public type: string) {}\n}\n\n/**\n * Turns a list of \"Create\" & \"Update\" OpCodes into a human-readable list of operations for\n * debugging purposes.\n * @param mutateOpCodes mutation opCodes to read\n * @param updateOpCodes update opCodes to read\n * @param icus list of ICU expressions\n * @param lView The view the opCodes are acting on\n */\nexport function attachI18nOpCodesDebug(\n mutateOpCodes: I18nMutateOpCodes, updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null,\n lView: LView) {\n attachDebugObject(mutateOpCodes, new I18nMutateOpCodesDebug(mutateOpCodes, lView));\n attachDebugObject(updateOpCodes, new I18nUpdateOpCodesDebug(updateOpCodes, icus, lView));\n\n if (icus) {\n icus.forEach(icu => {\n icu.create.forEach(\n icuCase => { attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView)); });\n icu.update.forEach(icuCase => {\n attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));\n });\n });\n }\n}\n\nexport class I18nMutateOpCodesDebug implements I18nOpCodesDebug {\n constructor(private readonly __raw_opCodes: I18nMutateOpCodes, private readonly __lView: LView) {}\n\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get operations() {\n const {__lView, __raw_opCodes} = this;\n const results: any[] = [];\n\n for (let i = 0; i < __raw_opCodes.length; i++) {\n const opCode = __raw_opCodes[i];\n let result: any;\n if (typeof opCode === 'string') {\n result = {\n __raw_opCode: opCode,\n type: 'Create Text Node',\n nodeIndex: __raw_opCodes[++i],\n text: opCode,\n };\n }\n\n if (typeof opCode === 'number') {\n switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.AppendChild:\n const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n result = new I18NDebugItem(opCode, __lView, destinationNodeIndex, 'AppendChild');\n break;\n case I18nMutateOpCode.Select:\n const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'Select');\n break;\n case I18nMutateOpCode.ElementEnd:\n let elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'ElementEnd');\n break;\n case I18nMutateOpCode.Attr:\n elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'Attr');\n result['attrName'] = __raw_opCodes[++i];\n result['attrValue'] = __raw_opCodes[++i];\n break;\n }\n }\n\n if (!result) {\n switch (opCode) {\n case COMMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'COMMENT_MARKER',\n commentValue: __raw_opCodes[++i],\n nodeIndex: __raw_opCodes[++i],\n };\n break;\n case ELEMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'ELEMENT_MARKER',\n };\n break;\n }\n }\n\n if (!result) {\n result = {\n __raw_opCode: opCode,\n type: 'Unknown Op Code',\n code: opCode,\n };\n }\n\n results.push(result);\n }\n\n return results;\n }\n}\n\nexport class I18nUpdateOpCodesDebug implements I18nOpCodesDebug {\n constructor(\n private readonly __raw_opCodes: I18nUpdateOpCodes, private readonly icus: TIcu[]|null,\n private readonly __lView: LView) {}\n\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get operations() {\n const {__lView, __raw_opCodes, icus} = this;\n const results: any[] = [];\n\n for (let i = 0; i < __raw_opCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = __raw_opCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = __raw_opCodes[++i] as number;\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = __raw_opCodes[j];\n if (typeof opCode === 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n // We cannot know the value of the binding so we only show the index\n value += `�${-opCode - 1}�`;\n } else {\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n let tIcuIndex: number;\n let tIcu: TIcu;\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const attrName = __raw_opCodes[++j] as string;\n const sanitizeFn = __raw_opCodes[++j];\n results.push({\n __raw_opCode: opCode,\n checkBit,\n type: 'Attr',\n attrValue: value, attrName, sanitizeFn,\n });\n break;\n case I18nUpdateOpCode.Text:\n results.push({\n __raw_opCode: opCode,\n checkBit,\n type: 'Text', nodeIndex,\n text: value,\n });\n break;\n case I18nUpdateOpCode.IcuSwitch:\n tIcuIndex = __raw_opCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n let result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuSwitch');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['mainBinding'] = value;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n tIcuIndex = __raw_opCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuUpdate');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n }\n }\n }\n }\n i += skipCodes;\n }\n return results;\n }\n}\n\nexport interface I18nOpCodesDebug { operations: any[]; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertGreaterThan, assertLessThan} from '../../util/assert';\nimport {executePreOrderHooks} from '../hooks';\nimport {HEADER_OFFSET, LView, TVIEW} from '../interfaces/view';\nimport {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state';\n\n\n/**\n * Selects an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * element(0, 'div');\n * }\n * if (rf & 2) {\n * select(0); // Select the <div/> created above.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param index the index of the item to act on with the following instructions\n *\n * @codeGenApi\n */\nexport function ɵɵselect(index: number): void {\n ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n ngDevMode &&\n assertLessThan(\n index, getLView().length - HEADER_OFFSET, 'Should be within range for the view data');\n const lView = getLView();\n selectInternal(lView, index);\n}\n\n\nexport function selectInternal(lView: LView, index: number) {\n // Flush the initial hooks for elements in the view that have been added up to this point.\n executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), index);\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵselect` instruction.\n setSelectedIndex(index);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Injector} from '../../di';\nimport {ErrorHandler} from '../../error_handler';\nimport {Type} from '../../interface/type';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/security';\nimport {assertDataInRange, assertDefined, assertDomNode, assertEqual, assertLessThan, assertNotEqual, assertNotSame} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {assertLView, assertPreviousIsParent} from '../assert';\nimport {attachPatchData, getComponentViewByInstance} from '../context_discovery';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeHooks, executePreOrderHooks, registerPreOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {INJECTOR_BLOOM_PARENT_SIZE, NodeInjectorFactory} from '../interfaces/injector';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliasValue, PropertyAliases, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeProviderIndexes, TNodeType, TProjectionNode, TViewNode} from '../interfaces/node';\nimport {LQueries} from '../interfaces/query';\nimport {RComment, RElement, RText, Renderer3, RendererFactory3, isProceduralRenderer} from '../interfaces/renderer';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';\nimport {isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, getSelectedIndex, incrementActiveDirectiveId, isCreationMode, leaveView, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ɵɵnamespaceHTML} from '../state';\nimport {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings';\nimport {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util';\nimport {NO_CHANGE} from '../tokens';\nimport {attrsStylingIndexOf} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER, renderStringify, stringifyForError} from '../util/misc_utils';\nimport {getLViewParent, getRootContext} from '../util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByIndex, getNativeByTNode, getTNode, isComponent, isComponentDef, isContentQueryHost, isLContainer, isRootView, readPatchedLView, resetPreOrderHookFlags, unwrapRNode, viewAttachedToChangeDetector} from '../util/view_utils';\nimport {LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeInitialData, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor, attachLContainerDebug, attachLViewDebug, cloneToLView, cloneToTViewData} from './lview_debug';\nimport {selectInternal} from './select';\n\n\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\n\nexport const enum BindingDirection {\n Input,\n Output,\n}\n\n/**\n * Refreshes the view, executing the following steps in that order:\n * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host\n * bindings, refreshes child components.\n * Note: view hooks are triggered later when leaving the view.\n */\nexport function refreshDescendantViews(lView: LView) {\n const tView = lView[TVIEW];\n const creationMode = isCreationMode(lView);\n\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = false;\n\n // Resetting the bindingIndex of the current LView as the next steps may trigger change detection.\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n\n // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.\n // This will be done in the update pass.\n if (!creationMode) {\n const checkNoChangesMode = getCheckNoChangesMode();\n\n executePreOrderHooks(lView, tView, checkNoChangesMode, undefined);\n\n refreshDynamicEmbeddedViews(lView);\n\n // Content query results must be refreshed before content hooks are called.\n refreshContentQueries(tView, lView);\n\n resetPreOrderHookFlags(lView);\n executeHooks(\n lView, tView.contentHooks, tView.contentCheckHooks, checkNoChangesMode,\n InitPhaseState.AfterContentInitHooksToBeRun, undefined);\n\n setHostBindings(tView, lView);\n }\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (creationMode && tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n refreshChildComponents(tView.components);\n}\n\n\n/** Sets the host bindings for the current view. */\nexport function setHostBindings(tView: TView, viewData: LView): void {\n const selectedIndex = getSelectedIndex();\n try {\n if (tView.expandoInstructions) {\n let bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;\n setBindingRoot(bindingRootIndex);\n let currentDirectiveIndex = -1;\n let currentElementIndex = -1;\n for (let i = 0; i < tView.expandoInstructions.length; i++) {\n const instruction = tView.expandoInstructions[i];\n if (typeof instruction === 'number') {\n if (instruction <= 0) {\n // Negative numbers mean that we are starting new EXPANDO block and need to update\n // the current element and directive index.\n currentElementIndex = -instruction;\n setActiveHostElement(currentElementIndex);\n\n // Injector block and providers are taken into account.\n const providerCount = (tView.expandoInstructions[++i] as number);\n bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;\n\n currentDirectiveIndex = bindingRootIndex;\n } else {\n // This is either the injector size (so the binding root can skip over directives\n // and get to the first set of host bindings on this node) or the host var count\n // (to get to the next set of host bindings on this node).\n bindingRootIndex += instruction;\n }\n setBindingRoot(bindingRootIndex);\n } else {\n // If it's not a number, it's a host binding function that needs to be executed.\n if (instruction !== null) {\n viewData[BINDING_INDEX] = bindingRootIndex;\n const hostCtx = unwrapRNode(viewData[currentDirectiveIndex]);\n instruction(RenderFlags.Update, hostCtx, currentElementIndex);\n\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n }\n currentDirectiveIndex++;\n }\n }\n }\n } finally {\n setActiveHostElement(selectedIndex);\n }\n}\n\n/** Refreshes content queries for all directives in the given view. */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n if (tView.contentQueries != null) {\n setCurrentQueryIndex(0);\n for (let i = 0; i < tView.contentQueries.length; i++) {\n const directiveDefIdx = tView.contentQueries[i];\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n directiveDef.contentQueries !(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n}\n\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(components: number[] | null): void {\n if (components != null) {\n for (let i = 0; i < components.length; i++) {\n componentRefresh(components[i]);\n }\n }\n}\n\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param overriddenRenderer Optional A renderer to override the default one\n * @returns the element created\n */\nexport function elementCreate(name: string, overriddenRenderer?: Renderer3): RElement {\n let native: RElement;\n const rendererToUse = overriddenRenderer || getLView()[RENDERER];\n\n const namespace = getNamespace();\n\n if (isProceduralRenderer(rendererToUse)) {\n native = rendererToUse.createElement(name, namespace);\n } else {\n if (namespace === null) {\n native = rendererToUse.createElement(name);\n } else {\n native = rendererToUse.createElementNS(namespace, name);\n }\n }\n return native;\n}\nexport function createLView<T>(\n parentLView: LView | null, tView: TView, context: T | null, flags: LViewFlags,\n host: RElement | null, tHostNode: TViewNode | TElementNode | null,\n rendererFactory?: RendererFactory3 | null, renderer?: Renderer3 | null,\n sanitizer?: Sanitizer | null, injector?: Injector | null): LView {\n const lView = ngDevMode ? cloneToLView(tView.blueprint) : tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n resetPreOrderHookFlags(lView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]) !;\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]) !;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null !;\n lView[INJECTOR as any] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param tHostNode This is a hack and we should not have to pass this value in. It is only used to\n * determine if the parent belongs to a different tView. Instead we should not have parentTView\n * point to TView other the current one.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Element,\n name: string | null, attrs: TAttributes | null): TElementNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Container,\n name: string | null, attrs: TAttributes | null): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.Projection, name: null,\n attrs: TAttributes | null): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.ElementContainer,\n name: string | null, attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType.IcuContainer, name: null,\n attrs: TAttributes | null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, tHostNode: TNode | null, index: number, type: TNodeType, name: string | null,\n attrs: TAttributes | null): TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&\n TIcuContainerNode {\n // Keep this function short, so that the VM will inline it.\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = tView.data[adjustedIndex] as TNode ||\n createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index);\n setPreviousOrParentTNode(tNode, true);\n return tNode as TElementNode & TViewNode & TContainerNode & TElementContainerNode &\n TProjectionNode & TIcuContainerNode;\n}\n\nfunction createTNodeAtIndex(\n tView: TView, tHostNode: TNode | null, adjustedIndex: number, type: TNodeType,\n name: string | null, attrs: TAttributes | null, index: number) {\n const previousOrParentTNode = getPreviousOrParentTNode();\n const isParent = getIsParent();\n const parent =\n isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places,\n // so it's only set if the view is the same.\n const parentInSameView = parent && parent !== tHostNode;\n const tParentNode = parentInSameView ? parent as TElementNode | TContainerNode : null;\n const tNode = tView.data[adjustedIndex] =\n createTNode(tParentNode, type, adjustedIndex, name, attrs);\n // The first node is not always the one at index 0, in case of i18n, index 0 can be the\n // instruction `i18nStart` and the first node has the index 1 or more\n if (index === 0 || !tView.firstChild) {\n tView.firstChild = tNode;\n }\n // Now link ourselves into the tree.\n if (previousOrParentTNode) {\n if (isParent && previousOrParentTNode.child == null &&\n (tNode.parent !== null || previousOrParentTNode.type === TNodeType.View)) {\n // We are in the same view, which means we are adding content node to the parent view.\n previousOrParentTNode.child = tNode;\n } else if (!isParent) {\n previousOrParentTNode.next = tNode;\n }\n }\n return tNode;\n}\n\nexport function assignTViewNodeToLView(\n tView: TView, tParentNode: TNode | null, index: number, lView: LView): TViewNode {\n // View nodes are not stored in data because they can be added / removed at runtime (which\n // would cause indices to change). Their TNodes are instead stored in tView.node.\n let tNode = tView.node;\n if (tNode == null) {\n ngDevMode && tParentNode &&\n assertNodeOfPossibleTypes(tParentNode, TNodeType.Element, TNodeType.Container);\n tView.node = tNode = createTNode(\n tParentNode as TElementNode | TContainerNode | null, //\n TNodeType.View, index, null, null) as TViewNode;\n }\n\n return lView[T_HOST] = tNode as TViewNode;\n}\n\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future\n * template passes.\n */\nexport function allocExpando(view: LView, numSlotsToAlloc: number) {\n const tView = view[TVIEW];\n if (tView.firstTemplatePass) {\n for (let i = 0; i < numSlotsToAlloc; i++) {\n tView.blueprint.push(null);\n tView.data.push(null);\n view.push(null);\n }\n\n // We should only increment the expando start index if there aren't already directives\n // and injectors saved in the \"expando\" section\n if (!tView.expandoInstructions) {\n tView.expandoStartIndex += numSlotsToAlloc;\n } else {\n // Since we're adding the dynamic nodes into the expando section, we need to let the host\n // bindings know that they should skip x slots\n tView.expandoInstructions.push(numSlotsToAlloc);\n }\n }\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Used for creating the LViewNode of a dynamic embedded view,\n * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().\n * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).\n */\nexport function createEmbeddedViewAndNode<T>(\n tView: TView, context: T, declarationView: LView, queries: LQueries | null,\n injectorIndex: number): LView {\n const _isParent = getIsParent();\n const _previousOrParentTNode = getPreviousOrParentTNode();\n setPreviousOrParentTNode(null !, true);\n\n const lView = createLView(declarationView, tView, context, LViewFlags.CheckAlways, null, null);\n lView[DECLARATION_VIEW] = declarationView;\n\n if (queries) {\n lView[QUERIES] = queries.createView();\n }\n assignTViewNodeToLView(tView, null, -1, lView);\n\n if (tView.firstTemplatePass) {\n tView.node !.injectorIndex = injectorIndex;\n }\n\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n return lView;\n}\n\n/**\n * Used for rendering embedded views (e.g. dynamically created views)\n *\n * Dynamically created views must store/retrieve their TViews differently from component views\n * because their template functions are nested in the template functions of their hosts, creating\n * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor\n * inside\n * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we\n * can't store TViews in the template function itself (as we do for comps). Instead, we store the\n * TView for dynamically created views on their host TNode, which only has one instance.\n */\nexport function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, context: T) {\n const _isParent = getIsParent();\n const _previousOrParentTNode = getPreviousOrParentTNode();\n let oldView: LView;\n if (viewToRender[FLAGS] & LViewFlags.IsRoot) {\n // This is a root view inside the view tree\n tickRootContext(getRootContext(viewToRender));\n } else {\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n setPreviousOrParentTNode(null !, true);\n\n oldView = enterView(viewToRender, viewToRender[T_HOST]);\n resetPreOrderHookFlags(viewToRender);\n executeTemplate(viewToRender, tView.template !, getRenderFlags(viewToRender), context);\n\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstTemplatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n viewToRender[TVIEW].firstTemplatePass = false;\n\n refreshDescendantViews(viewToRender);\n safeToRunHooks = true;\n } finally {\n leaveView(oldView !, safeToRunHooks);\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n }\n }\n}\n\nexport function renderComponentOrTemplate<T>(\n hostView: LView, context: T, templateFn?: ComponentTemplate<T>) {\n const rendererFactory = hostView[RENDERER_FACTORY];\n const oldView = enterView(hostView, hostView[T_HOST]);\n const normalExecutionPath = !getCheckNoChangesMode();\n const creationModeIsActive = isCreationMode(hostView);\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n\n if (creationModeIsActive) {\n // creation mode pass\n templateFn && executeTemplate(hostView, templateFn, RenderFlags.Create, context);\n\n refreshDescendantViews(hostView);\n hostView[FLAGS] &= ~LViewFlags.CreationMode;\n }\n\n // update mode pass\n resetPreOrderHookFlags(hostView);\n templateFn && executeTemplate(hostView, templateFn, RenderFlags.Update, context);\n refreshDescendantViews(hostView);\n safeToRunHooks = true;\n } finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView, safeToRunHooks);\n }\n}\n\nfunction executeTemplate<T>(\n lView: LView, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n ɵɵnamespaceHTML();\n const prevSelectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(null);\n if (rf & RenderFlags.Update) {\n // When we're updating, have an inherent ɵɵselect(0) so we don't have to generate that\n // instruction for most update blocks\n selectInternal(lView, 0);\n }\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n }\n}\n\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. Update block and create block are\n * always run separately.\n */\nfunction getRenderFlags(view: LView): RenderFlags {\n return isCreationMode(view) ? RenderFlags.Create : RenderFlags.Update;\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\n/**\n * Appropriately sets `stylingTemplate` on a TNode\n *\n * Does not apply styles to DOM nodes\n *\n * @param tNode The node whose `stylingTemplate` to set\n * @param attrs The attribute array source to set the attributes from\n * @param attrsStartIndex Optional start index to start processing the `attrs` from\n */\nexport function setNodeStylingTemplate(\n tView: TView, tNode: TNode, attrs: TAttributes, attrsStartIndex: number) {\n if (tView.firstTemplatePass && !tNode.stylingTemplate) {\n const stylingAttrsStartIndex = attrsStylingIndexOf(attrs, attrsStartIndex);\n if (stylingAttrsStartIndex >= 0) {\n tNode.stylingTemplate = initializeStaticStylingContext(attrs, stylingAttrsStartIndex);\n }\n }\n}\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n def.contentQueries(RenderFlags.Create, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n\n\n/**\n * Creates directive instances and populates local refs.\n *\n * @param localRefs Local refs of the node in question\n * @param localRefExtractor mapping function that extracts local ref value from TNode\n */\nexport function createDirectivesAndLocals(\n tView: TView, lView: LView, localRefs: string[] | null | undefined,\n localRefExtractor: LocalRefExtractor = getNativeByTNode) {\n if (!getBindingsEnabled()) return;\n const previousOrParentTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n ngDevMode && ngDevMode.firstTemplatePass++;\n resolveDirectives(\n tView, lView, findDirectiveMatches(tView, lView, previousOrParentTNode),\n previousOrParentTNode, localRefs || null);\n }\n instantiateAllDirectives(tView, lView, previousOrParentTNode);\n invokeDirectivesHostBindings(tView, lView, previousOrParentTNode);\n saveResolvedLocalsInData(lView, previousOrParentTNode, localRefExtractor);\n setActiveHostElement(null);\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(\n viewData: LView, tNode: TNode, localRefExtractor: LocalRefExtractor): void {\n const localNames = tNode.localNames;\n if (localNames) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value = index === -1 ?\n localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateTView(def: ComponentDef<any>): TView {\n return def.tView || (def.tView = createTView(\n -1, def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs,\n def.viewQuery, def.schemas));\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param templateFn Template function\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n */\nexport function createTView(\n viewIndex: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null,\n viewQuery: ViewQueriesFunction<any>| null, schemas: SchemaMetadata[] | null): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + consts;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n return blueprint[TVIEW as any] = ngDevMode ?\n new TViewConstructor(\n viewIndex, // id: number,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n null !, // node: TViewNode|TElementNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // viewQueryStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // expandoInstructions: ExpandoInstructions|null,\n true, // firstTemplatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: HookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ?\n directives() :\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas, // schemas: SchemaMetadata[]|null,\n ) :\n {\n id: viewIndex,\n blueprint: blueprint,\n template: templateFn,\n viewQuery: viewQuery,\n node: null !,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n viewQueryStartIndex: initialViewLength,\n expandoStartIndex: initialViewLength,\n expandoInstructions: null,\n firstTemplatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n };\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = new (ngDevMode ? LViewBlueprint ! : Array)(initialViewLength)\n .fill(null, 0, bindingStartIndex)\n .fill(NO_CHANGE, bindingStartIndex) as LView;\n blueprint[BINDING_INDEX] = bindingStartIndex;\n return blueprint;\n}\n\nexport function createError(text: string, token: any) {\n return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\n\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nexport function locateHostElement(\n factory: RendererFactory3, elementOrSelector: RElement | string): RElement|null {\n const defaultRenderer = factory.createRenderer(null, null);\n const rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n } else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n return rNode;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nexport function storeCleanupWithContext(lView: LView, context: any, cleanupFn: Function): void {\n const lCleanup = getCleanup(lView);\n lCleanup.push(context);\n\n if (lView[TVIEW].firstTemplatePass) {\n getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);\n }\n}\n\n/**\n * Saves the cleanup function itself in LView.cleanupInstances.\n *\n * This is necessary for functions that are wrapped with their contexts, like in renderer2\n * listeners.\n *\n * On the first template pass, the index of the cleanup function is saved in TView.\n */\nexport function storeCleanupFn(view: LView, cleanupFn: Function): void {\n getCleanup(view).push(cleanupFn);\n\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(view[CLEANUP] !.length - 1, null);\n }\n}\n\n// TODO: Remove this when the issue is resolved.\n/**\n * Tsickle has a bug where it creates an infinite loop for a function returning itself.\n * This is a temporary type that will be removed when the issue is resolved.\n * https://github.com/angular/tsickle/issues/1009)\n */\nexport type TsickleIssue1009 = any;\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nexport function createTNode(\n tParent: TElementNode | TContainerNode | null, type: TNodeType, adjustedIndex: number,\n tagName: string | null, attrs: TAttributes | null): TNode {\n ngDevMode && ngDevMode.tNode++;\n return {\n type: type,\n index: adjustedIndex,\n injectorIndex: tParent ? tParent.injectorIndex : -1,\n directiveStart: -1,\n directiveEnd: -1,\n propertyMetadataStartIndex: -1,\n propertyMetadataEndIndex: -1,\n flags: 0,\n providerIndexes: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n stylingTemplate: null,\n projection: null,\n onElementCreationFns: null,\n // TODO (matsko): rename this to `styles` once the old styling impl is gone\n newStyles: null,\n // TODO (matsko): rename this to `classes` once the old styling impl is gone\n newClasses: null,\n };\n}\n\n\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param tNode\n * @param direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nexport function generatePropertyAliases(tNode: TNode, direction: BindingDirection): PropertyAliases|\n null {\n const tView = getLView()[TVIEW];\n let propStore: PropertyAliases|null = null;\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n\n if (end > start) {\n const isInput = direction === BindingDirection.Input;\n const defs = tView.data;\n\n for (let i = start; i < end; i++) {\n const directiveDef = defs[i] as DirectiveDef<any>;\n const propertyAliasMap: {[publicName: string]: string} =\n isInput ? directiveDef.inputs : directiveDef.outputs;\n for (let publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n const internalName = propertyAliasMap[publicName];\n const hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, publicName, internalName) :\n (propStore[publicName] = [i, publicName, internalName]);\n }\n }\n }\n }\n return propStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nconst ATTR_TO_PROP: {[name: string]: string} = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\n\nexport function elementPropertyInternal<T>(\n index: number, propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean,\n loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const lView = getLView();\n const element = getNativeByIndex(index, lView) as RElement | RComment;\n const tNode = getTNode(index, lView);\n let inputData: PropertyAliases|null|undefined;\n let dataValue: PropertyAliasValue|undefined;\n if (!nativeOnly && (inputData = initializeTNodeInputs(tNode)) &&\n (dataValue = inputData[propName])) {\n setInputsForProperty(lView, dataValue, value);\n if (isComponent(tNode)) markDirtyIfOnPush(lView, index + HEADER_OFFSET);\n if (ngDevMode) {\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.Container) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: publicName\n * i+2: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+2]\n */\n for (let i = 0; i < dataValue.length; i += 3) {\n setNgReflectProperty(lView, element, tNode.type, dataValue[i + 2] as string, value);\n }\n }\n }\n } else if (tNode.type === TNodeType.Element) {\n propName = ATTR_TO_PROP[propName] || propName;\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n validateAgainstUnknownProperties(lView, element, propName, tNode);\n ngDevMode.rendererSetProperty++;\n }\n\n savePropertyDebugData(tNode, lView, propName, lView[TVIEW].data, nativeOnly);\n\n const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.tagName || '', propName) as any) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element as RElement, propName, value);\n } else if (!isAnimationProp(propName)) {\n (element as RElement).setProperty ? (element as any).setProperty(propName, value) :\n (element as any)[propName] = value;\n }\n } else if (tNode.type === TNodeType.Container) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(lView, tNode.tagName)) {\n throw createUnknownPropertyError(propName, tNode);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nexport function setNgReflectProperty(\n lView: LView, element: RElement | RComment, type: TNodeType, attrName: string, value: any) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type === TNodeType.Element) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute((element as RElement), attrName) :\n (element as RElement).removeAttribute(attrName);\n } else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute((element as RElement), attrName, debugValue) :\n (element as RElement).setAttribute(attrName, debugValue);\n }\n } else {\n const textContent = `bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`;\n if (isProceduralRenderer(renderer)) {\n renderer.setValue((element as RComment), textContent);\n } else {\n (element as RComment).textContent = textContent;\n }\n }\n}\n\nfunction validateAgainstUnknownProperties(\n hostView: LView, element: RElement | RComment, propName: string, tNode: TNode) {\n // If the tag matches any of the schemas we shouldn't throw.\n if (matchingSchemas(hostView, tNode.tagName)) {\n return;\n }\n\n // If prop is not a known property of the HTML element...\n if (!(propName in element) &&\n // and we are in a browser context... (web worker nodes should be skipped)\n typeof Node === 'function' && element instanceof Node &&\n // and isn't a synthetic animation property...\n propName[0] !== ANIMATION_PROP_PREFIX) {\n // ... it is probably a user error and we should throw.\n throw createUnknownPropertyError(propName, tNode);\n }\n}\n\nfunction matchingSchemas(hostView: LView, tagName: string | null): boolean {\n const schemas = hostView[TVIEW].schemas;\n\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n* Stores debugging data for this property binding on first template pass.\n* This enables features like DebugElement.properties.\n*/\nfunction savePropertyDebugData(\n tNode: TNode, lView: LView, propName: string, tData: TData,\n nativeOnly: boolean | undefined): void {\n const lastBindingIndex = lView[BINDING_INDEX] - 1;\n\n // Bind/interpolation functions save binding metadata in the last binding index,\n // but leave the property name blank. If the interpolation delimiter is at the 0\n // index, we know that this is our first pass and the property name still needs to\n // be set.\n const bindingMetadata = tData[lastBindingIndex] as string;\n if (bindingMetadata[0] == INTERPOLATION_DELIMITER) {\n tData[lastBindingIndex] = propName + bindingMetadata;\n\n // We don't want to store indices for host bindings because they are stored in a\n // different part of LView (the expando section).\n if (!nativeOnly) {\n if (tNode.propertyMetadataStartIndex == -1) {\n tNode.propertyMetadataStartIndex = lastBindingIndex;\n }\n tNode.propertyMetadataEndIndex = lastBindingIndex + 1;\n }\n }\n}\n\n/**\n* Creates an error that should be thrown when encountering an unknown property on an element.\n* @param propName Name of the invalid property.\n* @param tNode Node on which we encountered the error.\n*/\nfunction createUnknownPropertyError(propName: string, tNode: TNode): Error {\n return new Error(\n `Template error: Can't bind to '${propName}' since it isn't a known property of '${tNode.tagName}'.`);\n}\n\n/**\n * Instantiate a root component.\n */\nexport function instantiateRootComponent<T>(\n tView: TView, viewData: LView, def: ComponentDef<T>): T {\n const rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n if (def.providersResolver) def.providersResolver(def);\n generateExpandoInstructionBlock(tView, rootTNode, 1);\n baseResolveDirective(tView, viewData, def, def.factory);\n }\n const directive =\n getNodeInjectable(tView.data, viewData, viewData.length - 1, rootTNode as TElementNode);\n postProcessBaseDirective(viewData, rootTNode, directive);\n return directive;\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(\n tView: TView, viewData: LView, directives: DirectiveDef<any>[] | null, tNode: TNode,\n localRefs: string[] | null): void {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n const exportsMap: ({[key: string]: number} | null) = localRefs ? {'': -1} : null;\n if (directives) {\n initNodeFlags(tNode, tView.data.length, directives.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i] as DirectiveDef<any>;\n if (def.providersResolver) def.providersResolver(def);\n }\n generateExpandoInstructionBlock(tView, tNode, directives.length);\n const initialPreOrderHooksLength = (tView.preOrderHooks && tView.preOrderHooks.length) || 0;\n const initialPreOrderCheckHooksLength =\n (tView.preOrderCheckHooks && tView.preOrderCheckHooks.length) || 0;\n const nodeIndex = tNode.index - HEADER_OFFSET;\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i] as DirectiveDef<any>;\n\n const directiveDefIdx = tView.data.length;\n baseResolveDirective(tView, viewData, def, def.factory);\n\n saveNameToExportMap(tView.data !.length - 1, def, exportsMap);\n\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n registerPreOrderHooks(\n directiveDefIdx, def, tView, nodeIndex, initialPreOrderHooksLength,\n initialPreOrderCheckHooksLength);\n }\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n if (!tView.firstTemplatePass && start < end) {\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n }\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n if (isComponentDef(def)) {\n addComponentLogic(lView, tNode, def as ComponentDef<any>);\n }\n const directive = getNodeInjectable(tView.data, lView !, i, tNode as TElementNode);\n postProcessDirective(lView, directive, def, i);\n }\n}\n\nfunction invokeDirectivesHostBindings(tView: TView, viewData: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const expando = tView.expandoInstructions !;\n const firstTemplatePass = tView.firstTemplatePass;\n const elementIndex = tNode.index - HEADER_OFFSET;\n const selectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(elementIndex);\n\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const directive = viewData[i];\n if (def.hostBindings) {\n invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass);\n\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n } else if (firstTemplatePass) {\n expando.push(null);\n }\n }\n } finally {\n setActiveHostElement(selectedIndex);\n }\n}\n\nexport function invokeHostBindingsInCreationMode(\n def: DirectiveDef<any>, expando: ExpandoInstructions, directive: any, tNode: TNode,\n firstTemplatePass: boolean) {\n const previousExpandoLength = expando.length;\n setCurrentDirectiveDef(def);\n const elementIndex = tNode.index - HEADER_OFFSET;\n def.hostBindings !(RenderFlags.Create, directive, elementIndex);\n setCurrentDirectiveDef(null);\n // `hostBindings` function may or may not contain `allocHostVars` call\n // (e.g. it may not if it only contains host listeners), so we need to check whether\n // `expandoInstructions` has changed and if not - we still push `hostBindings` to\n // expando block, to make sure we execute it for DI cycle\n if (previousExpandoLength === expando.length && firstTemplatePass) {\n expando.push(def.hostBindings);\n }\n}\n\n/**\n* Generates a new block in TView.expandoInstructions for this node.\n*\n* Each expando block starts with the element index (turned negative so we can distinguish\n* it from the hostVar count) and the directive count. See more in VIEW_DATA.md.\n*/\nexport function generateExpandoInstructionBlock(\n tView: TView, tNode: TNode, directiveCount: number): void {\n ngDevMode && assertEqual(\n tView.firstTemplatePass, true,\n 'Expando block should only be generated on first template pass.');\n\n const elementIndex = -(tNode.index - HEADER_OFFSET);\n const providerStartIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const providerCount = tView.data.length - providerStartIndex;\n (tView.expandoInstructions || (tView.expandoInstructions = [\n ])).push(elementIndex, providerCount, directiveCount);\n}\n\n/**\n * Process a directive on the current node after its creation.\n */\nfunction postProcessDirective<T>(\n viewData: LView, directive: T, def: DirectiveDef<T>, directiveDefIdx: number): void {\n const previousOrParentTNode = getPreviousOrParentTNode();\n postProcessBaseDirective(viewData, previousOrParentTNode, directive);\n ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');\n if (previousOrParentTNode && previousOrParentTNode.attrs) {\n setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);\n }\n\n if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {\n previousOrParentTNode.flags |= TNodeFlags.hasContentQuery;\n }\n\n if (isComponentDef(def)) {\n const componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);\n componentView[CONTEXT] = directive;\n }\n}\n\n/**\n * A lighter version of postProcessDirective() that is used for the root component.\n */\nfunction postProcessBaseDirective<T>(\n lView: LView, previousOrParentTNode: TNode, directive: T): void {\n const native = getNativeByTNode(previousOrParentTNode, lView);\n\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent(getIsParent());\n\n attachPatchData(directive, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n}\n\n\n/**\n* Matches the current node against all available selectors.\n* If a component is matched (at most one), it is returned in first position in the array.\n*/\nfunction findDirectiveMatches(tView: TView, viewData: LView, tNode: TNode): DirectiveDef<any>[]|\n null {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n const registry = tView.directiveRegistry;\n let matches: any[]|null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any>| DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors !, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray !() : []);\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode,\n viewData),\n viewData, def.type);\n\n if (isComponentDef(def)) {\n if (tNode.flags & TNodeFlags.isComponent) throwMultipleComponentError(tNode);\n tNode.flags = TNodeFlags.isComponent;\n\n // The component is always stored first with directives after.\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n}\n\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nexport function queueComponentIndexForCheck(previousOrParentTNode: TNode): void {\n const tView = getLView()[TVIEW];\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n (tView.components || (tView.components = ngDevMode ? new TViewComponents !() : [\n ])).push(previousOrParentTNode.index);\n}\n\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode, localRefs: string[] | null, exportsMap: {[key: string]: number}): void {\n if (localRefs) {\n const localNames: (string | number)[] = tNode.localNames =\n ngDevMode ? new TNodeLocalNames !() : [];\n\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null) throw new Error(`Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n\n/**\n* Builds up an export map as directives are created, so local refs can be quickly mapped\n* to their directive instances.\n*/\nfunction saveNameToExportMap(\n index: number, def: DirectiveDef<any>| ComponentDef<any>,\n exportsMap: {[key: string]: number} | null) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = index;\n }\n }\n if ((def as ComponentDef<any>).template) exportsMap[''] = index;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n const flags = tNode.flags;\n ngDevMode && assertEqual(\n flags === 0 || flags === TNodeFlags.isComponent, true,\n 'expected node flags to not be initialized');\n\n ngDevMode && assertNotEqual(\n numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives');\n // When the first directive is created on a node, save the index\n tNode.flags = flags & TNodeFlags.isComponent;\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\nfunction baseResolveDirective<T>(\n tView: TView, viewData: LView, def: DirectiveDef<T>,\n directiveFactory: (t: Type<T>| null) => any) {\n tView.data.push(def);\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint.push(nodeInjectorFactory);\n viewData.push(nodeInjectorFactory);\n}\n\nfunction addComponentLogic<T>(\n lView: LView, previousOrParentTNode: TNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(previousOrParentTNode, lView);\n\n const tView = getOrCreateTView(def);\n\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(\n lView, createLView(\n lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n lView[previousOrParentTNode.index], previousOrParentTNode as TElementNode,\n rendererFactory, rendererFactory.createRenderer(native as RElement, def)));\n\n componentView[T_HOST] = previousOrParentTNode as TElementNode;\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[previousOrParentTNode.index] = componentView;\n\n if (lView[TVIEW].firstTemplatePass) {\n queueComponentIndexForCheck(previousOrParentTNode);\n }\n}\n\nexport function elementAttributeInternal(\n index: number, name: string, value: any, lView: LView, sanitizer?: SanitizerFn | null,\n namespace?: string) {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n ngDevMode && validateAgainstEventAttributes(name);\n const element = getNativeByIndex(index, lView) as RElement;\n const renderer = lView[RENDERER];\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const tNode = getTNode(index, lView);\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.tagName || '', name);\n\n\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n } else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode): void {\n let initialInputData = tNode.initialInputs as InitialInputData | undefined;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, def.inputs, tNode);\n }\n\n const initialInputs: InitialInputs|null = initialInputData[directiveIndex];\n if (initialInputs) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput) {\n def.setInput !(instance, value, publicName, privateName);\n } else {\n (instance as any)[privateName] = value;\n }\n if (ngDevMode) {\n const lView = getLView();\n const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(\n directiveIndex: number, inputs: {[key: string]: string}, tNode: TNode): InitialInputData {\n const initialInputData: InitialInputData =\n tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new TNodeInitialInputs !() : []);\n // Ensure that we don't create sparse arrays\n for (let i = initialInputData.length; i <= directiveIndex; i++) {\n initialInputData.push(null);\n }\n\n const attrs = tNode.attrs !;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number') break;\n\n const minifiedInputName = inputs[attrName as string];\n const attrValue = attrs[i + 1];\n\n if (minifiedInputName !== undefined) {\n const inputsToStore: InitialInputs = initialInputData[directiveIndex] ||\n (initialInputData[directiveIndex] = ngDevMode ? new TNodeInitialData !() : []);\n inputsToStore.push(attrName as string, minifiedInputName, attrValue as string);\n }\n\n i += 2;\n }\n return initialInputData;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray: any = ngDevMode && createNamedArrayType('LContainer');\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement | RComment | StylingContext | LView, currentView: LView, native: RComment,\n tNode: TNode, isForViewContainerRef?: boolean): LContainer {\n ngDevMode && assertDomNode(native);\n ngDevMode && assertLView(currentView);\n // https://jsperf.com/array-literal-vs-new-array-really\n const lContainer: LContainer = new (ngDevMode ? LContainerArray : Array)(\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n isForViewContainerRef ? -1 : 0, // active index\n currentView, // parent\n null, // next\n null, // queries\n tNode, // t_host\n native, // native,\n null, // view refs\n );\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n}\n\n\n/**\n * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them\n * by executing an associated template function.\n */\nfunction refreshDynamicEmbeddedViews(lView: LView) {\n for (let current = lView[CHILD_HEAD]; current !== null; current = current[NEXT]) {\n // Note: current can be an LView or an LContainer instance, but here we are only interested\n // in LContainer. We can tell it's an LContainer because its length is less than the LView\n // header.\n if (current[ACTIVE_INDEX] === -1 && isLContainer(current)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {\n const dynamicViewData = current[i];\n // The directives and pipes are not needed here as an existing view is only being\n // refreshed.\n ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');\n renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT] !);\n }\n }\n }\n}\n\n\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param adjustedElementIndex Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nexport function componentRefresh(adjustedElementIndex: number): void {\n const lView = getLView();\n ngDevMode && assertDataInRange(lView, adjustedElementIndex);\n const hostView = getComponentViewByIndex(adjustedElementIndex, lView);\n ngDevMode && assertNodeType(lView[TVIEW].data[adjustedElementIndex] as TNode, TNodeType.Element);\n\n // Only components in creation mode, attached CheckAlways\n // components or attached, dirty OnPush components should be checked\n if ((viewAttachedToChangeDetector(hostView) || isCreationMode(lView)) &&\n hostView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n syncViewWithBlueprint(hostView);\n checkView(hostView, hostView[CONTEXT]);\n }\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param componentView The view to sync\n */\nfunction syncViewWithBlueprint(componentView: LView) {\n const componentTView = componentView[TVIEW];\n for (let i = componentView.length; i < componentTView.blueprint.length; i++) {\n componentView[i] = componentTView.blueprint[i];\n }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to\n // the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of\n // order, the change detection will run out of order, as the act of retrieving the the\n // LContainer\n // from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL] ![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView): LView|null {\n while (lView) {\n lView[FLAGS] |= LViewFlags.Dirty;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent !;\n }\n return null;\n}\n\n\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nexport function scheduleTick(rootContext: RootContext, flags: RootContextFlags) {\n const nothingScheduled = rootContext.flags === RootContextFlags.Empty;\n rootContext.flags |= flags;\n\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n let res: null|((val: null) => void);\n rootContext.clean = new Promise<null>((r) => res = r);\n rootContext.scheduler(() => {\n if (rootContext.flags & RootContextFlags.DetectChanges) {\n rootContext.flags &= ~RootContextFlags.DetectChanges;\n tickRootContext(rootContext);\n }\n\n if (rootContext.flags & RootContextFlags.FlushPlayers) {\n rootContext.flags &= ~RootContextFlags.FlushPlayers;\n const playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n\n rootContext.clean = _CLEAN_PROMISE;\n res !(null);\n });\n }\n}\n\nexport function tickRootContext(rootContext: RootContext) {\n for (let i = 0; i < rootContext.components.length; i++) {\n const rootComponent = rootContext.components[i];\n renderComponentOrTemplate(readPatchedLView(rootComponent) !, rootComponent);\n }\n}\n\nexport function detectChangesInternal<T>(view: LView, context: T) {\n const rendererFactory = view[RENDERER_FACTORY];\n\n if (rendererFactory.begin) rendererFactory.begin();\n\n try {\n if (isCreationMode(view)) {\n checkView(view, context); // creation mode pass\n }\n checkView(view, context); // update mode pass\n } catch (error) {\n handleError(view, error);\n throw error;\n } finally {\n if (rendererFactory.end) rendererFactory.end();\n }\n}\n\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nexport function detectChangesInRootView(lView: LView): void {\n tickRootContext(lView[CONTEXT] as RootContext);\n}\n\n\n/**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\nexport function checkNoChanges<T>(component: T): void {\n const view = getComponentViewByInstance(component);\n checkNoChangesInternal<T>(view, component);\n}\n\nexport function checkNoChangesInternal<T>(view: LView, context: T) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInternal(view, context);\n } finally {\n setCheckNoChangesMode(false);\n }\n}\n\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nexport function checkNoChangesInRootView(lView: LView): void {\n setCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n } finally {\n setCheckNoChangesMode(false);\n }\n}\n\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.\n */\nexport function checkView<T>(hostView: LView, component: T) {\n const hostTView = hostView[TVIEW];\n const oldView = enterView(hostView, hostView[T_HOST]);\n const templateFn = hostTView.template !;\n const creationMode = isCreationMode(hostView);\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n resetPreOrderHookFlags(hostView);\n creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);\n executeTemplate(hostView, templateFn, getRenderFlags(hostView), component);\n refreshDescendantViews(hostView);\n // Only check view queries again in creation mode if there are static view queries\n if (!creationMode || hostTView.staticViewQueries) {\n executeViewQueryFn(RenderFlags.Update, hostTView, component);\n }\n safeToRunHooks = true;\n } finally {\n leaveView(oldView, safeToRunHooks);\n }\n}\n\nfunction executeViewQueryFn<T>(flags: RenderFlags, tView: TView, component: T): void {\n const viewQuery = tView.viewQuery;\n if (viewQuery) {\n setCurrentQueryIndex(tView.viewQueryStartIndex);\n viewQuery(flags, component);\n }\n}\n\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Creates binding metadata for a particular binding and stores it in\n * TView.data. These are generated in order to support DebugElement.properties.\n *\n * Each binding / interpolation will have one (including attribute bindings)\n * because at the time of binding, we don't know to which instruction the binding\n * belongs. It is always stored in TView.data at the index of the last binding\n * value in LView (e.g. for interpolation8, it would be stored at the index of\n * the 8th value).\n *\n * @param lView The LView that contains the current binding index.\n * @param prefix The static prefix string\n * @param suffix The static suffix string\n *\n * @returns Newly created binding metadata string for this binding or null\n */\nexport function storeBindingMetadata(lView: LView, prefix = '', suffix = ''): string|null {\n const tData = lView[TVIEW].data;\n const lastBindingIndex = lView[BINDING_INDEX] - 1;\n const value = INTERPOLATION_DELIMITER + prefix + INTERPOLATION_DELIMITER + suffix;\n\n return tData[lastBindingIndex] == null ? (tData[lastBindingIndex] = value) : null;\n}\n\nexport const CLEAN_PROMISE = _CLEAN_PROMISE;\n\nexport function initializeTNodeInputs(tNode: TNode): PropertyAliases|null {\n // If tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked.\n if (tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(tNode, BindingDirection.Input);\n }\n return tNode.inputs;\n}\n\nexport function getCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup !() : []);\n}\n\nfunction getTViewCleanup(view: LView): any[] {\n return view[TVIEW].cleanup || (view[TVIEW].cleanup = ngDevMode ? new TCleanup !() : []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(tNode: TNode, lView: LView): Renderer3 {\n const componentLView = lView[tNode.index] as LView;\n return componentLView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(lView: LView, inputs: PropertyAliasValue, value: any): void {\n const tView = lView[TVIEW];\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++] as number;\n const publicName = inputs[i++] as string;\n const privateName = inputs[i++] as string;\n const instance = lView[index];\n ngDevMode && assertDataInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n const setInput = def.setInput;\n if (setInput) {\n def.setInput !(instance, value, publicName, privateName);\n } else {\n instance[privateName] = value;\n }\n }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n ngDevMode && ngDevMode.rendererSetText++;\n const renderer = lView[RENDERER];\n isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {RelativeInjectorLocation} from './interfaces/injector';\nimport {TContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {DECLARATION_VIEW, LView, T_HOST} from './interfaces/view';\nimport {getParentInjectorViewOffset} from './util/injector_utils';\n\nexport function applyOnCreateInstructions(tNode: TNode) {\n // there may be some instructions that need to run in a specific\n // order because the CREATE block in a directive runs before the\n // CREATE block in a template. To work around this instructions\n // can get access to the function array below and defer any code\n // to run after the element is created.\n let fns: Function[]|null;\n if (fns = tNode.onElementCreationFns) {\n for (let i = 0; i < fns.length; i++) {\n fns[i]();\n }\n tNode.onElementCreationFns = null;\n }\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the TNode of the parent injector is found.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @param startTNode The TNode instance of the starting element\n * @returns The TNode of the parent injector\n */\nexport function getParentInjectorTNode(\n location: RelativeInjectorLocation, startView: LView, startTNode: TNode): TElementNode|\n TContainerNode|null {\n if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n // view offset is 0\n const injectorIndex = startTNode.parent.injectorIndex;\n let parentTNode = startTNode.parent;\n while (parentTNode.parent != null && injectorIndex == parentTNode.injectorIndex) {\n parentTNode = parentTNode.parent;\n }\n return parentTNode;\n }\n let viewOffset = getParentInjectorViewOffset(location);\n // view offset is 1\n let parentView = startView;\n let parentTNode = startView[T_HOST] as TElementNode;\n // view offset is superior to 1\n while (viewOffset > 1) {\n parentView = parentView[DECLARATION_VIEW] !;\n parentTNode = parentView[T_HOST] as TElementNode;\n viewOffset--;\n }\n return parentTNode;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {LView, TVIEW, TView} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\n/**\n * Allocates the necessary amount of slots for host vars.\n *\n * @param count Amount of vars to be allocated\n *\n * @codeGenApi\n */\nexport function ɵɵallocHostVars(count: number): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n if (!tView.firstTemplatePass) return;\n queueHostBindingForCheck(tView, getCurrentDirectiveDef() !, count);\n prefillHostVars(tView, lView, count);\n}\n\n/**\n * Stores host binding fn and number of host vars so it will be queued for binding refresh during\n * CD.\n */\nfunction queueHostBindingForCheck(\n tView: TView, def: DirectiveDef<any>| ComponentDef<any>, hostVars: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n const expando = tView.expandoInstructions !;\n const length = expando.length;\n // Check whether a given `hostBindings` function already exists in expandoInstructions,\n // which can happen in case directive definition was extended from base definition (as a part of\n // the `InheritDefinitionFeature` logic). If we found the same `hostBindings` function in the\n // list, we just increase the number of host vars associated with that function, but do not add it\n // into the list again.\n if (length >= 2 && expando[length - 2] === def.hostBindings) {\n expando[length - 1] = (expando[length - 1] as number) + hostVars;\n } else {\n expando.push(def.hostBindings !, hostVars);\n }\n}\n\n/**\n * On the first template pass, we need to reserve space for host binding values\n * after directives are matched (so all directives are saved, then bindings).\n * Because we are updating the blueprint, we only need to do this once.\n */\nfunction prefillHostVars(tView: TView, lView: LView, totalHostVars: number): void {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n for (let i = 0; i < totalHostVars; i++) {\n lView.push(NO_CHANGE);\n tView.blueprint.push(NO_CHANGE);\n tView.data.push(null);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global as _global} from './global';\n\n// When Symbol.iterator doesn't exist, retrieves the key used in es6-shim\ndeclare const Symbol: any;\nlet _symbolIterator: any = null;\nexport function getSymbolIterator(): string|symbol {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n } else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n (Map as any).prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getSymbolIterator} from './symbol';\n\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {areIterablesEqual, isListLikeIterable} from './iterable';\n\n\n// JS has NaN !== NaN\nexport function looseIdentical(a: any, b: any): boolean {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return looseIdentical(a, b);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../util/comparison';\nimport {getSymbolIterator} from '../util/symbol';\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return looseIdentical(a, b);\n }\n }\n}\n\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n */\nexport class WrappedValue {\n /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */\n wrapped: any;\n\n constructor(value: any) { this.wrapped = value; }\n\n /** Creates a wrapped value. */\n static wrap(value: any): WrappedValue { return new WrappedValue(value); }\n\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n static unwrap(value: any): any { return WrappedValue.isWrapped(value) ? value.wrapped : value; }\n\n /** Returns true if `value` is a wrapped value. */\n static isWrapped(value: any): value is WrappedValue { return value instanceof WrappedValue; }\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {devModeEqual} from '../change_detection/change_detection_util';\nimport {assertDataInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {getCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {isDifferent} from './util/misc_utils';\n\n\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return lView[bindingIndex] = value;\n}\n\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertDataInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/** Updates binding if changed, then returns whether it was updated. */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n\n const oldValue = lView[bindingIndex];\n if (isDifferent(oldValue, value)) {\n if (ngDevMode && getCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, oldValueToCompare, value);\n }\n }\n lView[bindingIndex] = value;\n return true;\n }\n\n return false;\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertNotEqual} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {BINDING_INDEX, LView} from '../interfaces/view';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer, storeBindingMetadata} from './shared';\n\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn | null,\n nativeOnly?: boolean): TsickleIssue1009 {\n const index = getSelectedIndex();\n ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');\n const lView = getLView();\n const bindReconciledValue = bind(lView, value);\n if (bindReconciledValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);\n }\n return ɵɵproperty;\n}\n\n/**\n * Creates a single value binding.\n *\n * @param lView Current view\n * @param value Value to diff\n */\nexport function bind<T>(lView: LView, value: T): T|NO_CHANGE {\n const bindingIndex = lView[BINDING_INDEX]++;\n storeBindingMetadata(lView);\n return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;\n}\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n *\n * @codeGenApi\n */\nexport function ɵɵupdateSyntheticHostBinding<T>(\n propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean) {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(benlesh): remove bind call here.\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bound, sanitizer, nativeOnly, loadComponentRenderer);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {bind} from './property';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string, value: any, sanitizer?: SanitizerFn | null,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);\n }\n return ɵɵattribute;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {BINDING_INDEX, TVIEW} from '../interfaces/view';\nimport {getLView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\n\nimport {storeBindingMetadata} from './shared';\n\n\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolationV(values: any[]): string|NO_CHANGE {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n const lView = getLView();\n const tData = lView[TVIEW].data;\n let bindingIndex = lView[BINDING_INDEX];\n\n if (tData[bindingIndex] == null) {\n // 2 is the index of the first static interstitial value (ie. not prefix)\n for (let i = 2; i < values.length; i += 2) {\n tData[bindingIndex++] = values[i];\n }\n bindingIndex = lView[BINDING_INDEX];\n }\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n lView[BINDING_INDEX] = bindingIndex;\n storeBindingMetadata(lView, values[0], values[values.length - 1]);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);\n storeBindingMetadata(lView, prefix, suffix);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n lView[BINDING_INDEX] += 2;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n lView[TVIEW].data[bindingIndex] = i0;\n }\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string|\n NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n lView[BINDING_INDEX] += 3;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n lView[BINDING_INDEX] += 4;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n lView[BINDING_INDEX] += 5;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n lView[BINDING_INDEX] += 6;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|\n NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n lView[BINDING_INDEX] += 7;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n *\n * @codeGenApi\n */\nexport function ɵɵinterpolation8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): string|NO_CHANGE {\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX];\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n lView[BINDING_INDEX] += 8;\n\n // Only set static strings the first time (data will be null subsequent runs).\n const data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n const tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n tData[bindingIndex + 6] = i6;\n }\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, elementAttributeInternal} from './shared';\n\n\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate1(\n attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate2(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate3(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate4(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate5(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate6(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate7(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate8(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolatedValue =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolateV(\n attrName: string, values: any[], sanitizer?: SanitizerFn,\n namespace?: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n const interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolated, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {CONTEXT, RootContext, RootContextFlags} from '../interfaces/view';\nimport {getRootView} from '../util/view_traversal_utils';\nimport {detectChangesInternal, markViewDirty, scheduleTick, tickRootContext} from './shared';\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges<T>(component: T): void {\n const view = getComponentViewByInstance(component);\n detectChangesInternal<T>(view, component);\n}\n\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n *\n * @publicApi\n */\nexport function markDirty<T>(component: T) {\n ngDevMode && assertDefined(component, 'component');\n const rootView = markViewDirty(getComponentViewByInstance(component)) !;\n\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT] as RootContext, RootContextFlags.DetectChanges);\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nexport function tick<T>(component: T): void {\n const rootView = getRootView(component);\n const rootContext = rootView[CONTEXT] as RootContext;\n tickRootContext(rootContext);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\nimport {assertDefined, assertDomNode} from '../util/assert';\n\nimport {assertLContainer, assertLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE, unusedValueExportToPlacateAjd as unused1} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeType, TProjectionNode, TViewNode, unusedValueExportToPlacateAjd as unused2} from './interfaces/node';\nimport {unusedValueExportToPlacateAjd as unused3} from './interfaces/projection';\nimport {ProceduralRenderer3, RElement, RNode, RText, Renderer3, isProceduralRenderer, unusedValueExportToPlacateAjd as unused4} from './interfaces/renderer';\nimport {StylingContext} from './interfaces/styling';\nimport {CHILD_HEAD, CLEANUP, FLAGS, HOST, HookData, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, TVIEW, T_HOST, unusedValueExportToPlacateAjd as unused5} from './interfaces/view';\nimport {assertNodeOfPossibleTypes, assertNodeType} from './node_assert';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, isLContainer, isLView, isRootView, unwrapRNode, viewAttachedToContainer} from './util/view_utils';\n\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4 + unused5;\n\nexport function getLContainer(tNode: TViewNode, embeddedView: LView): LContainer|null {\n ngDevMode && assertLView(embeddedView);\n const container = embeddedView[PARENT] as LContainer;\n if (tNode.index === -1) {\n // This is a dynamically created view inside a dynamic container.\n // The parent isn't an LContainer if the embedded view hasn't been attached yet.\n return isLContainer(container) ? container : null;\n } else {\n ngDevMode && assertLContainer(container);\n // This is a inline view node (e.g. embeddedViewStart)\n return container;\n }\n}\n\n\n/**\n * Retrieves render parent for a given view.\n * Might be null if a view is not yet attached to any container.\n */\nfunction getContainerRenderParent(tViewNode: TViewNode, view: LView): RElement|null {\n const container = getLContainer(tViewNode, view);\n return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;\n}\n\nconst enum WalkTNodeTreeAction {\n /** node insert in the native environment */\n Insert = 0,\n\n /** node detach from the native environment */\n Detach = 1,\n\n /** node destruction using the renderer's API */\n Destroy = 2,\n}\n\n\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction executeActionOnElementOrContainer(\n action: WalkTNodeTreeAction, renderer: Renderer3, parent: RElement | null,\n lNodeToHandle: RNode | LContainer | LView | StylingContext, beforeNode?: RNode | null) {\n ngDevMode && assertDefined(lNodeToHandle, '\\'lNodeToHandle\\' is undefined');\n let lContainer: LContainer|undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is wrapped\n // in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST] !;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n ngDevMode && assertDomNode(rNode);\n\n if (action === WalkTNodeTreeAction.Insert) {\n nativeInsertBefore(renderer, parent !, rNode, beforeNode || null);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n (renderer as ProceduralRenderer3).destroyNode !(rNode);\n }\n if (lContainer != null) {\n executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);\n }\n}\n\nexport function createTextNode(value: any, renderer: Renderer3): RText {\n return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) :\n renderer.createTextNode(renderStringify(value));\n}\n\n/**\n * Adds or removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param lView The view from which elements should be added or removed\n * @param insertMode Whether or not elements should be added (if false, removing)\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addRemoveViewFromContainer(\n lView: LView, insertMode: true, beforeNode: RNode | null): void;\nexport function addRemoveViewFromContainer(lView: LView, insertMode: false): void;\nexport function addRemoveViewFromContainer(\n lView: LView, insertMode: boolean, beforeNode?: RNode | null): void {\n const renderParent = getContainerRenderParent(lView[TVIEW].node as TViewNode, lView);\n ngDevMode && assertNodeType(lView[TVIEW].node as TNode, TNodeType.View);\n if (renderParent) {\n const renderer = lView[RENDERER];\n const action = insertMode ? WalkTNodeTreeAction.Insert : WalkTNodeTreeAction.Detach;\n executeActionOnView(renderer, action, lView, renderParent, beforeNode);\n }\n}\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(lView: LView) {\n executeActionOnView(lView[RENDERER], WalkTNodeTreeAction.Detach, lView, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView|LContainer|null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView|undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer ![NEXT] && lViewOrLContainer !== rootView) {\n cleanUpView(lViewOrLContainer);\n lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n }\n cleanUpView(lViewOrLContainer || rootView);\n next = lViewOrLContainer && lViewOrLContainer ![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n lContainer.splice(CONTAINER_HEADER_OFFSET + index, 0, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // Notify query that a new view has been added\n if (lView[QUERIES]) {\n lView[QUERIES] !.insertView(index);\n }\n\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView|undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n lContainer.splice(CONTAINER_HEADER_OFFSET + removeIndex, 1);\n addRemoveViewFromContainer(viewToDetach, false);\n\n if ((viewToDetach[FLAGS] & LViewFlags.Attached) &&\n !(viewToDetach[FLAGS] & LViewFlags.Destroyed) && viewToDetach[QUERIES]) {\n viewToDetach[QUERIES] !.removeView();\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.\n *\n * @param lContainer The container from which to remove a view\n * @param removeIndex The index of the view to remove\n */\nexport function removeView(lContainer: LContainer, removeIndex: number) {\n const detachedView = detachView(lContainer, removeIndex);\n detachedView && destroyLView(detachedView);\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting cleanup (e.g. removing listeners, calling onDestroys).\n *\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n executeActionOnView(renderer, WalkTNodeTreeAction.Destroy, lView, null, null);\n }\n\n destroyViewTree(lView);\n }\n}\n\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param lViewOrLContainer The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nexport function getParentState(lViewOrLContainer: LView | LContainer, rootView: LView): LView|\n LContainer|null {\n let tNode;\n if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n tNode.type === TNodeType.View) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return getLContainer(tNode as TViewNode, lViewOrLContainer);\n } else {\n // otherwise, use parent view for containers or component views\n return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];\n }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view: LView | LContainer): void {\n if (isLView(view) && !(view[FLAGS] & LViewFlags.Destroyed)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n view[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n view[FLAGS] |= LViewFlags.Destroyed;\n\n executeOnDestroys(view);\n removeListeners(view);\n const hostTNode = view[T_HOST];\n // For component views only, the local renderer is destroyed as clean up time.\n if (hostTNode && hostTNode.type === TNodeType.Element && isProceduralRenderer(view[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n (view[RENDERER] as ProceduralRenderer3).destroy();\n }\n // For embedded views still attached to a container: remove query result from this view.\n if (viewAttachedToContainer(view) && view[QUERIES]) {\n view[QUERIES] !.removeView();\n }\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(lView: LView): void {\n const tCleanup = lView[TVIEW].cleanup;\n if (tCleanup !== null) {\n const lCleanup = lView[CLEANUP] !;\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n const idxOrTargetGetter = tCleanup[i + 1];\n const target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n const listener = lCleanup[tCleanup[i + 2]];\n const useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n } else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[useCaptureOrSubIdx]();\n } else {\n // Subscription\n lCleanup[-useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n lView[CLEANUP] = null;\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view: LView): void {\n const tView = view[TVIEW];\n let destroyHooks: HookData|null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = view[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n (destroyHooks[i + 1] as() => void).call(context);\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n */\nfunction getRenderParent(tNode: TNode, currentView: LView): RElement|null {\n // Nodes of the top-most view can be inserted eagerly.\n if (isRootView(currentView)) {\n return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView));\n }\n\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n const parent = getHighestElementOrICUContainer(tNode);\n const renderParent = parent.parent;\n\n // If the parent is null, then we are inserting across views: either into an embedded view or a\n // component view.\n if (renderParent == null) {\n const hostTNode = currentView[T_HOST] !;\n if (hostTNode.type === TNodeType.View) {\n // We are inserting a root element of an embedded view We might delay insertion of children\n // for a given view if it is disconnected. This might happen for 2 main reasons:\n // - view is not inserted into any container(view was created but not inserted yet)\n // - view is inserted into a container but the container itself is not inserted into the DOM\n // (container might be part of projection or child of a view that is not inserted yet).\n // In other words we can insert children of a given view if this view was inserted into a\n // container and the container itself has its render parent determined.\n return getContainerRenderParent(hostTNode as TViewNode, currentView);\n } else {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return getHostNative(currentView);\n }\n } else {\n const isIcuCase = parent && parent.type === TNodeType.IcuContainer;\n // If the parent of this node is an ICU container, then it is represented by comment node and we\n // need to use it as an anchor. If it is projected then its direct parent node is the renderer.\n if (isIcuCase && parent.flags & TNodeFlags.isProjected) {\n return getNativeByTNode(parent, currentView).parentNode as RElement;\n }\n\n ngDevMode && assertNodeType(renderParent, TNodeType.Element);\n if (renderParent.flags & TNodeFlags.isComponent && !isIcuCase) {\n const tData = currentView[TVIEW].data;\n const tNode = tData[renderParent.index] as TNode;\n const encapsulation = (tData[tNode.directiveStart] as ComponentDef<any>).encapsulation;\n\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation !== ViewEncapsulation.ShadowDom &&\n encapsulation !== ViewEncapsulation.Native) {\n return null;\n }\n }\n\n return getNativeByTNode(renderParent, currentView) as RElement;\n }\n}\n\n/**\n * Gets the native host element for a given view. Will return null if the current view does not have\n * a host element.\n */\nfunction getHostNative(currentView: LView): RElement|null {\n ngDevMode && assertLView(currentView);\n const hostTNode = currentView[T_HOST];\n return hostTNode && hostTNode.type === TNodeType.Element ?\n (getNativeByTNode(hostTNode, getLViewParent(currentView) !) as RElement) :\n null;\n}\n\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nexport function nativeInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode);\n } else {\n parent.insertBefore(child, beforeNode, true);\n }\n}\n\nfunction nativeAppendChild(renderer: Renderer3, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n } else {\n parent.appendChild(child);\n }\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode | null) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(\n renderer: Renderer3, parent: RElement, child: RNode, isHostElement?: boolean): void {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n } else {\n parent.removeChild(child);\n }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer3, node: RNode): RElement|null {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode) as RElement;\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer3, node: RNode): RNode|null {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n\n/**\n * Finds a native \"anchor\" node for cases where we can't append a native child directly\n * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.\n * @param parentTNode\n * @param lView\n */\nfunction getNativeAnchorNode(parentTNode: TNode, lView: LView): RNode|null {\n if (parentTNode.type === TNodeType.View) {\n const lContainer = getLContainer(parentTNode as TViewNode, lView) !;\n const index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;\n return getBeforeNodeForView(index, lContainer);\n } else if (\n parentTNode.type === TNodeType.ElementContainer ||\n parentTNode.type === TNodeType.IcuContainer) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}.\n *\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nexport function appendChild(childEl: RNode | RNode[], childTNode: TNode, currentView: LView): void {\n const renderParent = getRenderParent(childTNode, currentView);\n if (renderParent != null) {\n const renderer = currentView[RENDERER];\n const parentTNode: TNode = childTNode.parent || currentView[T_HOST] !;\n const anchorNode = getNativeAnchorNode(parentTNode, currentView);\n if (Array.isArray(childEl)) {\n for (let nativeNode of childEl) {\n nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n }\n }\n}\n\n/**\n * Gets the top-level element or an ICU container if those containers are nested.\n *\n * @param tNode The starting TNode for which we should skip element and ICU containers\n * @returns The TNode of the highest level ICU container or element container\n */\nfunction getHighestElementOrICUContainer(tNode: TNode): TNode {\n while (tNode.parent != null && (tNode.parent.type === TNodeType.ElementContainer ||\n tNode.parent.type === TNodeType.IcuContainer)) {\n tNode = tNode.parent;\n }\n return tNode;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');\n const tViewNodeChild = (lView[T_HOST] as TViewNode).child;\n return tViewNodeChild !== null ? getNativeByTNode(tViewNodeChild, lView) : lContainer[NATIVE];\n } else {\n return lContainer[NATIVE];\n }\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer3, rNode: RNode, isHostElement?: boolean): void {\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n\n/**\n * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and\n * stored on a component host level.\n * @param lView A LView where nodes are inserted (target LView)\n * @param tProjectionNode A projection node where previously re-distribution should be appended\n * (target insertion place)\n * @param selectorIndex A bucket from where nodes to project should be taken\n * @param componentView A where projectable nodes were initially created (source view)\n */\nexport function appendProjectedNodes(\n lView: LView, tProjectionNode: TProjectionNode, selectorIndex: number,\n componentView: LView): void {\n const projectedView = componentView[PARENT] !as LView;\n const componentNode = componentView[T_HOST] as TElementNode;\n let nodeToProject = (componentNode.projection as(TNode | null)[])[selectorIndex];\n\n if (Array.isArray(nodeToProject)) {\n appendChild(nodeToProject, tProjectionNode, lView);\n } else {\n while (nodeToProject) {\n if (!(nodeToProject.flags & TNodeFlags.isDetached)) {\n if (nodeToProject.type === TNodeType.Projection) {\n appendProjectedNodes(\n lView, tProjectionNode, (nodeToProject as TProjectionNode).projection,\n findComponentView(projectedView));\n } else {\n // This flag must be set now or we won't know that this node is projected\n // if the nodes are inserted into a container later.\n nodeToProject.flags |= TNodeFlags.isProjected;\n appendProjectedNode(nodeToProject, tProjectionNode, lView, projectedView);\n }\n }\n nodeToProject = nodeToProject.projectionNext;\n }\n }\n}\n\n/**\n * Loops over all children of a TNode container and appends them to the DOM\n *\n * @param ngContainerChildTNode The first child of the TNode container\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedChildren(\n ngContainerChildTNode: TNode | null, tProjectionNode: TNode, currentView: LView,\n projectionView: LView) {\n while (ngContainerChildTNode) {\n appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);\n ngContainerChildTNode = ngContainerChildTNode.next;\n }\n}\n\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param projectedTNode The TNode to be projected\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\nfunction appendProjectedNode(\n projectedTNode: TNode, tProjectionNode: TNode, currentView: LView,\n projectionView: LView): void {\n const native = getNativeByTNode(projectedTNode, projectionView);\n appendChild(native, tProjectionNode, currentView);\n\n // the projected contents are processed while in the shadow view (which is the currentView)\n // therefore we need to extract the view where the host element lives since it's the\n // logical container of the content projected views\n attachPatchData(native, projectionView);\n\n const nodeOrContainer = projectionView[projectedTNode.index];\n if (projectedTNode.type === TNodeType.Container) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n for (let i = CONTAINER_HEADER_OFFSET; i < nodeOrContainer.length; i++) {\n addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);\n }\n } else if (projectedTNode.type === TNodeType.IcuContainer) {\n // The node we are adding is an ICU container which is why we also need to project all the\n // children nodes that might have been created previously and are linked to this anchor\n let ngContainerChildTNode: TNode|null = projectedTNode.child as TNode;\n appendProjectedChildren(\n ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);\n } else {\n if (projectedTNode.type === TNodeType.ElementContainer) {\n appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);\n }\n\n if (isLContainer(nodeOrContainer)) {\n appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);\n }\n }\n}\n\n\n/**\n * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,\n * destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. While the recursive implementation is not the\n * most efficient one, trying to unroll the nodes non-recursively results in very complex code that\n * is very hard (to maintain). We are sacrificing a bit of performance for readability using a\n * recursive implementation.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnView(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const tView = lView[TVIEW];\n ngDevMode && assertNodeType(tView.node !, TNodeType.View);\n let viewRootTNode: TNode|null = tView.node !.child;\n while (viewRootTNode !== null) {\n executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);\n viewRootTNode = viewRootTNode.next;\n }\n}\n\n/**\n * `executeActionOnProjection` performs an operation on the projection specified by `action`\n * (insert, detach, destroy).\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnProjection(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tProjectionNode: TProjectionNode, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const componentLView = findComponentView(lView);\n const componentNode = componentLView[T_HOST] as TElementNode;\n const nodeToProject = componentNode.projection ![tProjectionNode.projection] !;\n if (Array.isArray(nodeToProject)) {\n for (let i = 0; i < nodeToProject.length; i++) {\n const rNode = nodeToProject[i];\n ngDevMode && assertDomNode(rNode);\n executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n }\n } else {\n let projectionTNode: TNode|null = nodeToProject;\n const projectedComponentLView = componentLView[PARENT] as LView;\n while (projectionTNode !== null) {\n executeActionOnNode(\n renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);\n projectionTNode = projectionTNode.projectionNext;\n }\n }\n}\n\n\n/**\n * `executeActionOnContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lContainer: LContainer,\n renderParent: RElement | null, beforeNode: RNode | null | undefined) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node\n // (comment in the DOM) that will be different from the LContainer's host node. In this particular\n // case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeNodeAction)\n // - container's host node (this is done here)\n if (anchor !== native) {\n executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n executeActionOnView(renderer, action, lView, renderParent, anchor);\n }\n}\n\n\n/**\n * `executeActionOnElementContainer` performs an operation on the ng-container node and its child\n * nodes as specified by the `action` (insert, detach, destroy).\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tElementContainerNode The TNode associated with the ElementContainer.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction executeActionOnElementContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tElementContainerNode: TElementContainerNode, renderParent: RElement | null,\n beforeNode: RNode | null | undefined) {\n const node = lView[tElementContainerNode.index];\n executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);\n let childTNode: TNode|null = tElementContainerNode.child;\n while (childTNode) {\n executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);\n childTNode = childTNode.next;\n }\n}\n\nfunction executeActionOnNode(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView, tNode: TNode,\n renderParent: RElement | null, beforeNode: RNode | null | undefined): void {\n const elementContainerRootTNodeType = tNode.type;\n if (elementContainerRootTNodeType === TNodeType.ElementContainer) {\n executeActionOnElementContainer(\n renderer, action, lView, tNode as TElementContainerNode, renderParent, beforeNode);\n } else if (elementContainerRootTNodeType === TNodeType.Projection) {\n executeActionOnProjection(\n renderer, action, lView, tNode as TProjectionNode, renderParent, beforeNode);\n } else {\n ngDevMode && assertNodeOfPossibleTypes(tNode, TNodeType.Element, TNodeType.Container);\n executeActionOnElementOrContainer(\n action, renderer, renderParent, lView[tNode.index], beforeNode);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {executePreOrderHooks, registerPostOrderHooks} from '../hooks';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild, removeView} from '../node_manipulation';\nimport {getCheckNoChangesMode, getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {getNativeByTNode, loadInternal} from '../util/view_utils';\n\nimport {addToViewTree, createDirectivesAndLocals, createLContainer, createTView, getOrCreateTNode} from './shared';\n\n\n/**\n * Creates an LContainer for inline views, e.g.\n *\n * % if (showing) {\n * <div></div>\n * % }\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ɵɵcontainer(index: number): void {\n const tNode = containerInternal(index, null, null);\n const lView = getLView();\n if (lView[TVIEW].firstTemplatePass) {\n tNode.tViews = [];\n }\n addTContainerToQueries(lView, tNode);\n setIsNotParent();\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param consts The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,\n tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,\n localRefExtractor?: LocalRefExtractor) {\n const lView = getLView();\n const tView = lView[TVIEW];\n\n // TODO: consider a separate node type for templates\n const tContainerNode = containerInternal(index, tagName || null, attrs || null);\n if (tView.firstTemplatePass) {\n tContainerNode.tViews = createTView(\n -1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n\n createDirectivesAndLocals(tView, lView, localRefs, localRefExtractor);\n addTContainerToQueries(lView, tContainerNode);\n attachPatchData(getNativeByTNode(tContainerNode, lView), lView);\n registerPostOrderHooks(tView, tContainerNode);\n setIsNotParent();\n}\n\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\nexport function ɵɵcontainerRefreshStart(index: number): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n let previousOrParentTNode = loadInternal(tView.data, index) as TNode;\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n setPreviousOrParentTNode(previousOrParentTNode, true);\n\n lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;\n\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executePreOrderHooks(lView, tView, getCheckNoChangesMode(), undefined);\n}\n\n/**\n * Marks the end of the LContainer.\n *\n * Marking the end of LContainer is the time when to child views get inserted or removed.\n *\n * @codeGenApi\n */\nexport function ɵɵcontainerRefreshEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.View);\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Container);\n\n const lContainer: LContainer = getLView()[previousOrParentTNode.index];\n const nextIndex = lContainer[ACTIVE_INDEX];\n\n // remove extra views at the end of the container\n while (nextIndex < lContainer.length - CONTAINER_HEADER_OFFSET) {\n removeView(lContainer, nextIndex);\n }\n}\n\n/**\n* Reporting a TContainer node queries is a 2-step process as we need to:\n* - check if the container node itself is matching (query might match a <ng-template> node);\n* - prepare room for nodes from views that might be created based on the TemplateRef linked to this\n* container.\n*\n* Those 2 operations need to happen in the specific order (match the container node itself, then\n* prepare space for nodes from views).\n*/\nfunction addTContainerToQueries(lView: LView, tContainerNode: TContainerNode): void {\n const queries = lView[QUERIES];\n if (queries) {\n const lContainer = lView[tContainerNode.index];\n if (lContainer[QUERIES]) {\n // Query container should only exist if it was created through a dynamic view\n // in a directive constructor. In this case, we must splice the template\n // matches in before the view matches to ensure query results in embedded views\n // don't clobber query results on the template node itself.\n queries.insertNodeBeforeViews(tContainerNode);\n } else {\n queries.addNode(tContainerNode);\n lContainer[QUERIES] = queries.container();\n }\n }\n}\n\nfunction containerInternal(\n index: number, tagName: string | null, attrs: TAttributes | null): TContainerNode {\n const lView = getLView();\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'container nodes should be created before any bindings');\n\n const adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n ngDevMode && ngDevMode.rendererCreateComment++;\n const comment = lView[index + HEADER_OFFSET] =\n lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n const tNode =\n getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, TNodeType.Container, tagName, attrs);\n const lContainer = lView[adjustedIndex] =\n createLContainer(lView[adjustedIndex], lView, comment, tNode);\n\n appendChild(comment, tNode, lView);\n\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(lView, lContainer);\n\n ngDevMode && assertNodeType(getPreviousOrParentTNode(), TNodeType.Container);\n return tNode;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {HEADER_OFFSET, TVIEW} from '../interfaces/view';\nimport {getContextLView, getLView} from '../state';\nimport {loadInternal} from '../util/view_utils';\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(index: number, value: T): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n const adjustedIndex = index + HEADER_OFFSET;\n if (adjustedIndex >= tView.data.length) {\n tView.data[adjustedIndex] = null;\n tView.blueprint[adjustedIndex] = null;\n }\n lView[adjustedIndex] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return loadInternal<T>(contextLView, index);\n}\n\n/**\n * Retrieves a value from current `viewData`.\n *\n * @codeGenApi\n */\nexport function ɵɵload<T>(index: number): T {\n return loadInternal<T>(getLView(), index);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectFlags, InjectionToken, resolveForwardRef} from '../../di';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {Type} from '../../interface/type';\nimport {getOrCreateInjectable, injectAttributeImpl} from '../di';\nimport {TContainerNode, TElementContainerNode, TElementNode} from '../interfaces/node';\nimport {getLView, getPreviousOrParentTNode} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ngDirectiveDef = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(\n token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {\n token = resolveForwardRef(token);\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView == null) return ɵɵinject(token, flags);\n\n return getOrCreateInjectable<T>(\n getPreviousOrParentTNode() as TElementNode | TContainerNode | TElementContainerNode, lView,\n token, flags);\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string|null {\n return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\n}\n","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\nimport {Sanitizer} from '../../sanitization/security';\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {LContainer} from '../interfaces/container';\nimport {AttributeMarker, TAttributes, TNode, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {StylingContext as OldStylingContext, StylingIndex as OldStylingIndex} from '../interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, HOST, LView, RENDERER, SANITIZER} from '../interfaces/view';\nimport {getActiveDirectiveId, getActiveDirectiveSuperClassDepth, getActiveDirectiveSuperClassHeight, getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getTNode, isStylingContext as isOldStylingContext} from '../util/view_utils';\n\nimport {applyClasses, applyStyles, registerBinding, updateClassBinding, updateStyleBinding} from './bindings';\nimport {TStylingContext} from './interfaces';\nimport {activeStylingMapFeature, normalizeIntoStylingMap} from './map_based_bindings';\nimport {getCurrentStyleSanitizer, setCurrentStyleSanitizer} from './state';\nimport {attachStylingDebugObject} from './styling_debug';\nimport {allocTStylingContext, getCurrentOrLViewSanitizer, hasValueChanged, updateContextDirectiveIndex} from './util';\n\n\n\n/**\n * --------\n *\n * This file contains the core logic for how styling instructions are processed in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * This function is executed during the creation block of an element.\n * Because the existing styling implementation issues a call to the\n * `styling()` instruction, this instruction will also get run. The\n * central idea here is that the directive index values are bound\n * into the context. The directive index is temporary and is only\n * required until the `select(n)` instruction is fully functional.\n */\nexport function stylingInit() {\n const lView = getLView();\n const index = getSelectedIndex();\n const tNode = getTNode(index, lView);\n updateLastDirectiveIndex(tNode, getActiveDirectiveStylingIndex());\n}\n\n/**\n * Sets the current style sanitizer function which will then be used\n * within all follow-up prop and map-based style binding instructions\n * for the given element.\n *\n * Note that once styling has been applied to the element (i.e. once\n * `select(n)` is executed or the hostBindings/template function exits)\n * then the active `sanitizerFn` will be set to `null`. This means that\n * once styling is applied to another element then a another call to\n * `styleSanitizer` will need to be made.\n *\n * @param sanitizerFn The sanitization function that will be used to\n * process style prop/value entries.\n *\n * @codeGenApi\n */\nexport function styleSanitizer(sanitizer: Sanitizer | StyleSanitizeFn | null): void {\n setCurrentStyleSanitizer(sanitizer);\n}\n\n/**\n * Mirror implementation of the `styleProp()` instruction (found in `instructions/styling.ts`).\n */\nexport function styleProp(\n prop: string, value: string | number | String | null, suffix?: string | null): void {\n _stylingProp(prop, resolveStylePropValue(value, suffix), false);\n}\n\n/**\n * Mirror implementation of the `classProp()` instruction (found in `instructions/styling.ts`).\n */\nexport function classProp(className: string, value: boolean | null): void {\n _stylingProp(className, value, true);\n}\n\n/**\n * Shared function used to update a prop-based styling binding for an element.\n */\nfunction _stylingProp(\n prop: string, value: boolean | number | String | string | null, isClassBased: boolean) {\n const index = getSelectedIndex();\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX]++;\n const tNode = getTNode(index, lView);\n const defer = getActiveDirectiveSuperClassHeight() > 0;\n if (isClassBased) {\n updateClassBinding(\n getClassesContext(tNode), lView, prop, bindingIndex, value as string | boolean | null,\n defer, false);\n } else {\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(\n getStylesContext(tNode), lView, prop, bindingIndex, value as string | null, sanitizer,\n defer, false);\n }\n}\n\n/**\n * Mirror implementation of the `styleMap()` instruction (found in `instructions/styling.ts`).\n */\nexport function styleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void {\n _stylingMap(styles, false);\n}\n\n/**\n * Mirror implementation of the `classMap()` instruction (found in `instructions/styling.ts`).\n */\nexport function classMap(classes: {[className: string]: any} | NO_CHANGE | string | null): void {\n _stylingMap(classes, true);\n}\n\n/**\n * Shared function used to update a map-based styling binding for an element.\n *\n * When this function is called it will activate support for `[style]` and\n * `[class]` bindings in Angular.\n */\nfunction _stylingMap(value: {[key: string]: any} | string | null, isClassBased: boolean) {\n activeStylingMapFeature();\n const index = getSelectedIndex();\n const lView = getLView();\n const bindingIndex = lView[BINDING_INDEX]++;\n\n if (value !== NO_CHANGE) {\n const tNode = getTNode(index, lView);\n const defer = getActiveDirectiveSuperClassHeight() > 0;\n const oldValue = lView[bindingIndex];\n const valueHasChanged = hasValueChanged(oldValue, value);\n const lStylingMap = normalizeIntoStylingMap(oldValue, value);\n if (isClassBased) {\n updateClassBinding(\n getClassesContext(tNode), lView, null, bindingIndex, lStylingMap, defer, valueHasChanged);\n } else {\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(\n getStylesContext(tNode), lView, null, bindingIndex, lStylingMap, sanitizer, defer,\n valueHasChanged);\n }\n }\n}\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The new styling refactor ensures that styling flushing is called\n * automatically when a template function exits or a follow-up element\n * is visited (i.e. when `select(n)` is called). Because the `select(n)`\n * instruction is not fully implemented yet (it doesn't actually execute\n * host binding instruction code at the right time), this means that a\n * styling apply function is still needed.\n *\n * This function is a mirror implementation of the `stylingApply()`\n * instruction (found in `instructions/styling.ts`).\n */\nexport function stylingApply() {\n const index = getSelectedIndex();\n const lView = getLView();\n const tNode = getTNode(index, lView);\n const renderer = getRenderer(tNode, lView);\n const native = getNativeFromLView(index, lView);\n const directiveIndex = getActiveDirectiveStylingIndex();\n applyClasses(renderer, lView, getClassesContext(tNode), native, directiveIndex);\n\n const sanitizer = getCurrentOrLViewSanitizer(lView);\n applyStyles(renderer, lView, getStylesContext(tNode), native, directiveIndex, sanitizer);\n\n setCurrentStyleSanitizer(null);\n}\n\n/**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The purpose of this function is to traverse through the LView data\n * for a specific element index and return the native node. Because the\n * current implementation relies on there being a styling context array,\n * the code below will need to loop through these array values until it\n * gets a native element node.\n *\n * Note that this code is temporary and will disappear once the new\n * styling refactor lands in its entirety.\n */\nfunction getNativeFromLView(index: number, viewData: LView): RElement {\n let storageIndex = index + HEADER_OFFSET;\n let slotValue: LContainer|LView|OldStylingContext|RElement = viewData[storageIndex];\n let wrapper: LContainer|LView|OldStylingContext = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST] as LView | OldStylingContext | RElement;\n }\n if (isOldStylingContext(wrapper)) {\n return wrapper[OldStylingIndex.ElementPosition] as RElement;\n } else {\n return slotValue;\n }\n}\n\nfunction getRenderer(tNode: TNode, lView: LView) {\n return tNode.type === TNodeType.Element ? lView[RENDERER] : null;\n}\n\n/**\n * Searches and assigns provided all static style/class entries (found in the `attrs` value)\n * and registers them in their respective styling contexts.\n */\nexport function registerInitialStylingIntoContext(\n tNode: TNode, attrs: TAttributes, startIndex: number) {\n let classesContext !: TStylingContext;\n let stylesContext !: TStylingContext;\n let mode = -1;\n for (let i = startIndex; i < attrs.length; i++) {\n const attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n } else if (mode == AttributeMarker.Classes) {\n classesContext = classesContext || getClassesContext(tNode);\n registerBinding(classesContext, -1, attr as string, true, false);\n } else if (mode == AttributeMarker.Styles) {\n stylesContext = stylesContext || getStylesContext(tNode);\n registerBinding(stylesContext, -1, attr as string, attrs[++i] as string, false);\n }\n }\n}\n\n/**\n * Mirror implementation of the same function found in `instructions/styling.ts`.\n */\nexport function getActiveDirectiveStylingIndex(): number {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n}\n\n/**\n * Temporary function that will update the max directive index value in\n * both the classes and styles contexts present on the provided `tNode`.\n *\n * This code is only used because the `select(n)` code functionality is not\n * yet 100% functional. The `select(n)` instruction cannot yet evaluate host\n * bindings function code in sync with the associated template function code.\n * For this reason the styling algorithm needs to track the last directive index\n * value so that it knows exactly when to render styling to the element since\n * `stylingApply()` is called multiple times per CD (`stylingApply` will be\n * removed once `select(n)` is fixed).\n */\nfunction updateLastDirectiveIndex(tNode: TNode, directiveIndex: number) {\n updateContextDirectiveIndex(getClassesContext(tNode), directiveIndex);\n updateContextDirectiveIndex(getStylesContext(tNode), directiveIndex);\n}\n\nfunction getStylesContext(tNode: TNode): TStylingContext {\n return getContext(tNode, false);\n}\n\nfunction getClassesContext(tNode: TNode): TStylingContext {\n return getContext(tNode, true);\n}\n\n/**\n * Returns/instantiates a styling context from/to a `tNode` instance.\n */\nfunction getContext(tNode: TNode, isClassBased: boolean) {\n let context = isClassBased ? tNode.newClasses : tNode.newStyles;\n if (!context) {\n context = allocTStylingContext();\n if (ngDevMode) {\n attachStylingDebugObject(context);\n }\n if (isClassBased) {\n tNode.newClasses = context;\n } else {\n tNode.newStyles = context;\n }\n }\n return context;\n}\n\nfunction resolveStylePropValue(\n value: string | number | String | null, suffix: string | null | undefined) {\n let resolvedValue: string|null = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n resolvedValue = renderStringify(value) + suffix;\n } else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n resolvedValue = value as any as string;\n }\n }\n return resolvedValue;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {StyleSanitizeFn} from '../../sanitization/style_sanitizer';\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {PlayerFactory} from '../interfaces/player';\nimport {FLAGS, HEADER_OFFSET, LView, LViewFlags, RENDERER, RootContextFlags} from '../interfaces/view';\nimport {getActiveDirectiveId, getActiveDirectiveSuperClassDepth, getLView, getPreviousOrParentTNode, getSelectedIndex} from '../state';\nimport {getInitialClassNameValue, renderStyling, updateClassMap, updateClassProp as updateclassProp, updateContextWithBindings, updateStyleMap, updateStyleProp as updatestyleProp} from '../styling/class_and_style_bindings';\nimport {ParamsOf, enqueueHostInstruction, registerHostDirective} from '../styling/host_instructions_queue';\nimport {BoundPlayerFactory} from '../styling/player_factory';\nimport {DEFAULT_TEMPLATE_DIRECTIVE_INDEX} from '../styling/shared';\nimport {getCachedStylingContext, setCachedStylingContext} from '../styling/state';\nimport {allocateOrUpdateDirectiveIntoContext, createEmptyStylingContext, forceClassesAsString, forceStylesAsString, getStylingContextFromLView, hasClassInput, hasStyleInput} from '../styling/util';\nimport {classMap as newClassMap, classProp as newClassProp, styleMap as newStyleMap, styleProp as newStyleProp, stylingApply as newStylingApply, stylingInit as newStylingInit} from '../styling_next/instructions';\nimport {runtimeAllowOldStyling, runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {getBindingNameFromIndex} from '../styling_next/util';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getRootContext} from '../util/view_traversal_utils';\nimport {getTNode} from '../util/view_utils';\n\nimport {scheduleTick, setInputsForProperty} from './shared';\n\n\n\n/*\n * The contents of this file include the instructions for all styling-related\n * operations in Angular.\n *\n * The instructions present in this file are:\n *\n * Template level styling instructions:\n * - styling\n * - styleMap\n * - classMap\n * - styleProp\n * - classProp\n * - stylingApply\n */\n\n/**\n * Allocates style and class binding properties on the element during creation mode.\n *\n * This instruction is meant to be called during creation mode to register all\n * dynamic style and class bindings on the element. Note that this is only used\n * for binding values (see `elementStart` to learn how to assign static styling\n * values to an element).\n *\n * @param classBindingNames An array containing bindable class names.\n * The `classProp` instruction refers to the class name by index in\n * this array (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).\n * @param styleBindingNames An array containing bindable style properties.\n * The `styleProp` instruction refers to the class name by index in\n * this array (i.e. `['width', 'height']` means `width=0` and `height=1`).\n * @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS\n * style values that are applied to the element (during rendering).\n *\n * Note that this will allocate the provided style/class bindings to the host element if\n * this function is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyling(\n classBindingNames?: string[] | null, styleBindingNames?: string[] | null,\n styleSanitizer?: StyleSanitizeFn | null): void {\n const tNode = getPreviousOrParentTNode();\n if (!tNode.stylingTemplate) {\n tNode.stylingTemplate = createEmptyStylingContext();\n }\n\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n // this is temporary hack to get the existing styling instructions to\n // play ball with the new refactored implementation.\n // TODO (matsko): remove this once the old implementation is not needed.\n if (runtimeIsNewStylingInUse()) {\n newStylingInit();\n }\n\n // despite the binding being applied in a queue (below), the allocation\n // of the directive into the context happens right away. The reason for\n // this is to retain the ordering of the directives (which is important\n // for the prioritization of bindings).\n allocateOrUpdateDirectiveIntoContext(tNode.stylingTemplate, directiveStylingIndex);\n\n const fns = tNode.onElementCreationFns = tNode.onElementCreationFns || [];\n fns.push(() => {\n initStyling(\n tNode, classBindingNames, styleBindingNames, styleSanitizer, directiveStylingIndex);\n registerHostDirective(tNode.stylingTemplate !, directiveStylingIndex);\n });\n } else {\n // calling the function below ensures that the template's binding values\n // are applied as the first set of bindings into the context. If any other\n // styling bindings are set on the same element (by directives and/or\n // components) then they will be applied at the end of the `elementEnd`\n // instruction (because directives are created first before styling is\n // executed for a new element).\n initStyling(\n tNode, classBindingNames, styleBindingNames, styleSanitizer,\n DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n }\n}\n\nfunction initStyling(\n tNode: TNode, classBindingNames: string[] | null | undefined,\n styleBindingNames: string[] | null | undefined,\n styleSanitizer: StyleSanitizeFn | null | undefined, directiveStylingIndex: number): void {\n updateContextWithBindings(\n tNode.stylingTemplate !, directiveStylingIndex, classBindingNames, styleBindingNames,\n styleSanitizer);\n}\n\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param value New value to write (falsy to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n * Note that when a suffix is provided then the underlying sanitizer will\n * be ignored.\n * @param forceOverride Whether or not to update the styling value immediately\n * (despite the other bindings possibly having priority)\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n styleIndex: number, value: string | number | String | PlayerFactory | null,\n suffix?: string | null, forceOverride?: boolean): void {\n const index = getSelectedIndex();\n const valueToAdd = resolveStylePropValue(value, suffix);\n const stylingContext = getStylingContext(index, getLView());\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updatestyleProp> =\n [stylingContext, styleIndex, valueToAdd, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updatestyleProp, args);\n } else {\n updatestyleProp(\n stylingContext, styleIndex, valueToAdd, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n\n if (runtimeIsNewStylingInUse()) {\n const prop = getBindingNameFromIndex(stylingContext, styleIndex, directiveStylingIndex, false);\n\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n newStyleProp(prop, value as string | number, suffix);\n }\n}\n\nfunction resolveStylePropValue(\n value: string | number | String | PlayerFactory | null, suffix: string | null | undefined) {\n let valueToAdd: string|null = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n valueToAdd = renderStringify(value) + suffix;\n } else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n valueToAdd = value as any as string;\n }\n }\n return valueToAdd;\n}\n\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param classIndex Index of class to toggle. This index value refers to the\n * index of the class in the class bindings array that was passed into\n * `styling` (which is meant to be called before this\n * function is).\n * @param value A true/false value which will turn the class on or off.\n * @param forceOverride Whether or not this value will be applied regardless\n * of where it is being set within the styling priority structure.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(\n classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void {\n const index = getSelectedIndex();\n const input = (value instanceof BoundPlayerFactory) ?\n (value as BoundPlayerFactory<boolean|null>) :\n booleanOrNull(value);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n const stylingContext = getStylingContext(index, getLView());\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateclassProp> =\n [stylingContext, classIndex, input, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateclassProp, args);\n } else {\n updateclassProp(\n stylingContext, classIndex, input, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n\n if (runtimeIsNewStylingInUse()) {\n const prop = getBindingNameFromIndex(stylingContext, classIndex, directiveStylingIndex, true);\n\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n newClassProp(prop, input as boolean);\n }\n}\n\n\nfunction booleanOrNull(value: any): boolean|null {\n if (typeof value === 'boolean') return value;\n return value ? true : null;\n}\n\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any} | NO_CHANGE | null): void {\n const index = getSelectedIndex();\n const lView = getLView();\n const stylingContext = getStylingContext(index, lView);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateStyleMap> = [stylingContext, styles, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateStyleMap, args);\n } else {\n const tNode = getTNode(index, lView);\n\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasStyleInput(tNode) && styles !== NO_CHANGE) {\n const initialStyles = getInitialClassNameValue(stylingContext);\n const styleInputVal =\n (initialStyles.length ? (initialStyles + ' ') : '') + forceStylesAsString(styles);\n setInputsForProperty(lView, tNode.inputs !['style'] !, styleInputVal);\n styles = NO_CHANGE;\n }\n updateStyleMap(stylingContext, styles);\n }\n\n if (runtimeIsNewStylingInUse()) {\n newStyleMap(styles);\n }\n}\n\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(classes: {[styleName: string]: any} | NO_CHANGE | string | null): void {\n const index = getSelectedIndex();\n const lView = getLView();\n const stylingContext = getStylingContext(index, lView);\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (directiveStylingIndex) {\n const args: ParamsOf<typeof updateClassMap> = [stylingContext, classes, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateClassMap, args);\n } else {\n const tNode = getTNode(index, lView);\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasClassInput(tNode) && classes !== NO_CHANGE) {\n const initialClasses = getInitialClassNameValue(stylingContext);\n const classInputVal =\n (initialClasses.length ? (initialClasses + ' ') : '') + forceClassesAsString(classes);\n setInputsForProperty(lView, tNode.inputs !['class'] !, classInputVal);\n classes = NO_CHANGE;\n }\n updateClassMap(stylingContext, classes);\n }\n\n if (runtimeIsNewStylingInUse()) {\n newClassMap(classes);\n }\n}\n\n/**\n * Apply all style and class binding values to the element.\n *\n * This instruction is meant to be run after `styleMap`, `classMap`,\n * `styleProp` or `classProp` instructions have been run and will\n * only apply styling to the element if any styling bindings have been updated.\n *\n * @codeGenApi\n */\nexport function ɵɵstylingApply(): void {\n const index = getSelectedIndex();\n const directiveStylingIndex =\n getActiveDirectiveStylingIndex() || DEFAULT_TEMPLATE_DIRECTIVE_INDEX;\n const lView = getLView();\n const tNode = getTNode(index, lView);\n\n // if a non-element value is being processed then we can't render values\n // on the element at all therefore by setting the renderer to null then\n // the styling apply code knows not to actually apply the values...\n const renderer = tNode.type === TNodeType.Element ? lView[RENDERER] : null;\n const isFirstRender = (lView[FLAGS] & LViewFlags.FirstLViewPass) !== 0;\n const stylingContext = getStylingContext(index, lView);\n\n if (runtimeAllowOldStyling()) {\n const totalPlayersQueued = renderStyling(\n stylingContext, renderer, lView, isFirstRender, null, null, directiveStylingIndex);\n if (totalPlayersQueued > 0) {\n const rootContext = getRootContext(lView);\n scheduleTick(rootContext, RootContextFlags.FlushPlayers);\n }\n }\n\n // because select(n) may not run between every instruction, the cached styling\n // context may not get cleared between elements. The reason for this is because\n // styling bindings (like `[style]` and `[class]`) are not recognized as property\n // bindings by default so a select(n) instruction is not generated. To ensure the\n // context is loaded correctly for the next element the cache below is pre-emptively\n // cleared because there is no code in Angular that applies more styling code after a\n // styling flush has occurred. Note that this will be fixed once FW-1254 lands.\n setCachedStylingContext(null);\n\n if (runtimeIsNewStylingInUse()) {\n newStylingApply();\n }\n}\n\nexport function getActiveDirectiveStylingIndex() {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n}\n\nfunction getStylingContext(index: number, lView: LView) {\n let context = getCachedStylingContext();\n if (!context) {\n context = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n setCachedStylingContext(context);\n } else if (ngDevMode) {\n const actualContext = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n assertEqual(context, actualContext, 'The cached styling context is invalid');\n }\n return context;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer';\nimport {StylingContext} from '../interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {applyOnCreateInstructions} from '../node_util';\nimport {decreaseElementDepthCount, getElementDepthCount, getIsParent, getLView, getPreviousOrParentTNode, getSelectedIndex, increaseElementDepthCount, setIsNotParent, setPreviousOrParentTNode} from '../state';\nimport {getInitialClassNameValue, getInitialStyleStringValue, initializeStaticContext, patchContextWithStaticAttrs, renderInitialClasses, renderInitialStyles} from '../styling/class_and_style_bindings';\nimport {getStylingContextFromLView, hasClassInput, hasStyleInput} from '../styling/util';\nimport {registerInitialStylingIntoContext} from '../styling_next/instructions';\nimport {runtimeIsNewStylingInUse} from '../styling_next/state';\nimport {attrsStylingIndexOf, setUpAttributes} from '../util/attrs_utils';\nimport {getNativeByTNode, getTNode} from '../util/view_utils';\n\nimport {createDirectivesAndLocals, elementCreate, executeContentQueries, getOrCreateTNode, initializeTNodeInputs, setInputsForProperty, setNodeStylingTemplate} from './shared';\nimport {getActiveDirectiveStylingIndex} from './styling';\n\n\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], tView.bindingStartIndex,\n 'elements should be created before any bindings ');\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const native = lView[index + HEADER_OFFSET] = elementCreate(name);\n const renderer = lView[RENDERER];\n const tNode =\n getOrCreateTNode(tView, lView[T_HOST], index, TNodeType.Element, name, attrs || null);\n let initialStylesIndex = 0;\n let initialClassesIndex = 0;\n\n let lastAttrIndex = -1;\n if (attrs) {\n lastAttrIndex = setUpAttributes(native, attrs);\n\n // it's important to only prepare styling-related datastructures once for a given\n // tNode and not each time an element is created. Also, the styling code is designed\n // to be patched and constructed at various points, but only up until the styling\n // template is first allocated (which happens when the very first style/class binding\n // value is evaluated). When the template is allocated (when it turns into a context)\n // then the styling template is locked and cannot be further extended (it can only be\n // instantiated into a context per element)\n setNodeStylingTemplate(tView, tNode, attrs, lastAttrIndex);\n\n const stylingTemplate = tNode.stylingTemplate;\n if (stylingTemplate) {\n // the initial style/class values are rendered immediately after having been\n // initialized into the context so the element styling is ready when directives\n // are initialized (since they may read style/class values in their constructor)\n initialStylesIndex = renderInitialStyles(native, stylingTemplate, renderer);\n initialClassesIndex = renderInitialClasses(native, stylingTemplate, renderer);\n }\n }\n\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n // if a directive contains a host binding for \"class\" then all class-based data will\n // flow through that (except for `[class.prop]` bindings). This also includes initial\n // static class values as well. (Note that this will be fixed once map-based `[style]`\n // and `[class]` bindings work for multiple directives.)\n if (tView.firstTemplatePass) {\n const inputData = initializeTNodeInputs(tNode);\n if (inputData && inputData.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputData && inputData.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n // we render the styling again below in case any directives have set any `style` and/or\n // `class` host attribute values...\n if (tNode.stylingTemplate) {\n renderInitialClasses(native, tNode.stylingTemplate, renderer, initialClassesIndex);\n renderInitialStyles(native, tNode.stylingTemplate, renderer, initialStylesIndex);\n }\n\n if (runtimeIsNewStylingInUse() && lastAttrIndex >= 0) {\n registerInitialStylingIntoContext(tNode, attrs as TAttributes, lastAttrIndex);\n }\n\n const currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertHasParent(getPreviousOrParentTNode());\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.Element);\n const lView = getLView();\n const currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n\n registerPostOrderHooks(lView[TVIEW], previousOrParentTNode);\n decreaseElementDepthCount();\n\n // this is fired at the end of elementEnd because ALL of the stylingBindings code\n // (for directives and the template) have now executed which means the styling\n // context can be instantiated properly.\n let stylingContext: StylingContext|null = null;\n if (hasClassInput(previousOrParentTNode)) {\n stylingContext = getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(\n lView, previousOrParentTNode.inputs !['class'] !, getInitialClassNameValue(stylingContext));\n }\n if (hasStyleInput(previousOrParentTNode)) {\n stylingContext =\n stylingContext || getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(\n lView, previousOrParentTNode.inputs !['style'] !,\n getInitialStyleStringValue(stylingContext));\n }\n}\n\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n ɵɵelementStart(index, name, attrs, localRefs);\n ɵɵelementEnd();\n}\n\n/**\n * Assign static attribute values to a host element.\n *\n * This instruction will assign static attribute values as well as class and style\n * values to an element within the host bindings function. Since attribute values\n * can consist of different types of values, the `attrs` array must include the values in\n * the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n *\n * NOTE: This instruction is meant to used from `hostBindings` function only.\n *\n * @param directive A directive instance the styling is associated with.\n * @param attrs An array of static values (attributes, classes and styles) with the correct marker\n * values.\n *\n * @codeGenApi\n */\nexport function ɵɵelementHostAttrs(attrs: TAttributes) {\n const hostElementIndex = getSelectedIndex();\n const lView = getLView();\n const tNode = getTNode(hostElementIndex, lView);\n\n // non-element nodes (e.g. `<ng-container>`) are not rendered as actual\n // element nodes and adding styles/classes on to them will cause runtime\n // errors...\n if (tNode.type === TNodeType.Element) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const lastAttrIndex = setUpAttributes(native, attrs);\n const stylingAttrsStartIndex = attrsStylingIndexOf(attrs, lastAttrIndex);\n if (stylingAttrsStartIndex >= 0) {\n const directiveStylingIndex = getActiveDirectiveStylingIndex();\n if (tNode.stylingTemplate) {\n patchContextWithStaticAttrs(\n tNode.stylingTemplate, attrs, stylingAttrsStartIndex, directiveStylingIndex);\n } else {\n tNode.stylingTemplate =\n initializeStaticContext(attrs, stylingAttrsStartIndex, directiveStylingIndex);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertEqual} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TNodeType} from '../interfaces/node';\nimport {BINDING_INDEX, HEADER_OFFSET, QUERIES, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {applyOnCreateInstructions} from '../node_util';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';\n\nimport {createDirectivesAndLocals, executeContentQueries, getOrCreateTNode, setNodeStylingTemplate} from './shared';\n\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrs Set of attributes to be used when matching directives.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n const renderer = lView[RENDERER];\n const tagName = 'ng-container';\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], tView.bindingStartIndex,\n 'element containers should be created before any bindings');\n\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const native = lView[index + HEADER_OFFSET] = renderer.createComment(ngDevMode ? tagName : '');\n\n ngDevMode && assertDataInRange(lView, index - 1);\n const tNode = getOrCreateTNode(\n tView, lView[T_HOST], index, TNodeType.ElementContainer, tagName, attrs || null);\n\n\n if (attrs) {\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n setNodeStylingTemplate(tView, tNode, attrs, 0);\n }\n\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n attachPatchData(native, lView);\n\n const currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n}\n\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): void {\n let previousOrParentTNode = getPreviousOrParentTNode();\n const lView = getLView();\n const tView = lView[TVIEW];\n if (getIsParent()) {\n setIsNotParent();\n } else {\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent !;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n\n ngDevMode && assertNodeType(previousOrParentTNode, TNodeType.ElementContainer);\n const currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n\n registerPostOrderHooks(tView, previousOrParentTNode);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {assertLContainerOrUndefined} from '../assert';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {RenderFlags} from '../interfaces/definition';\nimport {TContainerNode, TNodeType} from '../interfaces/node';\nimport {FLAGS, LView, LViewFlags, PARENT, QUERIES, TVIEW, TView, T_HOST} from '../interfaces/view';\nimport {assertNodeType} from '../node_assert';\nimport {insertView, removeView} from '../node_manipulation';\nimport {enterView, getIsParent, getLView, getPreviousOrParentTNode, isCreationMode, leaveView, setIsParent, setPreviousOrParentTNode} from '../state';\nimport {resetPreOrderHookFlags} from '../util/view_utils';\nimport {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews} from './shared';\n\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n *\n * @codeGenApi\n */\nexport function ɵɵembeddedViewStart(\n viewBlockId: number, consts: number, vars: number): RenderFlags {\n const lView = getLView();\n const previousOrParentTNode = getPreviousOrParentTNode();\n // The previous node can be a view node if we are processing an inline for loop\n const containerTNode = previousOrParentTNode.type === TNodeType.View ?\n previousOrParentTNode.parent ! :\n previousOrParentTNode;\n const lContainer = lView[containerTNode.index] as LContainer;\n\n ngDevMode && assertNodeType(containerTNode, TNodeType.Container);\n let viewToRender = scanForView(lContainer, lContainer[ACTIVE_INDEX] !, viewBlockId);\n\n if (viewToRender) {\n setIsParent();\n enterView(viewToRender, viewToRender[TVIEW].node);\n } else {\n // When we create a new LView, we always reset the state of the instructions.\n viewToRender = createLView(\n lView,\n getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode as TContainerNode), null,\n LViewFlags.CheckAlways, null, null);\n\n if (lContainer[QUERIES]) {\n viewToRender[QUERIES] = lContainer[QUERIES] !.createView();\n }\n\n const tParentNode = getIsParent() ? previousOrParentTNode :\n previousOrParentTNode && previousOrParentTNode.parent;\n assignTViewNodeToLView(viewToRender[TVIEW], tParentNode, viewBlockId, viewToRender);\n enterView(viewToRender, viewToRender[TVIEW].node);\n }\n if (lContainer) {\n if (isCreationMode(viewToRender)) {\n // it is a new view, insert it into collection of views for a given container\n insertView(viewToRender, lContainer, lContainer[ACTIVE_INDEX] !);\n }\n lContainer[ACTIVE_INDEX] !++;\n }\n return isCreationMode(viewToRender) ? RenderFlags.Create | RenderFlags.Update :\n RenderFlags.Update;\n}\n\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view block must create or retrieve its own TView. Otherwise, the embedded view's\n * static data for a particular node would overwrite the static data for a node in the view above\n * it with the same index (since it's in the same template).\n *\n * @param viewIndex The index of the TView in TNode.tViews\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param vars The number of bindings and pure function bindings in this template\n * @param container The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(\n viewIndex: number, consts: number, vars: number, parent: TContainerNode): TView {\n const tView = getLView()[TVIEW];\n ngDevMode && assertNodeType(parent, TNodeType.Container);\n const containerTViews = parent.tViews as TView[];\n ngDevMode && assertDefined(containerTViews, 'TView expected');\n ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');\n if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {\n containerTViews[viewIndex] = createTView(\n viewIndex, null, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n return containerTViews[viewIndex];\n}\n\n\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param lContainer to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n */\nfunction scanForView(lContainer: LContainer, startIdx: number, viewBlockId: number): LView|null {\n for (let i = startIdx + CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const viewAtPositionId = lContainer[i][TVIEW].id;\n if (viewAtPositionId === viewBlockId) {\n return lContainer[i];\n } else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(lContainer, i - CONTAINER_HEADER_OFFSET);\n } else {\n // found a view with id greater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the searchdef.cont here\n break;\n }\n }\n return null;\n}\n\n/**\n * Marks the end of an embedded view.\n *\n * @codeGenApi\n */\nexport function ɵɵembeddedViewEnd(): void {\n const lView = getLView();\n const viewHost = lView[T_HOST];\n\n if (isCreationMode(lView)) {\n refreshDescendantViews(lView); // creation mode pass\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n }\n resetPreOrderHookFlags(lView);\n refreshDescendantViews(lView); // update mode pass\n const lContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainerOrUndefined(lContainer);\n // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block\n // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to\n // an error being thrown.\n leaveView(lContainer[PARENT] !, /* safeToRunHooks */ true);\n setPreviousOrParentTNode(viewHost !, false);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise(obj: any): obj is Promise<any> {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n */\nexport function isObservable(obj: any | Observable<any>): obj is Observable<any> {\n // TODO: use isObservable once we update pass rxjs 6.1\n // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03\n return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {assertDataInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {EMPTY_OBJ} from '../empty';\nimport {PropertyAliasValue, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, RElement, Renderer3, isProceduralRenderer} from '../interfaces/renderer';\nimport {CLEANUP, FLAGS, LView, LViewFlags, RENDERER, TVIEW} from '../interfaces/view';\nimport {assertNodeOfPossibleTypes} from '../node_assert';\nimport {getLView, getPreviousOrParentTNode} from '../state';\nimport {getComponentViewByIndex, getNativeByTNode, hasDirectives, unwrapRNode} from '../util/view_utils';\nimport {BindingDirection, generatePropertyAliases, getCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver): void {\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);\n}\n\n/**\n* Registers a synthetic host listener (e.g. `(@foo.start)`) on a component.\n*\n* This instruction is for compatibility purposes and is designed to ensure that a\n* synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n* in the component's renderer. Normally all host listeners are evaluated with the\n* parent component's renderer, but, in the case of animation @triggers, they need\n* to be evaluated with the sub component's renderer (because that's where the\n* animation triggers are defined).\n*\n* Do not use this instruction as a replacement for `listener`. This instruction\n* only exists to ensure compatibility with the ViewEngine's host binding behavior.\n*\n* @param eventName Name of the event\n* @param listenerFn The function to be called when event emits\n* @param useCapture Whether or not to use capture in event listener\n* @param eventTargetResolver Function that returns global target information in case this listener\n* should be attached to a global object like window, document or body\n *\n * @codeGenApi\n*/\nexport function ɵɵcomponentHostSyntheticListener<T>(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver): void {\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\n const tView = lView[TVIEW];\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP] !;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nfunction listenerInternal(\n eventName: string, listenerFn: (e?: any) => any, useCapture = false,\n eventTargetResolver?: GlobalTargetResolver,\n loadRendererFn?: ((tNode: TNode, lView: LView) => Renderer3) | null): void {\n const lView = getLView();\n const tNode = getPreviousOrParentTNode();\n const tView = lView[TVIEW];\n const firstTemplatePass = tView.firstTemplatePass;\n const tCleanup: false|any[] = firstTemplatePass && (tView.cleanup || (tView.cleanup = []));\n\n ngDevMode && assertNodeOfPossibleTypes(\n tNode, TNodeType.Element, TNodeType.Container, TNodeType.ElementContainer);\n\n let processOutputs = true;\n\n // add native event listener - applicable to elements only\n if (tNode.type === TNodeType.Element) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ as any;\n const target = resolved.target || native;\n const renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n const lCleanup = getCleanup(lView);\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target :\n tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && hasDirectives(tNode)) {\n existingListener = findExistingListener(lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener at the head of the coalesced listeners list.\n (<any>listenerFn).__ngNextListenerFn__ = (<any>existingListener).__ngNextListenerFn__;\n (<any>existingListener).__ngNextListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n // The first argument of `listen` function in Procedural Renderer is:\n // - either a target name (as a string) in case of global target (window, document, body)\n // - or element reference (in all other cases)\n listenerFn = wrapListener(tNode, lView, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n\n } else {\n listenerFn = wrapListener(tNode, lView, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n }\n\n // subscribe to directive outputs\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(tNode, BindingDirection.Output);\n }\n\n const outputs = tNode.outputs;\n let props: PropertyAliasValue|undefined;\n if (processOutputs && outputs && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n const lCleanup = getCleanup(lView);\n for (let i = 0; i < propsLength; i += 3) {\n const index = props[i] as number;\n ngDevMode && assertDataInRange(lView, index);\n const minifiedName = props[i + 2];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isObservable(output)) {\n throw new Error(\n `@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n }\n\n const subscription = output.subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView, listenerFn: (e?: any) => any, e: any): boolean {\n try {\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n handleError(lView, error);\n return false;\n }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n tNode: TNode, lView: LView, listenerFn: (e?: any) => any,\n wrapWithPreventDefault: boolean): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: Event) {\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView =\n tNode.flags & TNodeFlags.isComponent ? getComponentViewByIndex(tNode.index, lView) : lView;\n\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & LViewFlags.ManualOnPush) === 0) {\n markViewDirty(startView);\n }\n\n let result = executeListenerWithErrorHandling(lView, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n\n return result;\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {TAttributes, TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {TVIEW, T_HOST} from '../interfaces/view';\nimport {appendProjectedNodes} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, setIsNotParent} from '../state';\nimport {findComponentView} from '../util/view_traversal_utils';\nimport {getOrCreateTNode} from './shared';\n\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(tNode: TNode, projectionSlots: ProjectionSlots): number|\n null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode | null)[] = componentNode.projection =\n new Array(numProjectionSlots).fill(null);\n const tails: (TNode | null)[] = projectionHeads.slice();\n\n let componentChild: TNode|null = componentNode.child;\n\n while (componentChild !== null) {\n const slotIndex =\n projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex] !.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\nlet delayProjection = false;\nexport function setDelayProjection(value: boolean) {\n delayProjection = value;\n}\n\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n*/\nexport function ɵɵprojection(\n nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {\n const lView = getLView();\n const tProjectionNode = getOrCreateTNode(\n lView[TVIEW], lView[T_HOST], nodeIndex, TNodeType.Projection, null, attrs || null);\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n\n // `<ng-content>` has no content\n setIsNotParent();\n\n // We might need to delay the projection of nodes if they are in the middle of an i18n block\n if (!delayProjection) {\n // re-distribution of projectable nodes is stored on a component's view level\n appendProjectedNodes(lView, tProjectionNode, selectorIndex, findComponentView(lView));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, elementPropertyInternal} from './shared';\n\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009 {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string, prefix: string, v0: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n const interpolatedValue =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The a collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009 {\n const index = getSelectedIndex();\n\n const interpolatedValue = ɵɵinterpolationV(values);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDataInRange, assertDefined, assertEqual} from '../../util/assert';\nimport {TNodeType} from '../interfaces/node';\nimport {RText, isProceduralRenderer} from '../interfaces/renderer';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getLView, getSelectedIndex, setIsNotParent} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/misc_utils';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {bind} from './property';\nimport {getOrCreateTNode, textBindingInternal} from './shared';\n\n\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Value to write. This value will be stringified.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value?: any): void {\n const lView = getLView();\n ngDevMode && assertEqual(\n lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,\n 'text nodes should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n const textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);\n ngDevMode && ngDevMode.rendererSetText++;\n const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, TNodeType.Element, null, null);\n\n // Text nodes are self closing.\n setIsNotParent();\n appendChild(textNative, tNode, lView);\n}\n\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper interpolation(1-8) method\n *\n * @param value Stringified value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtextBinding<T>(value: T | NO_CHANGE): void {\n const lView = getLView();\n const index = getSelectedIndex();\n const bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n textBindingInternal(lView, index, renderStringify(bound));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV} from './interpolation';\nimport {TsickleIssue1009, textBindingInternal} from './shared';\n\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): TsickleIssue1009 {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated =\n ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated =\n ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The a collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): TsickleIssue1009 {\n const index = getSelectedIndex();\n const lView = getLView();\n const interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated as string);\n }\n return ɵɵtextInterpolateV;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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 './alloc_host_vars';\nexport * from './attribute';\nexport * from './attribute_interpolation';\nexport * from './change_detection';\nexport * from './container';\nexport * from './storage';\nexport * from './di';\nexport * from './element';\nexport * from './element_container';\nexport * from './embedded_view';\nexport * from './get_current_view';\nexport * from './interpolation';\nexport * from './listener';\nexport * from './namespace';\nexport * from './next_context';\nexport * from './projection';\nexport * from './property';\nexport * from './property_interpolation';\nexport * from './select';\nexport * from './styling';\nexport {styleSanitizer as ɵɵstyleSanitizer} from '../styling_next/instructions';\nexport * from './text';\nexport * from './text_interpolation';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport '../util/ng_dev_mode';\n\nimport {getLContext} from './context_discovery';\nimport {scheduleTick} from './instructions/shared';\nimport {ComponentInstance, DirectiveInstance, Player} from './interfaces/player';\nimport {RootContextFlags} from './interfaces/view';\nimport {addPlayerInternal, getOrCreatePlayerContext, getPlayerContext, getPlayersInternal, getStylingContextFromLView, throwInvalidRefError} from './styling/util';\nimport {getRootContext} from './util/view_traversal_utils';\n\n\n/**\n * Adds a player to an element, directive or component instance that will later be\n * animated once change detection has passed.\n *\n * When a player is added to a reference it will stay active until `player.destroy()`\n * is called. Once called then the player will be removed from the active players\n * present on the associated ref instance.\n *\n * To get a list of all the active players on an element see [getPlayers].\n *\n * @param ref The element, directive or component that the player will be placed on.\n * @param player The player that will be triggered to play once change detection has run.\n */\nexport function addPlayer(\n ref: ComponentInstance | DirectiveInstance | HTMLElement, player: Player): void {\n const context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return;\n }\n\n const element = context.native as HTMLElement;\n const lView = context.lView;\n const playerContext = getOrCreatePlayerContext(element, context) !;\n const rootContext = getRootContext(lView);\n addPlayerInternal(playerContext, rootContext, element, player, 0, ref);\n scheduleTick(rootContext, RootContextFlags.FlushPlayers);\n}\n\n/**\n * Returns a list of all the active players present on the provided ref instance (which can\n * be an instance of a directive, component or element).\n *\n * This function will only return players that have been added to the ref instance using\n * `addPlayer` or any players that are active through any template styling bindings\n * (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).\n *\n * @publicApi\n */\nexport function getPlayers(ref: ComponentInstance | DirectiveInstance | HTMLElement): Player[] {\n const context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return [];\n }\n\n const stylingContext = getStylingContextFromLView(context.nodeIndex, context.lView);\n const playerContext = stylingContext ? getPlayerContext(stylingContext) : null;\n return playerContext ? getPlayersInternal(playerContext) : [];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../../di/injector';\n\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext} from '../context_discovery';\nimport {NodeInjector} from '../di';\nimport {LContext} from '../interfaces/context';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {CLEANUP, CONTEXT, FLAGS, HOST, LView, LViewFlags, TVIEW} from '../interfaces/view';\nimport {stringifyForError} from './misc_utils';\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {unwrapRNode} from './view_utils';\n\n\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getComponent<T = {}>(element: Element): T|null {\n const context = loadLContextFromNode(element);\n\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n\n return context.component as T;\n}\n\n/**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\nexport function getContext<T = {}>(element: Element): T|null {\n const context = loadLContextFromNode(element) !;\n return context.lView[CONTEXT] as T;\n}\n\n/**\n * Returns the component instance associated with view which owns the DOM element (`null`\n * otherwise).\n *\n * @param element DOM element which is owned by an existing component's view.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getViewComponent(<child-comp>) instanceof MyApp).toBeTruthy();\n * expect(getViewComponent(<my-app>)).toEqual(null);\n * ```\n *\n * @publicApi\n */\nexport function getViewComponent<T = {}>(element: Element | {}): T|null {\n const context = loadLContext(element) !;\n let lView = context.lView;\n let parent: LView|null;\n ngDevMode && assertLView(lView);\n while (lView[HOST] === null && (parent = getLViewParent(lView) !)) {\n // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`\n lView = parent;\n }\n return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieve all root components.\n *\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getRootComponents(target: {}): any[] {\n return [...getRootContext(target).components];\n}\n\n/**\n * Retrieves an `Injector` associated with the element, component or directive.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getInjector(target: {}): Injector {\n const context = loadLContext(target);\n const tNode = context.lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, context.lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n * @publicApi\n */\nexport function getInjectionTokens(element: Element): any[] {\n const context = loadLContext(element, false);\n if (!context) return [];\n const lView = context.lView;\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex] as TNode;\n const providerTokens: any[] = [];\n const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n\n/**\n * Retrieves directives associated with a given DOM host element.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getDirectives(target: {}): Array<{}> {\n const context = loadLContext(target) !;\n\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n }\n\n return context.directives || [];\n}\n\n/**\n * Returns LContext associated with a target passed as an argument.\n * Throws if a given target doesn't have associated LContext.\n *\n */\nexport function loadLContext(target: {}): LContext;\nexport function loadLContext(target: {}, throwOnNotFound: false): LContext|null;\nexport function loadLContext(target: {}, throwOnNotFound: boolean = true): LContext|null {\n const context = getLContext(target);\n if (!context && throwOnNotFound) {\n throw new Error(\n ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` :\n 'Invalid ng target');\n }\n return context;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = loadLContext(target) !;\n\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param directive Component or Directive for which the host element should be retrieved.\n *\n * @publicApi\n */\nexport function getHostElement<T>(directive: T): Element {\n return getLContext(directive) !.native as never as Element;\n}\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nexport function getRenderedText(component: any): string {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n\nexport function loadLContextFromNode(node: Node): LContext {\n if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Node');\n return loadLContext(node) !;\n}\n\nexport interface Listener {\n name: string;\n element: Element;\n callback: (value: any) => any;\n useCapture: boolean|null;\n}\n\nexport function isBrowserEvents(listener: Listener): boolean {\n // Browser events are those which don't have `useCapture` as boolean.\n return typeof listener.useCapture === 'boolean';\n}\n\n\n/**\n * Retrieves a list of DOM listeners.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div (click)=\"doSomething()\">\n * </div>\n * </mp-app>\n *\n * expect(getListeners(<div>)).toEqual({\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * });\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @publicApi\n */\nexport function getListeners(element: Element): Listener[] {\n const lContext = loadLContextFromNode(element);\n const lView = lContext.lView;\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners: Listener[] = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name: string = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const useCapture = typeof useCaptureOrIndx === 'boolean' ?\n useCaptureOrIndx :\n (useCaptureOrIndx >= 0 ? false : null);\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture});\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @fileoverview\n * This file is the index file collecting all of the symbols published on the global.ng namespace.\n *\n * The reason why this file/module is separate global_utils.ts file is that we use this file\n * to generate a d.ts file containing all the published symbols that is then compared to the golden\n * file in the public_api_guard test.\n */\n\nexport {markDirty} from './instructions/all';\nexport {getPlayers} from './players';\nexport {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getRootComponents, getViewComponent} from './util/discovery_utils';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\n\nimport {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getPlayers, getRootComponents, getViewComponent, markDirty} from '../global_utils_api';\n\n\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --define=compile=aot\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getViewComponent', getViewComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('getPlayers', getPlayers);\n publishGlobalUtil('markDirty', markDirty);\n }\n}\n\nexport declare type GlobalDevModeContainer = {\n [GLOBAL_PUBLISH_EXPANDO_KEY]: {[fnName: string]: Function};\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil(name: string, fn: Function): void {\n const w = global as any as GlobalDevModeContainer;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// We are temporarily importing the existing viewEngine from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\nimport {Type} from '../core';\nimport {Injector} from '../di/injector';\nimport {Sanitizer} from '../sanitization/security';\nimport {assertDataInRange, assertEqual} from '../util/assert';\n\nimport {assertComponentType} from './assert';\nimport {getComponentDef} from './definition';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';\nimport {registerPostOrderHooks, registerPreOrderHooks} from './hooks';\nimport {CLEAN_PROMISE, addToViewTree, createLView, createTView, getOrCreateTNode, getOrCreateTView, initNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, queueComponentIndexForCheck, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {PlayerHandler} from './interfaces/player';\nimport {RElement, Renderer3, RendererFactory3, domRendererFactory3} from './interfaces/renderer';\nimport {CONTEXT, FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, RENDERER, RootContext, RootContextFlags, TVIEW} from './interfaces/view';\nimport {applyOnCreateInstructions} from './node_util';\nimport {enterView, getPreviousOrParentTNode, leaveView, resetComponentState, setActiveHostElement} from './state';\nimport {renderInitialClasses, renderInitialStyles} from './styling/class_and_style_bindings';\nimport {publishDefaultGlobalUtils} from './util/global_utils';\nimport {defaultScheduler, stringifyForError} from './util/misc_utils';\nimport {getRootContext} from './util/view_traversal_utils';\nimport {readPatchedLView, resetPreOrderHookFlags} from './util/view_utils';\n\n\n\n/** Options that control how the component should be bootstrapped. */\nexport interface CreateComponentOptions {\n /** Which renderer factory to use. */\n rendererFactory?: RendererFactory3;\n\n /** A custom sanitizer instance */\n sanitizer?: Sanitizer;\n\n /** A custom animation player handler */\n playerHandler?: PlayerHandler;\n\n /**\n * Host element on which the component will be bootstrapped. If not specified,\n * the component definition's `tag` is used to query the existing DOM for the\n * element to bootstrap.\n */\n host?: RElement|string;\n\n /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */\n injector?: Injector;\n\n /**\n * List of features to be applied to the created component. Features are simply\n * functions that decorate a component with a certain behavior.\n *\n * Typically, the features in this list are features that cannot be added to the\n * other features list in the component definition because they rely on other factors.\n *\n * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities\n * to root components in a tree-shakable way. It cannot be added to the component\n * features list because there's no way of knowing when the component will be used as\n * a root component.\n */\n hostFeatures?: HostFeature[];\n\n /**\n * A function which is used to schedule change detection work in the future.\n *\n * When marking components as dirty, it is necessary to schedule the work of\n * change detection in the future. This is done to coalesce multiple\n * {@link markDirty} calls into a single changed detection processing.\n *\n * The default value of the scheduler is the `requestAnimationFrame` function.\n *\n * It is also useful to override this function for testing purposes.\n */\n scheduler?: (work: () => void) => void;\n}\n\n/** See CreateComponentOptions.hostFeatures */\ntype HostFeature = (<T>(component: T, componentDef: ComponentDef<T>) => void);\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nexport const NULL_INJECTOR: Injector = {\n get: (token: any, notFoundValue?: any) => {\n throw new Error('NullInjector: Not found: ' + stringifyForError(token));\n }\n};\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nexport function renderComponent<T>(\n componentType: ComponentType<T>|\n Type<T>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n ,\n opts: CreateComponentOptions = {}): T {\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n\n // this is preemptively set to avoid having test and debug code accidentally\n // read data from a previous application state...\n setActiveHostElement(null);\n\n const rendererFactory = opts.rendererFactory || domRendererFactory3;\n const sanitizer = opts.sanitizer || null;\n const componentDef = getComponentDef<T>(componentType) !;\n if (componentDef.type != componentType) componentDef.type = componentType;\n\n // The first index of the first selector is the tag name.\n const componentTag = componentDef.selectors ![0] ![0] as string;\n const hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);\n const rootFlags = componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n\n const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n const rootView: LView = createLView(\n null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null,\n rendererFactory, renderer, undefined, opts.injector || null);\n\n const oldView = enterView(rootView, null);\n let component: T;\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n if (rendererFactory.begin) rendererFactory.begin();\n const componentView = createRootComponentView(\n hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(\n componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n\n addToViewTree(rootView, componentView);\n\n refreshDescendantViews(rootView); // creation mode pass\n rootView[FLAGS] &= ~LViewFlags.CreationMode;\n resetPreOrderHookFlags(rootView);\n refreshDescendantViews(rootView); // update mode pass\n safeToRunHooks = true;\n } finally {\n leaveView(oldView, safeToRunHooks);\n if (rendererFactory.end) rendererFactory.end();\n }\n\n return component;\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param renderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nexport function createRootComponentView(\n rNode: RElement | null, def: ComponentDef<any>, rootView: LView,\n rendererFactory: RendererFactory3, renderer: Renderer3, sanitizer?: Sanitizer | null): LView {\n resetComponentState();\n const tView = rootView[TVIEW];\n ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);\n rootView[0 + HEADER_OFFSET] = rNode;\n const tNode: TElementNode = getOrCreateTNode(tView, null, 0, TNodeType.Element, null, null);\n const componentView = createLView(\n rootView, getOrCreateTView(def), null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,\n rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);\n\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = TNodeFlags.isComponent;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n\n // Store component view at node index, with node as the HOST\n return rootView[HEADER_OFFSET] = componentView;\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nexport function createRootComponent<T>(\n componentView: LView, componentDef: ComponentDef<T>, rootView: LView, rootContext: RootContext,\n hostFeatures: HostFeature[] | null): any {\n const tView = rootView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n const component = instantiateRootComponent(tView, rootView, componentDef);\n\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n\n hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n componentDef.contentQueries(RenderFlags.Create, component, rootView.length - 1);\n }\n\n const rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass && componentDef.hostBindings) {\n const elementIndex = rootTNode.index - HEADER_OFFSET;\n setActiveHostElement(elementIndex);\n\n const expando = tView.expandoInstructions !;\n invokeHostBindingsInCreationMode(\n componentDef, expando, component, rootTNode, tView.firstTemplatePass);\n rootTNode.onElementCreationFns && applyOnCreateInstructions(rootTNode);\n\n setActiveHostElement(null);\n }\n\n if (rootTNode.stylingTemplate) {\n const native = componentView[HOST] !as RElement;\n renderInitialClasses(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n renderInitialStyles(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n }\n\n return component;\n}\n\n\nexport function createRootContext(\n scheduler?: (workFn: () => void) => void, playerHandler?: PlayerHandler|null): RootContext {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: RootContextFlags.Empty\n };\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\nexport function LifecycleHooksFeature(component: any, def: ComponentDef<any>): void {\n const rootTView = readPatchedLView(component) ![TVIEW];\n const dirIndex = rootTView.data.length - 1;\n\n registerPreOrderHooks(dirIndex, def, rootTView, -1, -1, -1);\n // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on\n // LNode).\n registerPostOrderHooks(\n rootTView, { directiveStart: dirIndex, directiveEnd: dirIndex + 1 } as TNode);\n}\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nexport function whenRendered(component: any): Promise<null> {\n return getRootContext(component).clean;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean { return this.firstChange; }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport interface SimpleChanges { [propName: string]: SimpleChange; }\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {EMPTY_OBJ} from '../empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\nconst PRIVATE_PREFIX = '__ngOnChanges_';\n\ntype OnChangesExpando = OnChanges & {\n __ngOnChanges_: SimpleChanges|null|undefined;\n // tslint:disable-next-line:no-any Can hold any value\n [key: string]: any;\n};\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature()]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n // This option ensures that the ngOnChanges lifecycle hook will be inherited\n // from superclasses (in InheritDefinitionFeature).\n (NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;\n return NgOnChangesFeatureImpl;\n}\n\nfunction NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>): void {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n definition.onChanges = wrapOnChanges();\n }\n}\n\nfunction wrapOnChanges() {\n return function wrapOnChangesHook_inPreviousChangesStorage(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore && simpleChangesStore.current;\n\n if (current) {\n const previous = simpleChangesStore !.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore !.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore !.current = null;\n this.ngOnChanges(current);\n }\n };\n}\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>, instance: T, value: any, publicName: string, privateName: string): void {\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n\n const declaredName = (this.declaredInputs as{[key: string]: string})[publicName];\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n\n (instance as any)[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null|NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges|null;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {fillProperties} from '../../util/property';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {adjustActiveDirectiveSuperClassDepthPosition} from '../state';\nimport {isComponentDef} from '../util/view_utils';\n\nimport {ɵɵNgOnChangesFeature} from './ng_onchanges_feature';\n\nfunction getSuperType(type: Type<any>): Type<any>&\n {ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {\n let superType = getSuperType(definition.type);\n\n while (superType) {\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngComponentDef || superType.ngDirectiveDef;\n } else {\n if (superType.ngComponentDef) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngDirectiveDef;\n }\n\n const baseDef = (superType as any).ngBaseDef;\n\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n if (baseDef || superDef) {\n const writeableDef = definition as any;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n }\n\n if (baseDef) {\n const baseViewQuery = baseDef.viewQuery;\n const baseContentQueries = baseDef.contentQueries;\n const baseHostBindings = baseDef.hostBindings;\n baseHostBindings && inheritHostBindings(definition, baseHostBindings);\n baseViewQuery && inheritViewQuery(definition, baseViewQuery);\n baseContentQueries && inheritContentQueries(definition, baseContentQueries);\n fillProperties(definition.inputs, baseDef.inputs);\n fillProperties(definition.declaredInputs, baseDef.declaredInputs);\n fillProperties(definition.outputs, baseDef.outputs);\n }\n\n if (superDef) {\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Inherit hooks\n // Assume super class inheritance feature has already run.\n definition.afterContentChecked =\n definition.afterContentChecked || superDef.afterContentChecked;\n definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n definition.doCheck = definition.doCheck || superDef.doCheck;\n definition.onDestroy = definition.onDestroy || superDef.onDestroy;\n definition.onInit = definition.onInit || superDef.onInit;\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (const feature of features) {\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n }\n }\n } else {\n // Even if we don't have a definition, check the type for the hooks and use those if need be\n const superPrototype = superType.prototype;\n if (superPrototype) {\n definition.afterContentChecked =\n definition.afterContentChecked || superPrototype.ngAfterContentChecked;\n definition.afterContentInit =\n definition.afterContentInit || superPrototype.ngAfterContentInit;\n definition.afterViewChecked =\n definition.afterViewChecked || superPrototype.ngAfterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superPrototype.ngAfterViewInit;\n definition.doCheck = definition.doCheck || superPrototype.ngDoCheck;\n definition.onDestroy = definition.onDestroy || superPrototype.ngOnDestroy;\n definition.onInit = definition.onInit || superPrototype.ngOnInit;\n\n if (superPrototype.ngOnChanges) {\n ɵɵNgOnChangesFeature()(definition);\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(\n definition: DirectiveDef<any>| ComponentDef<any>, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: DirectiveDef<any>| ComponentDef<any>,\n superContentQueries: ContentQueriesFunction<any>) {\n const prevContentQueries = definition.contentQueries;\n\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: DirectiveDef<any>| ComponentDef<any>,\n superHostBindings: HostBindingsFunction<any>) {\n const prevHostBindings = definition.hostBindings;\n // If the subclass does not have a host bindings function, we set the subclass host binding\n // function to be the superclass's (in this feature). We should check if they're the same here\n // to ensure we don't inherit it twice.\n if (superHostBindings !== prevHostBindings) {\n if (prevHostBindings) {\n // because inheritance is unknown during compile time, the runtime code\n // needs to be informed of the super-class depth so that instruction code\n // can distinguish one host bindings function from another. The reason why\n // relying on the directive uniqueId exclusively is not enough is because the\n // uniqueId value and the directive instance stay the same between hostBindings\n // calls throughout the directive inheritance chain. This means that without\n // a super-class depth value, there is no way to know whether a parent or\n // sub-class host bindings function is currently being executed.\n definition.hostBindings = (rf: RenderFlags, ctx: any, elementIndex: number) => {\n // The reason why we increment first and then decrement is so that parent\n // hostBindings calls have a higher id value compared to sub-class hostBindings\n // calls (this way the leaf directive is always at a super-class depth of 0).\n adjustActiveDirectiveSuperClassDepthPosition(1);\n try {\n superHostBindings(rf, ctx, elementIndex);\n } finally {\n adjustActiveDirectiveSuperClassDepthPosition(-1);\n }\n prevHostBindings(rf, ctx, elementIndex);\n };\n } else {\n definition.hostBindings = superHostBindings;\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getLView, getPreviousOrParentTNode} from './state';\nimport {isComponentDef} from './util/view_utils';\n\n\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>, providers: Provider[], viewProviders: Provider[]): void {\n const lView = getLView();\n const tView: TView = lView[TVIEW];\n if (tView.firstTemplatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider, tInjectables: TData, lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean, isViewProvider: boolean): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const lView = getLView();\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory: () => any = providerToFactory(provider);\n\n const tNode = getPreviousOrParentTNode();\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isClassProvider(provider) || isTypeProvider(provider)) {\n const prototype = ((provider as ClassProvider).useClass || provider).prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n\n if (ngOnDestroy) {\n const tView = lView[TVIEW];\n (tView.destroyHooks || (tView.destroyHooks = [])).push(tInjectables.length, ngOnDestroy);\n }\n }\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex);\n if (existingFactoryIndex == -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n lView, token);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n lView, token);\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n multiFactoryAdd(\n lInjectablesBlueprint ![isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex],\n providerFactory, !isViewProvider && isComponent);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders !++;\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): void {\n multiFactory.multi !.push(factory);\n if (isComponentProvider) {\n multiFactory.componentProviders !++;\n }\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode): any[] {\n return multiResolve(this.multi !, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode): any[] {\n const factories = this.multi !;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders !;\n const multiProviders = getNodeInjectable(tData, lData, this.providerFactory !.index !, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i] !as() => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any,\n index: number, isViewProvider: boolean, isComponent: boolean,\n f: () => any): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ngComponentDef = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * consts: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵselect(0);\n * ɵɵtextBinding(ctx.greeter.greet());\n * }\n * },\n * features: [ProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver =\n (def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\n };\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * The host or anchor [element](guide/glossary#element) for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The [host view](guide/glossary#view-tree) defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {propName: string, templateName: string}[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string, templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {NgModuleRef} from './ng_module_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(\n `No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n (error as any)[ERROR_COMPONENT] = component;\n return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n return (error as any)[ERROR_COMPONENT];\n}\n\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n throw noComponentFactoryError(component);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver();\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n\nexport class CodegenComponentFactoryResolver implements ComponentFactoryResolver {\n private _factories = new Map<any, ComponentFactory<any>>();\n\n constructor(\n factories: ComponentFactory<any>[], private _parent: ComponentFactoryResolver,\n private _ngModule: NgModuleRef<any>) {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n let factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n }\n}\n\nexport class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {\n readonly selector: string;\n readonly componentType: Type<any>;\n readonly ngContentSelectors: string[];\n readonly inputs: {propName: string, templateName: string}[];\n readonly outputs: {propName: string, templateName: string}[];\n\n constructor(private factory: ComponentFactory<C>, private ngModule: NgModuleRef<any>) {\n super();\n this.selector = factory.selector;\n this.componentType = factory.componentType;\n this.ngContentSelectors = factory.ngContentSelectors;\n this.inputs = factory.inputs;\n this.outputs = factory.outputs;\n }\n\n create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C> {\n return this.factory.create(\n injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the NgModule.\n */\n abstract get injector(): Injector;\n\n /**\n * The ComponentFactoryResolver to get hold of the ComponentFactories\n * declared in the `entryComponents` property of the module.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The NgModule instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Allows to register a callback that will be called when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n}\n\n/**\n * @publicApi\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector|null): NgModuleRef<T>;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {ViewContainerRef as viewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef} from '../linker/view_ref';\n\nimport {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn} from './instructions/shared';\nimport {TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {FLAGS, HOST, LView, LViewFlags, T_HOST} from './interfaces/view';\nimport {destroyLView, renderDetachView} from './node_manipulation';\nimport {findComponentView, getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode} from './util/view_utils';\n\n\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\nexport interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {}\n\nexport class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_InternalViewRef,\n viewEngine_ChangeDetectorRef_interface {\n private _appRef: ApplicationRef|null = null;\n private _viewContainerRef: viewEngine_ViewContainerRef|null = null;\n\n /**\n * @internal\n */\n public _tViewNode: TViewNode|null = null;\n\n /**\n * @internal\n */\n public _lView: LView;\n\n get rootNodes(): any[] {\n if (this._lView[HOST] == null) {\n const tView = this._lView[T_HOST] as TViewNode;\n return collectNativeNodes(this._lView, tView, []);\n }\n return [];\n }\n\n constructor(_lView: LView, private _context: T|null, private _componentIndex: number) {\n this._lView = _lView;\n }\n\n get context(): T { return this._context ? this._context : this._lookUpContext(); }\n\n get destroyed(): boolean {\n return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n const index = this._viewContainerRef.indexOf(this);\n\n if (index > -1) {\n this._viewContainerRef.detach(index);\n }\n\n this._viewContainerRef = null;\n }\n destroyLView(this._lView);\n }\n\n onDestroy(callback: Function) { storeCleanupFn(this._lView, callback); }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck(): void { markViewDirty(this._lView); }\n\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach(): void { this._lView[FLAGS] &= ~LViewFlags.Attached; }\n\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach(): void { this._lView[FLAGS] |= LViewFlags.Attached; }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n detectChanges(): void { detectChangesInternal(this._lView, this.context); }\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges(): void { checkNoChangesInternal(this._lView, this.context); }\n\n attachToViewContainerRef(vcRef: viewEngine_ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n private _lookUpContext(): T {\n return this._context = getLViewParent(this._lView) ![this._componentIndex] as T;\n }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n constructor(public _view: LView) { super(_view, null, -1); }\n\n detectChanges(): void { detectChangesInRootView(this._view); }\n\n checkNoChanges(): void { checkNoChangesInRootView(this._view); }\n\n get context(): T { return null !; }\n}\n\nfunction collectNativeNodes(lView: LView, parentTNode: TNode, result: any[]): any[] {\n let tNodeChild = parentTNode.child;\n\n while (tNodeChild) {\n const nativeNode = getNativeByTNode(tNodeChild, lView);\n nativeNode && result.push(nativeNode);\n if (tNodeChild.type === TNodeType.ElementContainer) {\n collectNativeNodes(lView, tNodeChild, result);\n } else if (tNodeChild.type === TNodeType.Projection) {\n const componentView = findComponentView(lView);\n const componentHost = componentView[T_HOST] as TElementNode;\n const parentView = getLViewParent(componentView);\n let currentProjectedNode: TNode|null =\n (componentHost.projection as(TNode | null)[])[tNodeChild.projection as number];\n\n while (currentProjectedNode && parentView) {\n result.push(getNativeByTNode(currentProjectedNode, parentView));\n currentProjectedNode = currentProjectedNode.next;\n }\n }\n tNodeChild = tNodeChild.next;\n }\n\n return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {Injector} from '../di/injector';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef as ViewEngine_ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, ViewRef as viewEngine_ViewRef} from '../linker/view_ref';\nimport {Renderer2} from '../render/api';\nimport {assertDefined, assertGreaterThan, assertLessThan} from '../util/assert';\n\nimport {NodeInjector, getParentInjectorLocation} from './di';\nimport {addToViewTree, createEmbeddedViewAndNode, createLContainer, renderEmbeddedTemplate} from './instructions/shared';\nimport {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer, VIEW_REFS} from './interfaces/container';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';\nimport {RComment, RElement, isProceduralRenderer} from './interfaces/renderer';\nimport {CONTEXT, LView, QUERIES, RENDERER, TView, T_HOST} from './interfaces/view';\nimport {assertNodeOfPossibleTypes} from './node_assert';\nimport {addRemoveViewFromContainer, appendChild, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode, removeView} from './node_manipulation';\nimport {getParentInjectorTNode} from './node_util';\nimport {getLView, getPreviousOrParentTNode} from './state';\nimport {getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNode, isComponent, isLContainer, isLView, isRootView, unwrapRNode, viewAttachedToContainer} from './util/view_utils';\nimport {ViewRef} from './view_ref';\n\n\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(ElementRefToken: typeof ViewEngine_ElementRef):\n ViewEngine_ElementRef {\n return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\nlet R3ElementRef: {new (native: RElement | RComment): ViewEngine_ElementRef};\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param ElementRefToken The ElementRef type\n * @param tNode The node for which you'd like an ElementRef\n * @param view The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(\n ElementRefToken: typeof ViewEngine_ElementRef, tNode: TNode,\n view: LView): ViewEngine_ElementRef {\n if (!R3ElementRef) {\n // TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug\n R3ElementRef = class ElementRef_ extends ElementRefToken {};\n }\n return new R3ElementRef(getNativeByTNode(tNode, view) as RElement);\n}\n\nlet R3TemplateRef: {\n new (\n _declarationParentView: LView, elementRef: ViewEngine_ElementRef, _tView: TView,\n _hostLContainer: LContainer, _injectorIndex: number): ViewEngine_TemplateRef<any>\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(\n TemplateRefToken: typeof ViewEngine_TemplateRef,\n ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_TemplateRef<T>|null {\n return createTemplateRef<T>(\n TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param TemplateRefToken The TemplateRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a TemplateRef\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance to use\n */\nexport function createTemplateRef<T>(\n TemplateRefToken: typeof ViewEngine_TemplateRef, ElementRefToken: typeof ViewEngine_ElementRef,\n hostTNode: TNode, hostView: LView): ViewEngine_TemplateRef<T>|null {\n if (!R3TemplateRef) {\n // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug\n R3TemplateRef = class TemplateRef_<T> extends TemplateRefToken<T> {\n constructor(\n private _declarationParentView: LView, readonly elementRef: ViewEngine_ElementRef,\n private _tView: TView, private _hostLContainer: LContainer,\n private _injectorIndex: number) {\n super();\n }\n\n createEmbeddedView(context: T, container?: LContainer, index?: number):\n viewEngine_EmbeddedViewRef<T> {\n const currentQueries = this._declarationParentView[QUERIES];\n // Query container may be missing if this view was created in a directive\n // constructor. Create it now to avoid losing results in embedded views.\n if (currentQueries && this._hostLContainer[QUERIES] == null) {\n this._hostLContainer[QUERIES] = currentQueries !.container();\n }\n const lView = createEmbeddedViewAndNode(\n this._tView, context, this._declarationParentView, this._hostLContainer[QUERIES],\n this._injectorIndex);\n if (container) {\n insertView(lView, container, index !);\n }\n renderEmbeddedTemplate(lView, this._tView, context);\n const viewRef = new ViewRef(lView, context, -1);\n viewRef._tViewNode = lView[T_HOST] as TViewNode;\n return viewRef;\n }\n };\n }\n\n if (hostTNode.type === TNodeType.Container) {\n const hostContainer: LContainer = hostView[hostTNode.index];\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(\n hostView, createElementRef(ElementRefToken, hostTNode, hostView), hostTNode.tViews as TView,\n hostContainer, hostTNode.injectorIndex);\n } else {\n return null;\n }\n}\n\nlet R3ViewContainerRef: {\n new (\n lContainer: LContainer, hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n hostView: LView): ViewEngine_ViewContainerRef\n};\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(\n ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n ElementRefToken: typeof ViewEngine_ElementRef): ViewEngine_ViewContainerRef {\n const previousTNode =\n getPreviousOrParentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n ViewContainerRefToken: typeof ViewEngine_ViewContainerRef,\n ElementRefToken: typeof ViewEngine_ElementRef,\n hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n hostView: LView): ViewEngine_ViewContainerRef {\n if (!R3ViewContainerRef) {\n // TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug\n R3ViewContainerRef = class ViewContainerRef_ extends ViewContainerRefToken {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n private _hostView: LView) {\n super();\n }\n\n get element(): ViewEngine_ElementRef {\n return createElementRef(ElementRefToken, this._hostTNode, this._hostView);\n }\n\n get injector(): Injector { return new NodeInjector(this._hostTNode, this._hostView); }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);\n const parentView = getParentInjectorView(parentLocation, this._hostView);\n const parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);\n\n return !hasParentInjector(parentLocation) || parentTNode == null ?\n new NodeInjector(null, this._hostView) :\n new NodeInjector(parentTNode, parentView);\n }\n\n clear(): void {\n while (this.length) {\n this.remove(0);\n }\n }\n\n get(index: number): viewEngine_ViewRef|null {\n return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS] ![index] || null;\n }\n\n get length(): number {\n // Note that if there are no views, the container\n // length will be smaller than the header offset.\n const viewAmount = this._lContainer.length - CONTAINER_HEADER_OFFSET;\n return viewAmount > 0 ? viewAmount : 0;\n }\n\n createEmbeddedView<C>(templateRef: ViewEngine_TemplateRef<C>, context?: C, index?: number):\n viewEngine_EmbeddedViewRef<C> {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index);\n const viewRef = (templateRef as any)\n .createEmbeddedView(context || <any>{}, this._lContainer, adjustedIdx);\n (viewRef as ViewRef<any>).attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 0, viewRef);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: viewEngine_ComponentFactory<C>, index?: number|undefined,\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n ngModuleRef?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {\n ngModuleRef = contextInjector.get(viewEngine_NgModuleRef, null);\n }\n\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: viewEngine_ViewRef, index?: number): viewEngine_ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n this.allocateContainerIfNeeded();\n const lView = (viewRef as ViewRef<any>)._lView !;\n const adjustedIdx = this._adjustIndex(index);\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, fall back to move() so we clean up\n // references appropriately.\n return this.move(viewRef, adjustedIdx);\n }\n\n insertView(lView, this._lContainer, adjustedIdx);\n\n const beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n addRemoveViewFromContainer(lView, true, beforeNode);\n\n (viewRef as ViewRef<any>).attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 0, viewRef);\n\n return viewRef;\n }\n\n move(viewRef: viewEngine_ViewRef, newIndex: number): viewEngine_ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const index = this.indexOf(viewRef);\n if (index !== -1) this.detach(index);\n this.insert(viewRef, newIndex);\n return viewRef;\n }\n\n indexOf(viewRef: viewEngine_ViewRef): number {\n return this._lContainer[VIEW_REFS] !== null ?\n this._lContainer[VIEW_REFS] !.indexOf(viewRef) :\n 0;\n }\n\n remove(index?: number): void {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainer, adjustedIdx);\n this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 1);\n }\n\n detach(index?: number): viewEngine_ViewRef|null {\n this.allocateContainerIfNeeded();\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n const wasDetached = view && this._lContainer[VIEW_REFS] !.splice(adjustedIdx, 1)[0] != null;\n return wasDetached ? new ViewRef(view !, view ![CONTEXT], -1) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n\n private allocateContainerIfNeeded(): void {\n if (this._lContainer[VIEW_REFS] === null) {\n this._lContainer[VIEW_REFS] = [];\n }\n }\n };\n }\n\n ngDevMode && assertNodeOfPossibleTypes(\n hostTNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);\n\n let lContainer: LContainer;\n const slotValue = hostView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n lContainer[ACTIVE_INDEX] = -1;\n } else {\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n if (hostTNode.type === TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');\n }\n\n // A container can be created on the root (topmost / bootstrapped) component and in this case we\n // can't use LTree to insert container's marker node (both parent of a comment node and the\n // commend node itself is located outside of elements hold by LTree). In this specific case we\n // use low-level DOM manipulation to insert container's marker (comment) node.\n if (isRootView(hostView)) {\n const renderer = hostView[RENDERER];\n const hostNative = getNativeByTNode(hostTNode, hostView) !;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer, parentOfHostNative !, commentNode, nativeNextSibling(renderer, hostNative));\n } else {\n appendChild(commentNode, hostTNode, hostView);\n }\n\n hostView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostView, commentNode, hostTNode, true);\n\n addToViewTree(hostView, lContainer);\n }\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n}\n\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(): ViewEngine_ChangeDetectorRef {\n return createViewRef(getPreviousOrParentTNode(), getLView(), null);\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param hostTNode The node that is requesting a ChangeDetectorRef\n * @param hostView The view to which the node belongs\n * @param context The context for this change detector ref\n * @returns The ChangeDetectorRef to use\n */\nexport function createViewRef(\n hostTNode: TNode, hostView: LView, context: any): ViewEngine_ChangeDetectorRef {\n if (isComponent(hostTNode)) {\n const componentIndex = hostTNode.directiveStart;\n const componentView = getComponentViewByIndex(hostTNode.index, hostView);\n return new ViewRef(componentView, context, componentIndex);\n } else if (\n hostTNode.type === TNodeType.Element || hostTNode.type === TNodeType.Container ||\n hostTNode.type === TNodeType.ElementContainer) {\n const hostComponentView = findComponentView(hostView);\n return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);\n }\n return null !;\n}\n\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(view: LView): Renderer2 {\n const renderer = view[RENDERER];\n if (isProceduralRenderer(renderer)) {\n return renderer as Renderer2;\n } else {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getPreviousOrParentTNode();\n const nodeAtIndex = getComponentViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function noop(...args: any[]): any {\n // Do nothing.\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectElementRef as render3InjectElementRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * The underlying native element or `null` if direct access to native elements is not supported\n * (e.g. when the application runs in a web worker).\n *\n * <div class=\"callout is-critical\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. Alternatively you can take a look at {@link\n * Renderer2}\n * which provides API that can safely be used even when direct access to native elements is not\n * supported.\n * </p>\n * <p>\n * Relying on direct DOM access creates tight coupling between your application and rendering\n * layers which will make it impossible to separate the two and deploy your application into a\n * web worker.\n * </p>\n * </div>\n *\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) { this.nativeElement = nativeElement; }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);\n}\n\nexport const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = render3InjectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY: typeof render3InjectElementRef =\n SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {injectRenderer2 as render3InjectRenderer2} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\n\n\n/**\n * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n * @publicApi\n */\nexport class RenderComponentType {\n constructor(\n public id: string, public templateUrl: string, public slotCount: number,\n public encapsulation: ViewEncapsulation, public styles: Array<string|any[]>,\n public animations: any) {}\n}\n\n/**\n * @deprecated Debug info is handled internally in the view engine now.\n */\nexport abstract class RenderDebugInfo {\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get source(): string;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nexport interface DirectRenderer {\n remove(node: any): void;\n appendChild(node: any, parent: any): void;\n insertBefore(node: any, refNode: any): void;\n nextSibling(node: any): any;\n parentElement(node: any): any;\n}\n\n/**\n * @deprecated Use the `Renderer2` instead.\n * @publicApi\n */\nexport abstract class Renderer {\n abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any;\n\n abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any;\n\n abstract createViewRoot(hostElement: any): any;\n\n abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any;\n\n abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any;\n\n abstract projectNodes(parentElement: any, nodes: any[]): void;\n\n abstract attachViewAfter(node: any, viewRootNodes: any[]): void;\n\n abstract detachView(viewRootNodes: any[]): void;\n\n abstract destroyView(hostElement: any, viewAllNodes: any[]): void;\n\n abstract listen(renderElement: any, name: string, callback: Function): Function;\n\n abstract listenGlobal(target: string, name: string, callback: Function): Function;\n\n abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;\n\n abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue?: string):\n void;\n\n /**\n * Used only in debug mode to serialize property changes to dom nodes as attributes.\n */\n abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string):\n void;\n\n abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;\n\n abstract setElementStyle(renderElement: any, styleName: string, styleValue?: string): void;\n\n abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;\n\n abstract setText(renderNode: any, text: string): void;\n\n abstract animate(\n element: any, startingStyles: any, keyframes: any[], duration: number, delay: number,\n easing: string, previousPlayers?: any[]): any;\n}\n\nexport const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2Interceptor');\n\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n * @publicApi\n */\nexport abstract class RootRenderer {\n abstract renderComponent(componentType: RenderComponentType): Renderer;\n}\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: (string|any[])[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n}\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2|null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1\n}\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string|null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n // TODO(issue/24571): remove '!'.\n destroyNode !: ((node: any) => void) | null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node that should precede the new node.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * For WebWorkers, always returns true.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * For WebWorkers, always returns a value.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string|null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string|null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window'|'document'|'body'|any, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();\n}\n\n\nexport const SWITCH_RENDERER2_FACTORY__POST_R3__ = render3InjectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY: typeof render3InjectRenderer2 = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.1.1');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isListLikeIterable, iterateListLike} from '../change_detection_util';\n\nimport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, NgIterable, TrackByFunction} from './iterable_differs';\n\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object|null|undefined): boolean { return isListLikeIterable(obj); }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n public readonly collection !: V[] | Iterable<V>| null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V>|null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V>|null = null;\n private _previousItHead: IterableChangeRecord_<V>|null = null;\n private _itHead: IterableChangeRecord_<V>|null = null;\n private _itTail: IterableChangeRecord_<V>|null = null;\n private _additionsHead: IterableChangeRecord_<V>|null = null;\n private _additionsTail: IterableChangeRecord_<V>|null = null;\n private _movesHead: IterableChangeRecord_<V>|null = null;\n private _movesTail: IterableChangeRecord_<V>|null = null;\n private _removalsHead: IterableChangeRecord_<V>|null = null;\n private _removalsTail: IterableChangeRecord_<V>|null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V>|null = null;\n private _identityChangesTail: IterableChangeRecord_<V>|null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) { this._trackByFn = trackByFn || trackByIdentity; }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (item: IterableChangeRecord<V>, previousIndex: number|null, currentIndex: number|null) =>\n void) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[]|null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> = !nextRemove ||\n nextIt &&\n nextIt.currentIndex ! <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt ! :\n nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt !._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex ! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V>): DefaultIterableDiffer<V>|null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V>|null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as{length: number}).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as{length: number}).length = index;\n }\n\n this._truncate(record);\n (this as{collection: V[] | Iterable<V>}).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n }\n\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V>|null;\n let nextRecord: IterableChangeRecord_<V>|null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = nextRecord) {\n record.previousIndex = record.currentIndex;\n nextRecord = record._nextMoved;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(record: IterableChangeRecord_<V>|null, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V>|null;\n\n if (record === null) {\n previousRecord = this._itTail;\n } else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n\n // Attempt to see if we have seen the item before.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have seen this before, we need to move it forward in the collection.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // Never seen it, check evicted list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_<V>(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n }\n\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(record: IterableChangeRecord_<V>, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V>|null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev !, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record: IterableChangeRecord_<V>|null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V>|null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n } else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V>|null =\n prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n } else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number|null = null;\n previousIndex: number|null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _next: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V>|null = null;\n\n\n constructor(public item: V, public trackById: any) {}\n}\n\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V>|null = null;\n\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n } else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail !._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex !) &&\n looseIdentical(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n\n const prev: IterableChangeRecord_<V>|null = record._prevDup;\n const next: IterableChangeRecord_<V>|null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = this.map.get(key) !;\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n\n get isEmpty(): boolean { return this.map.size === 0; }\n\n clear() { this.map.clear(); }\n}\n\nfunction getPreviousIndex(\n item: any, addRemoveOffset: number, moveOffsets: number[] | null): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {looseIdentical} from '../../util/comparison';\nimport {stringify} from '../../util/stringify';\nimport {isJsObject} from '../change_detection_util';\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory} from './keyvalue_differs';\n\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean { return obj instanceof Map || isJsObject(obj); }\n\n create<K, V>(): KeyValueDiffer<K, V> { return new DefaultKeyValueDiffer<K, V>(); }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V>|null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V>|null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesTail: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V>|null = null;\n\n get isDirty(): boolean {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any>|{[k: string]: any}|null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\n `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\n\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map: Map<any, any>|{[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n\n this._removalsHead = insertBefore;\n\n for (let record: KeyValueChangeRecord_<K, V>|null = insertBefore; record !== null;\n record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\n\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V>|null,\n record: KeyValueChangeRecord_<K, V>): KeyValueChangeRecord_<K, V>|null {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key) !;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V>|null;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail !._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail !._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V>|{[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach(k => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V|null = null;\n currentValue: V|null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V>|null = null;\n\n constructor(public key: K) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T>| Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V>): IterableChanges<V>|null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn:\n (record: IterableChangeRecord<V>, previousIndex: number|null,\n currentIndex: number|null) => void): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed. */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number|null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number|null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * @deprecated v4.0.0 - Use IterableChangeRecord instead.\n * @publicApi\n */\nexport interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}\n\n/**\n * An optional function passed into the `NgForOf` directive that defines how to track\n * changes for items in an iterable.\n * The function takes the iteration index and item ID.\n * When supplied, Angular tracks changes by the return value of the function.\n *\n * @publicApi\n */\nexport interface TrackByFunction<T> { (index: number, item: T): any; }\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])\n });\n\n /**\n * @deprecated v4.0.0 - Should be private\n */\n factories: IterableDifferFactory[];\n constructor(factories: IterableDifferFactory[]) { this.factories = factories; }\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\n }\n\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers) => {\n if (!parent) {\n // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n // to\n // bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend IterableDiffers without a parent injector');\n }\n return IterableDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find(f => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new Error(\n `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V>|null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V>|null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V|null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V|null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ngInjectableDef = ɵɵdefineInjectable({\n token: KeyValueDiffers,\n providedIn: 'root',\n factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])\n });\n\n /**\n * @deprecated v4.0.0 - Should be private.\n */\n factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) { this.factories = factories; }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n if (!parent) {\n // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n // to bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n }\n return KeyValueDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find(f => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new Error(`Cannot find a differ supporting object '${kv}'`);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../render3/view_engine_compatibility';\n\n/**\n * Base class for Angular Views, provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occured.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach\n * detach}\n * to implement local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();\n}\n\n\n\nexport const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = render3InjectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = (...args: any[]): any => {};\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY: typeof render3InjectChangeDetectorRef =\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {WrappedValue, devModeEqual} from './change_detection_util';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy} from './constants';\nexport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nexport {DefaultIterableDiffer} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {\n CollectionChangeRecord,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n IterableDiffers,\n NgIterable,\n TrackByFunction\n} from\n'./differs/iterable_differs';\nexport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\n\n\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {injectTemplateRef as render3InjectTemplateRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and injection contexts of embedded views created from this `TemplateRef`\n * inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract get elementRef(): ElementRef;\n\n /**\n * Instantiates an embedded view based on this template,\n * and attaches it to the view container.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n () => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)\n}\n\nexport const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = render3InjectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY: typeof render3InjectTemplateRef =\n SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {injectViewContainerRef as render3InjectViewContainerRef} from '../render3/view_engine_compatibility';\nimport {noop} from '../util/noop';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only a single view container.\n *\n * Root elements of views attached to this container become siblings of the anchor element in\n * the rendered view.\n *\n * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef|null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory The factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes\n * @param ngModule\n *\n * @returns The new component instance, containing the host view.\n *\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef|null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n () => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef)\n}\n\nexport const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = render3InjectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY: typeof render3InjectViewContainerRef =\n SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getDebugContext} from '../errors';\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER} from '../util/errors';\n\nimport {DebugContext} from './types';\n\nexport function expressionChangedAfterItHasBeenCheckedError(\n context: DebugContext, oldValue: any, currValue: any, isFirstCheck: boolean): Error {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n if (isFirstCheck) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n return viewDebugError(msg, context);\n}\n\nexport function viewWrappedDebugError(err: any, context: DebugContext): Error {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\n\nexport function viewDebugError(msg: string, context: DebugContext): Error {\n const err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\n\nfunction _addDebugContext(err: Error, context: DebugContext) {\n (err as any)[ERROR_DEBUG_CONTEXT] = context;\n (err as any)[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nexport function isViewDebugError(err: Error): boolean {\n return !!getDebugContext(err);\n}\n\nexport function viewDestroyedError(action: string): Error {\n return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2, RendererFactory2, RendererType2} from '../render/api';\nimport {Sanitizer, SecurityContext} from '../sanitization/security';\n\n\n\n// -------------------------------------\n// Defs\n// -------------------------------------\n\n/**\n * Factory for ViewDefinitions/NgModuleDefinitions.\n * We use a function so we can reexeute it in case an error happens and use the given logger\n * function to log the error from the definition of the node, which is shown in all browser\n * logs.\n */\nexport interface DefinitionFactory<D extends Definition<any>> { (logger: NodeLogger): D; }\n\n/**\n * Function to call console.error at the right source location. This is an indirection\n * via another function as browser will log the location that actually called\n * `console.error`.\n */\nexport interface NodeLogger { (): () => void; }\n\nexport interface Definition<DF extends DefinitionFactory<any>> { factory: DF|null; }\n\nexport interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {\n providers: NgModuleProviderDef[];\n providersByKey: {[tokenKey: string]: NgModuleProviderDef};\n modules: any[];\n isRoot: boolean;\n}\n\nexport interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}\n\nexport interface ViewDefinition extends Definition<ViewDefinitionFactory> {\n flags: ViewFlags;\n updateDirectives: ViewUpdateFn;\n updateRenderer: ViewUpdateFn;\n handleEvent: ViewHandleEventFn;\n /**\n * Order: Depth first.\n * Especially providers are before elements / anchors.\n */\n nodes: NodeDef[];\n /** aggregated NodeFlags for all nodes **/\n nodeFlags: NodeFlags;\n rootNodeFlags: NodeFlags;\n lastRenderRootNode: NodeDef|null;\n bindingCount: number;\n outputCount: number;\n /**\n * Binary or of all query ids that are matched by one of the nodes.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n nodeMatchedQueries: number;\n}\n\nexport interface ViewDefinitionFactory extends DefinitionFactory<ViewDefinition> {}\n\n\nexport interface ViewUpdateFn { (check: NodeCheckFn, view: ViewData): void; }\n\n// helper functions to create an overloaded function type.\nexport interface NodeCheckFn {\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;\n\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;\n}\n\nexport const enum ArgumentType {Inline = 0, Dynamic = 1}\n\nexport interface ViewHandleEventFn {\n (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;\n}\n\n/**\n * Bitmask for ViewDefinition.flags.\n */\nexport const enum ViewFlags {\n None = 0,\n OnPush = 1 << 1,\n}\n\n/**\n * A node definition in the view.\n *\n * Note: We use one type for all nodes so that loops that loop over all nodes\n * of a ViewDefinition stay monomorphic!\n */\nexport interface NodeDef {\n flags: NodeFlags;\n // Index of the node in view data and view definition (those are the same)\n nodeIndex: number;\n // Index of the node in the check functions\n // Differ from nodeIndex when nodes are added or removed at runtime (ie after compilation)\n checkIndex: number;\n parent: NodeDef|null;\n renderParent: NodeDef|null;\n /** this is checked against NgContentDef.index to find matched nodes */\n ngContentIndex: number|null;\n /** number of transitive children */\n childCount: number;\n /** aggregated NodeFlags for all transitive children (does not include self) **/\n childFlags: NodeFlags;\n /** aggregated NodeFlags for all direct children (does not include self) **/\n directChildFlags: NodeFlags;\n\n bindingIndex: number;\n bindings: BindingDef[];\n bindingFlags: BindingFlags;\n outputIndex: number;\n outputs: OutputDef[];\n /**\n * references that the user placed on the element\n */\n references: {[refId: string]: QueryValueType};\n /**\n * ids and value types of all queries that are matched by this node.\n */\n matchedQueries: {[queryId: number]: QueryValueType};\n /** Binary or of all matched query ids of this node. */\n matchedQueryIds: number;\n /**\n * Binary or of all query ids that are matched by one of the children.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n childMatchedQueries: number;\n element: ElementDef|null;\n provider: ProviderDef|null;\n text: TextDef|null;\n query: QueryDef|null;\n ngContent: NgContentDef|null;\n}\n\n/**\n * Bitmask for NodeDef.flags.\n * Naming convention:\n * - `Type...`: flags that are mutually exclusive\n * - `Cat...`: union of multiple `Type...` (short for category).\n */\nexport const enum NodeFlags {\n None = 0,\n TypeElement = 1 << 0,\n TypeText = 1 << 1,\n ProjectedTemplate = 1 << 2,\n CatRenderNode = TypeElement | TypeText,\n TypeNgContent = 1 << 3,\n TypePipe = 1 << 4,\n TypePureArray = 1 << 5,\n TypePureObject = 1 << 6,\n TypePurePipe = 1 << 7,\n CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n TypeValueProvider = 1 << 8,\n TypeClassProvider = 1 << 9,\n TypeFactoryProvider = 1 << 10,\n TypeUseExistingProvider = 1 << 11,\n LazyProvider = 1 << 12,\n PrivateProvider = 1 << 13,\n TypeDirective = 1 << 14,\n Component = 1 << 15,\n CatProviderNoDirective =\n TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n CatProvider = CatProviderNoDirective | TypeDirective,\n OnInit = 1 << 16,\n OnDestroy = 1 << 17,\n DoCheck = 1 << 18,\n OnChanges = 1 << 19,\n AfterContentInit = 1 << 20,\n AfterContentChecked = 1 << 21,\n AfterViewInit = 1 << 22,\n AfterViewChecked = 1 << 23,\n EmbeddedViews = 1 << 24,\n ComponentView = 1 << 25,\n TypeContentQuery = 1 << 26,\n TypeViewQuery = 1 << 27,\n StaticQuery = 1 << 28,\n DynamicQuery = 1 << 29,\n TypeNgModule = 1 << 30,\n CatQuery = TypeContentQuery | TypeViewQuery,\n\n // mutually exclusive values...\n Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport interface BindingDef {\n flags: BindingFlags;\n ns: string|null;\n name: string|null;\n nonMinifiedName: string|null;\n securityContext: SecurityContext|null;\n suffix: string|null;\n}\n\nexport const enum BindingFlags {\n TypeElementAttribute = 1 << 0,\n TypeElementClass = 1 << 1,\n TypeElementStyle = 1 << 2,\n TypeProperty = 1 << 3,\n SyntheticProperty = 1 << 4,\n SyntheticHostProperty = 1 << 5,\n CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n // mutually exclusive values...\n Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport interface OutputDef {\n type: OutputType;\n target: 'window'|'document'|'body'|'component'|null;\n eventName: string;\n propName: string|null;\n}\n\nexport const enum OutputType {ElementOutput, DirectiveOutput}\n\nexport const enum QueryValueType {\n ElementRef = 0,\n RenderElement = 1,\n TemplateRef = 2,\n ViewContainerRef = 3,\n Provider = 4\n}\n\nexport interface ElementDef {\n // set to null for `<ng-container>`\n name: string|null;\n ns: string|null;\n /** ns, name, value */\n attrs: [string, string, string][]|null;\n template: ViewDefinition|null;\n componentProvider: NodeDef|null;\n componentRendererType: RendererType2|null;\n // closure to allow recursive components\n componentView: ViewDefinitionFactory|null;\n /**\n * visible public providers for DI in the view,\n * as see from this element. This does not include private providers.\n */\n publicProviders: {[tokenKey: string]: NodeDef}|null;\n /**\n * same as visiblePublicProviders, but also includes private providers\n * that are located on this element.\n */\n allProviders: {[tokenKey: string]: NodeDef}|null;\n handleEvent: ElementHandleEventFn|null;\n}\n\nexport interface ElementHandleEventFn { (view: ViewData, eventName: string, event: any): boolean; }\n\nexport interface ProviderDef {\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface NgModuleProviderDef {\n flags: NodeFlags;\n index: number;\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface DepDef {\n flags: DepFlags;\n token: any;\n tokenKey: string;\n}\n\n/**\n * Bitmask for DI flags\n */\nexport const enum DepFlags {\n None = 0,\n SkipSelf = 1 << 0,\n Optional = 1 << 1,\n Self = 1 << 2,\n Value = 1 << 3,\n}\n\nexport interface TextDef { prefix: string; }\n\nexport interface QueryDef {\n id: number;\n // variant of the id that can be used to check against NodeDef.matchedQueryIds, ...\n filterId: number;\n bindings: QueryBindingDef[];\n}\n\nexport interface QueryBindingDef {\n propName: string;\n bindingType: QueryBindingType;\n}\n\nexport const enum QueryBindingType {First = 0, All = 1}\n\nexport interface NgContentDef {\n /**\n * this index is checked against NodeDef.ngContentIndex to find the nodes\n * that are matched by this ng-content.\n * Note that a NodeDef with an ng-content can be reprojected, i.e.\n * have a ngContentIndex on its own.\n */\n index: number;\n}\n\n// -------------------------------------\n// Data\n// -------------------------------------\n\nexport interface NgModuleData extends Injector, NgModuleRef<any> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _def: NgModuleDefinition;\n _parent: Injector;\n _providers: any[];\n}\n\n/**\n * View instance data.\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ViewData {\n def: ViewDefinition;\n root: RootData;\n renderer: Renderer2;\n // index of component provider / anchor.\n parentNodeDef: NodeDef|null;\n parent: ViewData|null;\n viewContainerParent: ViewData|null;\n component: any;\n context: any;\n // Attention: Never loop over this, as this will\n // create a polymorphic usage site.\n // Instead: Always loop over ViewDefinition.nodes,\n // and call the right accessor (e.g. `elementData`) based on\n // the NodeType.\n nodes: {[key: number]: NodeData};\n state: ViewState;\n oldValues: any[];\n disposables: DisposableFn[]|null;\n initIndex: number;\n}\n\n/**\n * Bitmask of states\n */\nexport const enum ViewState {\n BeforeFirstCheck = 1 << 0,\n FirstCheck = 1 << 1,\n Attached = 1 << 2,\n ChecksEnabled = 1 << 3,\n IsProjectedView = 1 << 4,\n CheckProjectedView = 1 << 5,\n CheckProjectedViews = 1 << 6,\n Destroyed = 1 << 7,\n\n // InitState Uses 3 bits\n InitState_Mask = 7 << 8,\n InitState_BeforeInit = 0 << 8,\n InitState_CallingOnInit = 1 << 8,\n InitState_CallingAfterContentInit = 2 << 8,\n InitState_CallingAfterViewInit = 3 << 8,\n InitState_AfterInit = 4 << 8,\n\n CatDetectChanges = Attached | ChecksEnabled,\n CatInit = BeforeFirstCheck | CatDetectChanges | InitState_BeforeInit\n}\n\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nexport function shiftInitState(\n view: ViewData, priorInitState: ViewState, newInitState: ViewState): boolean {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n const state = view.state;\n const initState = state & ViewState.InitState_Mask;\n if (initState === priorInitState) {\n view.state = (state & ~ViewState.InitState_Mask) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nexport function shouldCallLifecycleInitHook(\n view: ViewData, initState: ViewState, index: number): boolean {\n if ((view.state & ViewState.InitState_Mask) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n\nexport interface DisposableFn { (): void; }\n\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nexport class NodeData { private __brand: any; }\n\n/**\n * Data for an instantiated NodeType.Text.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface TextData { renderText: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asTextData(view: ViewData, index: number): TextData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Element.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ElementData {\n renderElement: any;\n componentView: ViewData;\n viewContainer: ViewContainerData|null;\n template: TemplateData;\n}\n\nexport interface ViewContainerData extends ViewContainerRef {\n // Note: we are using the prefix _ as ViewContainerData is a ViewContainerRef and therefore\n // directly\n // exposed to the user.\n _embeddedViews: ViewData[];\n}\n\nexport interface TemplateData extends TemplateRef<any> {\n // views that have been created from the template\n // of this element,\n // but inserted into the embeddedViews of another element.\n // By default, this is undefined.\n // Note: we are using the prefix _ as TemplateData is a TemplateRef and therefore directly\n // exposed to the user.\n _projectedViews: ViewData[];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asElementData(view: ViewData, index: number): ElementData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Provider.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ProviderData { instance: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asProviderData(view: ViewData, index: number): ProviderData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.PureExpression.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface PureExpressionData { value: any; }\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asPureExpressionData(view: ViewData, index: number): PureExpressionData {\n return <any>view.nodes[index];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asQueryList(view: ViewData, index: number): QueryList<any> {\n return <any>view.nodes[index];\n}\n\nexport interface RootData {\n injector: Injector;\n ngModule: NgModuleRef<any>;\n projectableNodes: any[][];\n selectorOrNode: any;\n renderer: Renderer2;\n rendererFactory: RendererFactory2;\n errorHandler: ErrorHandler;\n sanitizer: Sanitizer;\n}\n\nexport abstract class DebugContext {\n abstract get view(): ViewData;\n abstract get nodeIndex(): number|null;\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get componentRenderElement(): any;\n abstract get renderNode(): any;\n abstract logError(console: Console, ...values: any[]): void;\n}\n\n// -------------------------------------\n// Other\n// -------------------------------------\n\nexport const enum CheckType {CheckAndUpdate, CheckNoChanges}\n\nexport interface ProviderOverride {\n token: any;\n flags: NodeFlags;\n value: any;\n deps: ([DepFlags, any]|any)[];\n deprecatedBehavior: boolean;\n}\n\nexport interface Services {\n setCurrentNode(view: ViewData, nodeIndex: number): void;\n createRootView(\n injector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData;\n createEmbeddedView(parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any):\n ViewData;\n createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData;\n createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any>;\n overrideProvider(override: ProviderOverride): void;\n overrideComponentView(compType: Type<any>, compFactory: ComponentFactory<any>): void;\n clearOverrides(): void;\n checkAndUpdateView(view: ViewData): void;\n checkNoChangesView(view: ViewData): void;\n destroyView(view: ViewData): void;\n resolveDep(\n view: ViewData, elDef: NodeDef|null, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue?: any): any;\n createDebugContext(view: ViewData, nodeIndex: number): DebugContext;\n handleEvent: ViewHandleEventFn;\n updateDirectives: (view: ViewData, checkType: CheckType) => void;\n updateRenderer: (view: ViewData, checkType: CheckType) => void;\n dirtyParentQueries: (view: ViewData) => void;\n}\n\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nexport const Services: Services = {\n setCurrentNode: undefined !,\n createRootView: undefined !,\n createEmbeddedView: undefined !,\n createComponentView: undefined !,\n createNgModuleRef: undefined !,\n overrideProvider: undefined !,\n overrideComponentView: undefined !,\n clearOverrides: undefined !,\n checkAndUpdateView: undefined !,\n checkNoChangesView: undefined !,\n destroyView: undefined !,\n resolveDep: undefined !,\n createDebugContext: undefined !,\n handleEvent: undefined !,\n updateDirectives: undefined !,\n updateRenderer: undefined !,\n dirtyParentQueries: undefined !,\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WrappedValue, devModeEqual} from '../change_detection/change_detection';\nimport {SOURCE} from '../di/injector_compatibility';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {looseIdentical} from '../util/comparison';\nimport {stringify} from '../util/stringify';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {BindingDef, BindingFlags, Definition, DefinitionFactory, DepDef, DepFlags, ElementData, NodeDef, NodeFlags, QueryValueType, Services, ViewData, ViewDefinition, ViewDefinitionFactory, ViewFlags, ViewState, asElementData, asTextData} from './types';\n\nexport const NOOP: any = () => {};\n\nconst _tokenKeyCache = new Map<any, string>();\n\nexport function tokenKey(token: any): string {\n let key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\n\nexport function unwrapValue(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\n\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createRendererType2(values: {\n styles: (string | any[])[],\n encapsulation: ViewEncapsulation,\n data: {[kind: string]: any[]}\n}): RendererType2 {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\n\nlet _renderCompCount = 0;\n\nexport function resolveRendererType2(type?: RendererType2 | null): RendererType2|null {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n const isFilled =\n ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = `c${_renderCompCount++}`;\n } else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\n\nexport function checkBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n const oldValues = view.oldValues;\n if ((view.state & ViewState.FirstCheck) ||\n !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\n\nexport function checkAndUpdateBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\n\nexport function checkBindingNoChanges(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & ViewState.BeforeFirstCheck) || !devModeEqual(oldValue, value)) {\n const bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`,\n `${bindingName}: ${value}`, (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function markParentViewsForCheck(view: ViewData) {\n let currView: ViewData|null = view;\n while (currView) {\n if (currView.def.flags & ViewFlags.OnPush) {\n currView.state |= ViewState.ChecksEnabled;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function markParentViewsForCheckProjectedViews(view: ViewData, endView: ViewData) {\n let currView: ViewData|null = view;\n while (currView && currView !== endView) {\n currView.state |= ViewState.CheckProjectedViews;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function dispatchEvent(\n view: ViewData, nodeIndex: number, eventName: string, event: any): boolean|undefined {\n try {\n const nodeDef = view.def.nodes[nodeIndex];\n const startView = nodeDef.flags & NodeFlags.ComponentView ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n } catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\n\nexport function declaredViewContainer(view: ViewData): ElementData|null {\n if (view.parent) {\n const parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef !.nodeIndex);\n }\n return null;\n}\n\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nexport function viewParentEl(view: ViewData): NodeDef|null {\n const parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef !.parent;\n } else {\n return null;\n }\n}\n\nexport function renderNode(view: ViewData, def: NodeDef): any {\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return asElementData(view, def.nodeIndex).renderElement;\n case NodeFlags.TypeText:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\n\nexport function elementEventFullName(target: string | null, name: string): string {\n return target ? `${target}:${name}` : name;\n}\n\nexport function isComponentView(view: ViewData): boolean {\n return !!view.parent && !!(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function isEmbeddedView(view: ViewData): boolean {\n return !!view.parent && !(view.parentNodeDef !.flags & NodeFlags.Component);\n}\n\nexport function filterQueryId(queryId: number): number {\n return 1 << (queryId % 32);\n}\n\nexport function splitMatchedQueriesDsl(\n matchedQueriesDsl: [string | number, QueryValueType][] | null): {\n matchedQueries: {[queryId: string]: QueryValueType},\n references: {[refId: string]: QueryValueType},\n matchedQueryIds: number\n} {\n const matchedQueries: {[queryId: string]: QueryValueType} = {};\n let matchedQueryIds = 0;\n const references: {[refId: string]: QueryValueType} = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(([queryId, valueType]) => {\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n } else {\n references[queryId] = valueType;\n }\n });\n }\n return {matchedQueries, references, matchedQueryIds};\n}\n\nexport function splitDepsDsl(deps: ([DepFlags, any] | any)[], sourceName?: string): DepDef[] {\n return deps.map(value => {\n let token: any;\n let flags: DepFlags;\n if (Array.isArray(value)) {\n [flags, token] = value;\n } else {\n flags = DepFlags.None;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, {value: sourceName, configurable: true});\n }\n return {flags, token, tokenKey: tokenKey(token)};\n });\n}\n\nexport function getParentRenderElement(view: ViewData, renderHost: any, def: NodeDef): any {\n let renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & NodeFlags.TypeElement) === 0 ||\n (renderParent.flags & NodeFlags.ComponentView) === 0 ||\n (renderParent.element !.componentRendererType &&\n renderParent.element !.componentRendererType !.encapsulation ===\n ViewEncapsulation.Native)) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent !.nodeIndex).renderElement;\n }\n } else {\n return renderHost;\n }\n}\n\nconst DEFINITION_CACHE = new WeakMap<any, Definition<any>>();\n\nexport function resolveDefinition<D extends Definition<any>>(factory: DefinitionFactory<D>): D {\n let value = DEFINITION_CACHE.get(factory) !as D;\n if (!value) {\n value = factory(() => NOOP);\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\n\nexport function rootRenderNodes(view: ViewData): any[] {\n const renderNodes: any[] = [];\n visitRootRenderNodes(view, RenderNodeAction.Collect, undefined, undefined, renderNodes);\n return renderNodes;\n}\n\nexport const enum RenderNodeAction {Collect, AppendChild, InsertBefore, RemoveChild}\n\nexport function visitRootRenderNodes(\n view: ViewData, action: RenderNodeAction, parentNode: any, nextSibling: any, target?: any[]) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === RenderNodeAction.RemoveChild) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode !));\n }\n visitSiblingRenderNodes(\n view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nexport function visitSiblingRenderNodes(\n view: ViewData, action: RenderNodeAction, startIndex: number, endIndex: number, parentNode: any,\n nextSibling: any, target?: any[]) {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (NodeFlags.TypeElement | NodeFlags.TypeText | NodeFlags.TypeNgContent)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\n\nexport function visitProjectedRenderNodes(\n view: ViewData, ngContentIndex: number, action: RenderNodeAction, parentNode: any,\n nextSibling: any, target?: any[]) {\n let compView: ViewData|null = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n const hostView = compView !.parent;\n const hostElDef = viewParentEl(compView !);\n const startIndex = hostElDef !.nodeIndex + 1;\n const endIndex = hostElDef !.nodeIndex + hostElDef !.childCount;\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = hostView !.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView !, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView !.parent) {\n // a root view\n const projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (let i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\n\nfunction visitRenderNode(\n view: ViewData, nodeDef: NodeDef, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n if (nodeDef.flags & NodeFlags.TypeNgContent) {\n visitProjectedRenderNodes(\n view, nodeDef.ngContent !.index, action, parentNode, nextSibling, target);\n } else {\n const rn = renderNode(view, nodeDef);\n if (action === RenderNodeAction.RemoveChild && (nodeDef.flags & NodeFlags.ComponentView) &&\n (nodeDef.bindingFlags & BindingFlags.CatSyntheticProperty)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticProperty)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticHostProperty)) {\n const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n } else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & NodeFlags.TypeElement && !nodeDef.element !.name) {\n visitSiblingRenderNodes(\n view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode,\n nextSibling, target);\n }\n }\n}\n\nfunction execRenderNodeAction(\n view: ViewData, renderNode: any, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n const renderer = view.renderer;\n switch (action) {\n case RenderNodeAction.AppendChild:\n renderer.appendChild(parentNode, renderNode);\n break;\n case RenderNodeAction.InsertBefore:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case RenderNodeAction.RemoveChild:\n renderer.removeChild(parentNode, renderNode);\n break;\n case RenderNodeAction.Collect:\n target !.push(renderNode);\n break;\n }\n}\n\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nexport function splitNamespace(name: string): string[] {\n if (name[0] === ':') {\n const match = name.match(NS_PREFIX_RE) !;\n return [match[1], match[2]];\n }\n return ['', name];\n}\n\nexport function calcBindingFlags(bindings: BindingDef[]): BindingFlags {\n let flags = 0;\n for (let i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\n\nexport function interpolate(valueCount: number, constAndInterp: string[]): string {\n let result = '';\n for (let i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\n\nexport function inlineInterpolate(\n valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any,\n c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any,\n c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(`Does not support more than 9 expressions`);\n }\n}\n\nfunction _toStringWithNull(v: any): string {\n return v != null ? v.toString() : '';\n}\n\nexport const EMPTY_ARRAY: any[] = [];\nexport const EMPTY_MAP: {[key: string]: any} = {};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {Injector} from '../di/injector';\nimport {INJECTOR, setCurrentInjector} from '../di/injector_compatibility';\nimport {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';\nimport {APP_ROOT} from '../di/scope';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {stringify} from '../util/stringify';\n\nimport {DepDef, DepFlags, NgModuleData, NgModuleDefinition, NgModuleProviderDef, NodeFlags} from './types';\nimport {splitDepsDsl, tokenKey} from './util';\n\nconst UNDEFINED_VALUE = new Object();\n\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\n\nexport function moduleProvideDef(\n flags: NodeFlags, token: any, value: any,\n deps: ([DepFlags, any] | any)[]): NgModuleProviderDef {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n const depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags, token, value\n };\n}\n\nexport function moduleDef(providers: NgModuleProviderDef[]): NgModuleDefinition {\n const providersByKey: {[key: string]: NgModuleProviderDef} = {};\n const modules = [];\n let isRoot: boolean = false;\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n if (provider.token === APP_ROOT && provider.value === true) {\n isRoot = true;\n }\n if (provider.flags & NodeFlags.TypeNgModule) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey,\n providers,\n modules,\n isRoot,\n };\n}\n\nexport function initNgModule(data: NgModuleData) {\n const def = data._def;\n const providers = data._providers = new Array(def.providers.length);\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (!(provDef.flags & NodeFlags.LazyProvider)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n}\n\nexport function resolveNgModuleDep(\n data: NgModuleData, depDef: DepDef, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const former = setCurrentInjector(data);\n try {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n if (depDef.flags & DepFlags.SkipSelf) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n const tokenKey = depDef.tokenKey;\n switch (tokenKey) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n const providerDef = data._def.providersByKey[tokenKey];\n let injectableDef: ɵɵInjectableDef<any>|null;\n if (providerDef) {\n let providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n } else if (\n (injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n const index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: NodeFlags.TypeFactoryProvider | NodeFlags.LazyProvider,\n value: injectableDef.factory,\n deps: [], index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (\n data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n } else if (depDef.flags & DepFlags.Self) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n } finally {\n setCurrentInjector(former);\n }\n}\n\nfunction moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDef<any>): boolean {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\n\nfunction _createProviderInstance(ngModule: NgModuleData, providerDef: NgModuleProviderDef): any {\n let injectable: any;\n switch (providerDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeFactoryProvider:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeUseExistingProvider:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case NodeFlags.TypeValueProvider:\n injectable = providerDef.value;\n break;\n }\n\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & NodeFlags.OnDestroy) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= NodeFlags.OnDestroy;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule: NgModuleData, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = new Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction _callFactory(ngModule: NgModuleData, factory: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\nexport function callNgModuleLifecycle(ngModule: NgModuleData, lifecycles: NodeFlags) {\n const def = ngModule._def;\n const destroyed = new Set<any>();\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (provDef.flags & NodeFlags.OnDestroy) {\n const instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n const onDestroy: Function|undefined = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementData, NodeDef, NodeFlags, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {RenderNodeAction, declaredViewContainer, isComponentView, renderNode, visitRootRenderNodes} from './util';\n\nexport function attachEmbeddedView(\n parentView: ViewData, elementData: ElementData, viewIndex: number | undefined | null,\n view: ViewData) {\n let embeddedViews = elementData.viewContainer !._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex !, view);\n attachProjectedView(elementData, view);\n\n Services.dirtyParentQueries(view);\n\n const prevView = viewIndex ! > 0 ? embeddedViews[viewIndex ! - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData: ElementData, view: ViewData) {\n const dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & ViewState.IsProjectedView) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= ViewState.IsProjectedView;\n let projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent !.def, view.parentNodeDef !);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef: ViewDefinition, nodeDef: NodeDef) {\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n return;\n }\n viewDef.nodeFlags |= NodeFlags.ProjectedTemplate;\n nodeDef.flags |= NodeFlags.ProjectedTemplate;\n let parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= NodeFlags.ProjectedTemplate;\n parentNodeDef = parentNodeDef.parent;\n }\n}\n\nexport function detachEmbeddedView(elementData: ElementData, viewIndex?: number): ViewData|null {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n const view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n\n return view;\n}\n\nexport function detachProjectedView(view: ViewData) {\n if (!(view.state & ViewState.IsProjectedView)) {\n return;\n }\n const dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n const projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\n\nexport function moveEmbeddedView(\n elementData: ElementData, oldViewIndex: number, newViewIndex: number): ViewData {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n const view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n\n return view;\n}\n\nfunction renderAttachEmbeddedView(\n elementData: ElementData, prevView: ViewData | null, view: ViewData) {\n const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode !) :\n elementData.renderElement;\n const parentNode = view.renderer.parentNode(prevRenderNode);\n const nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, RenderNodeAction.InsertBefore, parentNode, nextSibling, undefined);\n}\n\nexport function renderDetachView(view: ViewData) {\n visitRootRenderNodes(view, RenderNodeAction.RemoveChild, null, null, undefined);\n}\n\nfunction addToArray(arr: any[], index: number, value: any) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nfunction removeFromArray(arr: any[], index: number) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n arr.pop();\n } else {\n arr.splice(index, 1);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef} from '../linker/element_ref';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef, InternalViewRef, ViewRef} from '../linker/view_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {stringify} from '../util/stringify';\nimport {VERSION} from '../version';\n\nimport {callNgModuleLifecycle, initNgModule, resolveNgModuleDep} from './ng_module';\nimport {DepFlags, ElementData, NgModuleData, NgModuleDefinition, NodeDef, NodeFlags, Services, TemplateData, ViewContainerData, ViewData, ViewDefinitionFactory, ViewState, asElementData, asProviderData, asTextData} from './types';\nimport {markParentViewsForCheck, resolveDefinition, rootRenderNodes, splitNamespace, tokenKey, viewParentEl} from './util';\nimport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView, renderDetachView} from './view_attach';\n\nconst EMPTY_CONTEXT = new Object();\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createComponentFactory(\n selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory,\n inputs: {[propName: string]: string} | null, outputs: {[propName: string]: string},\n ngContentSelectors: string[]): ComponentFactory<any> {\n return new ComponentFactory_(\n selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nexport function getComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>):\n ViewDefinitionFactory {\n return (componentFactory as ComponentFactory_).viewDefFactory;\n}\n\nclass ComponentFactory_ extends ComponentFactory<any> {\n /**\n * @internal\n */\n viewDefFactory: ViewDefinitionFactory;\n\n constructor(\n public selector: string, public componentType: Type<any>,\n viewDefFactory: ViewDefinitionFactory, private _inputs: {[propName: string]: string}|null,\n private _outputs: {[propName: string]: string}, public ngContentSelectors: string[]) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n this.viewDefFactory = viewDefFactory;\n }\n\n get inputs() {\n const inputsArr: {propName: string, templateName: string}[] = [];\n const inputs = this._inputs !;\n for (let propName in inputs) {\n const templateName = inputs[propName];\n inputsArr.push({propName, templateName});\n }\n return inputsArr;\n }\n\n get outputs() {\n const outputsArr: {propName: string, templateName: string}[] = [];\n for (let propName in this._outputs) {\n const templateName = this._outputs[propName];\n outputsArr.push({propName, templateName});\n }\n return outputsArr;\n }\n\n /**\n * Creates a new component.\n */\n create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<any> {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n const viewDef = resolveDefinition(this.viewDefFactory);\n const componentNodeIndex = viewDef.nodes[0].element !.componentProvider !.nodeIndex;\n const view = Services.createRootView(\n injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n const component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n\n return new ComponentRef_(view, new ViewRef_(view), component);\n }\n}\n\nclass ComponentRef_ extends ComponentRef<any> {\n public readonly hostView: ViewRef;\n public readonly instance: any;\n public readonly changeDetectorRef: ChangeDetectorRef;\n private _elDef: NodeDef;\n constructor(private _view: ViewData, private _viewRef: ViewRef, private _component: any) {\n super();\n this._elDef = this._view.def.nodes[0];\n this.hostView = _viewRef;\n this.changeDetectorRef = _viewRef;\n this.instance = _component;\n }\n get location(): ElementRef {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n }\n get injector(): Injector { return new Injector_(this._view, this._elDef); }\n get componentType(): Type<any> { return <any>this._component.constructor; }\n\n destroy(): void { this._viewRef.destroy(); }\n onDestroy(callback: Function): void { this._viewRef.onDestroy(callback); }\n}\n\nexport function createViewContainerData(\n view: ViewData, elDef: NodeDef, elData: ElementData): ViewContainerData {\n return new ViewContainerRef_(view, elDef, elData);\n}\n\nclass ViewContainerRef_ implements ViewContainerData {\n /**\n * @internal\n */\n _embeddedViews: ViewData[] = [];\n constructor(private _view: ViewData, private _elDef: NodeDef, private _data: ElementData) {}\n\n get element(): ElementRef { return new ElementRef(this._data.renderElement); }\n\n get injector(): Injector { return new Injector_(this._view, this._elDef); }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n let view = this._view;\n let elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent !;\n }\n\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n }\n\n clear(): void {\n const len = this._embeddedViews.length;\n for (let i = len - 1; i >= 0; i--) {\n const view = detachEmbeddedView(this._data, i) !;\n Services.destroyView(view);\n }\n }\n\n get(index: number): ViewRef|null {\n const view = this._embeddedViews[index];\n if (view) {\n const ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n }\n\n get length(): number { return this._embeddedViews.length; }\n\n createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: ViewRef, index?: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n const viewRef_ = <ViewRef_>viewRef;\n const viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n }\n\n move(viewRef: ViewRef_, currentIndex: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n }\n\n indexOf(viewRef: ViewRef): number {\n return this._embeddedViews.indexOf((<ViewRef_>viewRef)._view);\n }\n\n remove(index?: number): void {\n const viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n }\n\n detach(index?: number): ViewRef|null {\n const view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n }\n}\n\nexport function createChangeDetectorRef(view: ViewData): ChangeDetectorRef {\n return new ViewRef_(view);\n}\n\nexport class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {\n /** @internal */\n _view: ViewData;\n private _viewContainerRef: ViewContainerRef|null;\n private _appRef: ApplicationRef|null;\n\n constructor(_view: ViewData) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n\n get rootNodes(): any[] { return rootRenderNodes(this._view); }\n\n get context() { return this._view.context; }\n\n get destroyed(): boolean { return (this._view.state & ViewState.Destroyed) !== 0; }\n\n markForCheck(): void { markParentViewsForCheck(this._view); }\n detach(): void { this._view.state &= ~ViewState.Attached; }\n detectChanges(): void {\n const fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n } finally {\n if (fs.end) {\n fs.end();\n }\n }\n }\n checkNoChanges(): void { Services.checkNoChangesView(this._view); }\n\n reattach(): void { this._view.state |= ViewState.Attached; }\n onDestroy(callback: Function) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(<any>callback);\n }\n\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n attachToViewContainerRef(vcRef: ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n}\n\nexport function createTemplateData(view: ViewData, def: NodeDef): TemplateData {\n return new TemplateRef_(view, def);\n}\n\nclass TemplateRef_ extends TemplateRef<any> implements TemplateData {\n /**\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _projectedViews !: ViewData[];\n\n constructor(private _parentView: ViewData, private _def: NodeDef) { super(); }\n\n createEmbeddedView(context: any): EmbeddedViewRef<any> {\n return new ViewRef_(Services.createEmbeddedView(\n this._parentView, this._def, this._def.element !.template !, context));\n }\n\n get elementRef(): ElementRef {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n }\n}\n\nexport function createInjector(view: ViewData, elDef: NodeDef): Injector {\n return new Injector_(view, elDef);\n}\n\nclass Injector_ implements Injector {\n constructor(private view: ViewData, private elDef: NodeDef|null) {}\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const allowPrivateServices =\n this.elDef ? (this.elDef.flags & NodeFlags.ComponentView) !== 0 : false;\n return Services.resolveDep(\n this.view, this.elDef, allowPrivateServices,\n {flags: DepFlags.None, token, tokenKey: tokenKey(token)}, notFoundValue);\n }\n}\n\nexport function nodeValue(view: ViewData, index: number): any {\n const def = view.def.nodes[index];\n if (def.flags & NodeFlags.TypeElement) {\n const elData = asElementData(view, def.nodeIndex);\n return def.element !.template ? elData.template : elData.renderElement;\n } else if (def.flags & NodeFlags.TypeText) {\n return asTextData(view, def.nodeIndex).renderText;\n } else if (def.flags & (NodeFlags.CatProvider | NodeFlags.TypePipe)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\n\nexport function createRendererV1(view: ViewData): RendererV1 {\n return new RendererAdapter(view.renderer);\n}\n\nclass RendererAdapter implements RendererV1 {\n constructor(private delegate: Renderer2) {}\n selectRootElement(selectorOrNode: string|Element): Element {\n return this.delegate.selectRootElement(selectorOrNode);\n }\n\n createElement(parent: Element|DocumentFragment, namespaceAndName: string): Element {\n const [ns, name] = splitNamespace(namespaceAndName);\n const el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n }\n\n createViewRoot(hostElement: Element): Element|DocumentFragment { return hostElement; }\n\n createTemplateAnchor(parentElement: Element|DocumentFragment): Comment {\n const comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n }\n\n createText(parentElement: Element|DocumentFragment, value: string): any {\n const node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n }\n\n projectNodes(parentElement: Element|DocumentFragment, nodes: Node[]) {\n for (let i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n }\n\n attachViewAfter(node: Node, viewRootNodes: Node[]) {\n const parentElement = this.delegate.parentNode(node);\n const nextSibling = this.delegate.nextSibling(node);\n for (let i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n }\n\n detachView(viewRootNodes: (Element|Text|Comment)[]) {\n for (let i = 0; i < viewRootNodes.length; i++) {\n const node = viewRootNodes[i];\n const parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n }\n\n destroyView(hostElement: Element|DocumentFragment, viewAllNodes: Node[]) {\n for (let i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode !(viewAllNodes[i]);\n }\n }\n\n listen(renderElement: any, name: string, callback: Function): Function {\n return this.delegate.listen(renderElement, name, <any>callback);\n }\n\n listenGlobal(target: string, name: string, callback: Function): Function {\n return this.delegate.listen(target, name, <any>callback);\n }\n\n setElementProperty(\n renderElement: Element|DocumentFragment, propertyName: string, propertyValue: any): void {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n }\n\n setElementAttribute(renderElement: Element, namespaceAndName: string, attributeValue?: string):\n void {\n const [ns, name] = splitNamespace(namespaceAndName);\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n } else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n }\n\n setBindingDebugInfo(renderElement: Element, propertyName: string, propertyValue: string): void {}\n\n setElementClass(renderElement: Element, className: string, isAdd: boolean): void {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n } else {\n this.delegate.removeClass(renderElement, className);\n }\n }\n\n setElementStyle(renderElement: HTMLElement, styleName: string, styleValue?: string): void {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n } else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n }\n\n invokeElementMethod(renderElement: Element, methodName: string, args: any[]): void {\n (renderElement as any)[methodName].apply(renderElement, args);\n }\n\n setText(renderNode: Text, text: string): void { this.delegate.setValue(renderNode, text); }\n\n animate(): any { throw new Error('Renderer.animate is no longer supported!'); }\n}\n\n\nexport function createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nclass NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {\n private _destroyListeners: (() => void)[] = [];\n private _destroyed: boolean = false;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _providers !: any[];\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _modules !: any[];\n\n readonly injector: Injector = this;\n\n constructor(\n private _moduleType: Type<any>, public _parent: Injector,\n public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {\n initNgModule(this);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n let flags = DepFlags.None;\n if (injectFlags & InjectFlags.SkipSelf) {\n flags |= DepFlags.SkipSelf;\n } else if (injectFlags & InjectFlags.Self) {\n flags |= DepFlags.Self;\n }\n return resolveNgModuleDep(\n this, {token: token, tokenKey: tokenKey(token), flags: flags}, notFoundValue);\n }\n\n get instance() { return this.get(this._moduleType); }\n\n get componentFactoryResolver() { return this.get(ComponentFactoryResolver); }\n\n destroy(): void {\n if (this._destroyed) {\n throw new Error(\n `The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, NodeFlags.OnDestroy);\n this._destroyListeners.forEach((listener) => listener());\n }\n\n onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, SimpleChange, SimpleChanges, WrappedValue} from '../change_detection/change_detection';\nimport {INJECTOR, Injector, resolveForwardRef} from '../di';\nimport {ElementRef} from '../linker/element_ref';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer as RendererV1, Renderer2} from '../render/api';\nimport {isObservable} from '../util/lang';\nimport {stringify} from '../util/stringify';\n\nimport {createChangeDetectorRef, createInjector, createRendererV1} from './refs';\nimport {BindingDef, BindingFlags, DepDef, DepFlags, NodeDef, NodeFlags, OutputDef, OutputType, ProviderData, QueryValueType, Services, ViewData, ViewFlags, ViewState, asElementData, asProviderData, shouldCallLifecycleInitHook} from './types';\nimport {calcBindingFlags, checkBinding, dispatchEvent, isComponentView, splitDepsDsl, splitMatchedQueriesDsl, tokenKey, viewParentEl} from './util';\n\nconst RendererV1TokenKey = tokenKey(RendererV1);\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\n\nexport function directiveDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueries: null | [string | number, QueryValueType][], childCount: number, ctor: any,\n deps: ([DepFlags, any] | any)[], props?: null | {[name: string]: [number, string]},\n outputs?: null | {[name: string]: string}): NodeDef {\n const bindings: BindingDef[] = [];\n if (props) {\n for (let prop in props) {\n const [bindingIndex, nonMinifiedName] = props[prop];\n bindings[bindingIndex] = {\n flags: BindingFlags.TypeProperty,\n name: prop, nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n const outputDefs: OutputDef[] = [];\n if (outputs) {\n for (let propName in outputs) {\n outputDefs.push(\n {type: OutputType.DirectiveOutput, propName, target: null, eventName: outputs[propName]});\n }\n }\n flags |= NodeFlags.TypeDirective;\n return _def(\n checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nexport function pipeDef(flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n flags |= NodeFlags.TypePipe;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nexport function providerDef(\n flags: NodeFlags, matchedQueries: null | [string | number, QueryValueType][], token: any,\n value: any, deps: ([DepFlags, any] | any)[]): NodeDef {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nexport function _def(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: [string | number, QueryValueType][] | null, childCount: number, token: any,\n value: any, deps: ([DepFlags, any] | any)[], bindings?: BindingDef[],\n outputs?: OutputDef[]): NodeDef {\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n\n const depDefs = splitDepsDsl(deps, stringify(token));\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references,\n ngContentIndex: -1, childCount, bindings,\n bindingFlags: calcBindingFlags(bindings), outputs,\n element: null,\n provider: {token, value, deps: depDefs},\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createProviderInstance(view: ViewData, def: NodeDef): any {\n return _createProviderInstance(view, def);\n}\n\nexport function createPipeInstance(view: ViewData, def: NodeDef): any {\n // deps are looked up from component.\n let compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n const allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(\n compView.parent !, viewParentEl(compView) !, allowPrivateServices, def.provider !.value,\n def.provider !.deps);\n}\n\nexport function createDirectiveInstance(view: ViewData, def: NodeDef): any {\n // components can see other private services, other directives can't.\n const allowPrivateServices = (def.flags & NodeFlags.Component) > 0;\n // directives are always eager and classes!\n const instance = createClass(\n view, def.parent !, allowPrivateServices, def.provider !.value, def.provider !.deps);\n if (def.outputs.length) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const outputObservable = instance[output.propName !];\n if (isObservable(outputObservable)) {\n const subscription = outputObservable.subscribe(\n eventHandlerClosure(view, def.parent !.nodeIndex, output.eventName));\n view.disposables ![def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n } else {\n throw new Error(\n `@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n }\n }\n }\n return instance;\n}\n\nfunction eventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\nexport function checkAndUpdateDirectiveInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined !;\n const bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nexport function checkAndUpdateDirectiveDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined !;\n for (let i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nfunction _createProviderInstance(view: ViewData, def: NodeDef): any {\n // private services can see other private services\n const allowPrivateServices = (def.flags & NodeFlags.PrivateProvider) > 0;\n const providerDef = def.provider;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n return createClass(\n view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n case NodeFlags.TypeFactoryProvider:\n return callFactory(\n view, def.parent !, allowPrivateServices, providerDef !.value, providerDef !.deps);\n case NodeFlags.TypeUseExistingProvider:\n return resolveDep(view, def.parent !, allowPrivateServices, providerDef !.deps[0]);\n case NodeFlags.TypeValueProvider:\n return providerDef !.value;\n }\n}\n\nfunction createClass(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = new Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction callFactory(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, factory: any,\n deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = Array(len);\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nexport function resolveDep(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n const startView = view;\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n const tokenKey = depDef.tokenKey;\n\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element !.componentView);\n }\n\n if (elDef && (depDef.flags & DepFlags.SkipSelf)) {\n allowPrivateServices = false;\n elDef = elDef.parent !;\n }\n\n let searchView: ViewData|null = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case RendererV1TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element !.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n let cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector(searchView, elDef);\n default:\n const providerDef =\n (allowPrivateServices ? elDef.element !.allProviders :\n elDef.element !.publicProviders) ![tokenKey];\n if (providerDef) {\n let providerData = asProviderData(searchView, providerDef.nodeIndex);\n if (!providerData) {\n providerData = {instance: _createProviderInstance(searchView, providerDef)};\n searchView.nodes[providerDef.nodeIndex] = providerData as any;\n }\n return providerData.instance;\n }\n }\n }\n\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView) !;\n searchView = searchView.parent !;\n\n if (depDef.flags & DepFlags.Self) {\n searchView = null;\n }\n }\n\n const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\n\nfunction findCompView(view: ViewData, elDef: NodeDef, allowPrivateServices: boolean) {\n let compView: ViewData;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n } else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\n\nfunction updateProp(\n view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,\n changes: SimpleChanges): SimpleChanges {\n if (def.flags & NodeFlags.Component) {\n const compView = asElementData(view, def.parent !.nodeIndex).componentView;\n if (compView.def.flags & ViewFlags.OnPush) {\n compView.state |= ViewState.ChecksEnabled;\n }\n }\n const binding = def.bindings[bindingIdx];\n const propName = binding.name !;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & NodeFlags.OnChanges) {\n changes = changes || {};\n const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n const binding = def.bindings[bindingIdx];\n changes[binding.nonMinifiedName !] =\n new SimpleChange(oldValue, value, (view.state & ViewState.FirstCheck) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nexport function callLifecycleHooksChildrenFirst(view: ViewData, lifecycles: NodeFlags) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n const nodes = view.def.nodes;\n let initIndex = 0;\n for (let i = 0; i < nodes.length; i++) {\n const nodeDef = nodes[i];\n let parent = nodeDef.parent;\n if (!parent && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent && (parent.flags & NodeFlags.TypeElement) &&\n i === parent.nodeIndex + parent.childCount) {\n // last child of an element\n if (parent.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n }\n parent = parent.parent;\n }\n }\n}\n\nfunction callElementProvidersLifecycles(\n view: ViewData, elDef: NodeDef, lifecycles: NodeFlags, initIndex: number): number {\n for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\n\nfunction callProviderLifecycles(\n view: ViewData, index: number, lifecycles: NodeFlags, initIndex: number) {\n const providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n const provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & NodeFlags.AfterContentInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterContentInit, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & NodeFlags.AfterContentChecked) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & NodeFlags.AfterViewInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterViewInit, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & NodeFlags.AfterViewChecked) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & NodeFlags.OnDestroy) {\n provider.ngOnDestroy();\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {ɵɵinject} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef as viewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider';\n\nimport {assertComponentType} from './assert';\nimport {LifecycleHooksFeature, createRootComponent, createRootComponentView, createRootContext} from './component';\nimport {getComponentDef} from './definition';\nimport {NodeInjector} from './di';\nimport {addToViewTree, assignTViewNodeToLView, createLView, createTView, elementCreate, locateHostElement, refreshDescendantViews} from './instructions/shared';\nimport {ComponentDef} from './interfaces/definition';\nimport {TContainerNode, TElementContainerNode, TElementNode} from './interfaces/node';\nimport {RNode, RendererFactory3, domRendererFactory3, isProceduralRenderer} from './interfaces/renderer';\nimport {LView, LViewFlags, RootContext, TVIEW} from './interfaces/view';\nimport {enterView, leaveView} from './state';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getTNode} from './util/view_utils';\nimport {createElementRef} from './view_engine_compatibility';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends viewEngine_ComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: viewEngine_NgModuleRef<any>) { super(); }\n\n resolveComponentFactory<T>(component: Type<T>): viewEngine_ComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component) !;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toRefArray(map: {[key: string]: string}): {propName: string; templateName: string;}[] {\n const array: {propName: string; templateName: string;}[] = [];\n for (let nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n const minified = map[nonMinified];\n array.push({propName: minified, templateName: nonMinified});\n }\n }\n return array;\n}\n\n/**\n * Default {@link RootContext} for all components rendered with {@link renderComponent}.\n */\nexport const ROOT_CONTEXT = new InjectionToken<RootContext>(\n 'ROOT_CONTEXT_TOKEN',\n {providedIn: 'root', factory: () => createRootContext(ɵɵinject(SCHEDULER))});\n\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nexport const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: () => defaultScheduler,\n});\n\nfunction createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector {\n return {\n get: <T>(token: Type<T>| InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T => {\n const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n}\n\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nexport class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {\n selector: string;\n componentType: Type<any>;\n ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n get inputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.inputs);\n }\n\n get outputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.outputs);\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>, private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n this.componentType = componentDef.type;\n this.selector = componentDef.selectors[0][0] as string;\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n\n create(\n injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n ngModule?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<T> {\n const isInternalRootView = rootSelectorOrNode === undefined;\n ngModule = ngModule || this.ngModule;\n\n const rootViewInjector =\n ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n\n const rendererFactory =\n rootViewInjector.get(RendererFactory2, domRendererFactory3) as RendererFactory3;\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const hostRNode = isInternalRootView ?\n elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef)) :\n locateHostElement(rendererFactory, rootSelectorOrNode);\n\n const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n\n // Check whether this Component needs to be isolated from other components, i.e. whether it\n // should be placed into its own (empty) root context or existing root context should be used.\n // Note: this is internal-only convention and might change in the future, so it should not be\n // relied upon externally.\n const isIsolated = typeof rootSelectorOrNode === 'string' &&\n /^#root-ng-internal-isolated-\\d+/.test(rootSelectorOrNode);\n\n const rootContext: RootContext = (isInternalRootView || isIsolated) ?\n createRootContext() :\n rootViewInjector.get(ROOT_CONTEXT);\n\n const renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);\n\n if (rootSelectorOrNode && hostRNode) {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProceduralRenderer(renderer) ?\n renderer.setAttribute(hostRNode, 'ng-version', VERSION.full) :\n hostRNode.setAttribute('ng-version', VERSION.full);\n }\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootLView = createLView(\n null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null,\n null, rendererFactory, renderer, sanitizer, rootViewInjector);\n\n // rootView is the parent when bootstrapping\n const oldLView = enterView(rootLView, null);\n\n let component: T;\n let tElementNode: TElementNode;\n\n // Will become true if the `try` block executes with no errors.\n let safeToRunHooks = false;\n try {\n const componentView = createRootComponentView(\n hostRNode, this.componentDef, rootLView, rendererFactory, renderer);\n\n tElementNode = getTNode(0, rootLView) as TElementNode;\n\n if (projectableNodes) {\n // projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n tElementNode.projection =\n projectableNodes.map((nodesforSlot: RNode[]) => { return Array.from(nodesforSlot); });\n }\n\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(\n componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n\n addToViewTree(rootLView, componentView);\n refreshDescendantViews(rootLView);\n safeToRunHooks = true;\n } finally {\n leaveView(oldLView, safeToRunHooks);\n }\n\n const componentRef = new ComponentRef(\n this.componentType, component,\n createElementRef(viewEngine_ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n\n if (isInternalRootView) {\n // The host element of the internal root view is attached to the component's host view node\n componentRef.hostView._tViewNode !.child = tElementNode;\n }\n return componentRef;\n }\n}\n\nconst componentFactoryResolver: ComponentFactoryResolver = new ComponentFactoryResolver();\n\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nexport function injectComponentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return componentFactoryResolver;\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends viewEngine_ComponentRef<T> {\n destroyCbs: (() => void)[]|null = [];\n instance: T;\n hostView: ViewRef<T>;\n changeDetectorRef: ViewEngine_ChangeDetectorRef;\n componentType: Type<T>;\n\n constructor(\n componentType: Type<T>, instance: T, public location: viewEngine_ElementRef,\n private _rootLView: LView,\n private _tNode: TElementNode|TContainerNode|TElementContainerNode) {\n super();\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new RootViewRef<T>(_rootLView);\n this.hostView._tViewNode = assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n this.componentType = componentType;\n }\n\n get injector(): Injector { return new NodeInjector(this._tNode, this._rootLView); }\n\n destroy(): void {\n if (this.destroyCbs) {\n this.destroyCbs.forEach(fn => fn());\n this.destroyCbs = null;\n !this.hostView.destroyed && this.hostView.destroy();\n }\n }\n\n onDestroy(callback: () => void): void {\n if (this.destroyCbs) {\n this.destroyCbs.push(callback);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from './global';\n\ndeclare global {\n const ngI18nClosureMode: boolean;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function() {\n // tslint:disable-next-line:no-toplevel-property-access\n global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n })();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nexport const LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n PluralCase,\n ExtraData\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\n\nconst u = undefined;\n\nfunction plural(n: number): number {\n let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0) return 1;\n return 5;\n}\n\nexport default [\n 'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],\n [\n ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n ],\n u,\n [\n ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ]\n ],\n u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],\n ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural\n];\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LOCALE_DATA, LocaleDataIndex} from './locale_data';\nimport localeEn from './locale_en';\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = locale.toLowerCase().replace(/_/g, '-');\n\n let match = LOCALE_DATA[normalizedLocale];\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = LOCALE_DATA[parentLocale];\n\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLocalePluralCase} from './locale_data_api';\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: any, locale: string): string {\n const plural = getLocalePluralCase(locale)(value);\n\n switch (plural) {\n case 0:\n return 'zero';\n case 1:\n return 'one';\n case 2:\n return 'two';\n case 3:\n return 'few';\n case 4:\n return 'many';\n default:\n return 'other';\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n* Equivalent to ES6 spread, add each item to an array.\n*\n* @param items The items to add\n* @param arr The array to which you want to add the items\n*/\nexport function addAllToArray(items: any[], arr: any[]) {\n for (let i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[], dst?: any[]): any[] {\n if (dst === undefined) dst = list;\n for (let i = 0; i < list.length; i++) {\n let item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n } else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport '../util/ng_i18n_closure_mode';\n\nimport {getPluralCase} from '../i18n/localization';\nimport {SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS, getTemplateContent} from '../sanitization/html_sanitizer';\nimport {InertBodyHelper} from '../sanitization/inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from '../sanitization/url_sanitizer';\nimport {addAllToArray} from '../util/array_utils';\nimport {assertDataInRange, assertDefined, assertEqual, assertGreaterThan} from '../util/assert';\n\nimport {attachPatchData} from './context_discovery';\nimport {bind, setDelayProjection, ɵɵload} from './instructions/all';\nimport {attachI18nOpCodesDebug} from './instructions/lview_debug';\nimport {TsickleIssue1009, allocExpando, elementAttributeInternal, elementPropertyInternal, getOrCreateTNode, setInputsForProperty, textBindingInternal} from './instructions/shared';\nimport {LContainer, NATIVE} from './interfaces/container';\nimport {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from './interfaces/node';\nimport {RComment, RElement, RText} from './interfaces/renderer';\nimport {SanitizerFn} from './interfaces/sanitization';\nimport {StylingContext} from './interfaces/styling';\nimport {BINDING_INDEX, HEADER_OFFSET, LView, RENDERER, TVIEW, TView, T_HOST} from './interfaces/view';\nimport {appendChild, appendProjectedNodes, createTextNode, nativeRemoveNode} from './node_manipulation';\nimport {getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {renderStringify} from './util/misc_utils';\nimport {findComponentView} from './util/view_traversal_utils';\nimport {getNativeByIndex, getNativeByTNode, getTNode, isLContainer} from './util/view_utils';\n\n\nconst MARKER = `�`;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*!]\\d+):?\\d*�/gi;\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst enum TagType {\n ELEMENT = '#',\n TEMPLATE = '*',\n PROJECTION = '!',\n}\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\ninterface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string|IcuExpression)[][];\n}\n\ninterface IcuCase {\n /**\n * Number of slots to allocate in expando for this case.\n *\n * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When\n * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can\n * write into them.\n */\n vars: number;\n\n /**\n * An optional array of child/sub ICUs.\n */\n childIcus: number[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nMutateOpCodes;\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes;\n}\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression into\n * keys and cases.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n *\n */\nfunction extractParts(pattern: string): (string | IcuExpression)[] {\n if (!pattern) {\n return [];\n }\n\n let prevPos = 0;\n const braceStack = [];\n const results: (string | IcuExpression)[] = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n\n let match;\n while (match = braces.exec(pattern)) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n } else {\n results.push(block);\n }\n\n prevPos = pos + 1;\n }\n } else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern: string): IcuExpression {\n const cases = [];\n const values: (string | IcuExpression)[][] = [];\n let icuType = IcuType.plural;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str: string, binding: string, type: string) {\n if (type === 'select') {\n icuType = IcuType.select;\n } else {\n icuType = IcuType.plural;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n\n const parts = extractParts(pattern) as string[];\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length;) {\n let key = parts[pos++].trim();\n if (icuType === IcuType.plural) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n\n const blocks = extractParts(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n assertGreaterThan(cases.indexOf('other'), -1, 'Missing key \"other\" in ICU statement.');\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n } else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n\n ngDevMode &&\n assertEqual(\n inTemplate, false,\n `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n\n res += message.substr(index);\n return res;\n}\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A translated\n * message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex?: number) {\n if (typeof subTemplateIndex !== 'number') {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n } else {\n // We want a specific sub-template\n const start =\n message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n */\nfunction generateBindingUpdateOpCodes(\n str: string, destinationNode: number, attrName?: string,\n sanitizeFn: SanitizerFn | null = null): I18nUpdateOpCodes {\n const updateOpCodes: I18nUpdateOpCodes = [null, null]; // Alloc space for mask and size\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n } else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n\n updateOpCodes.push(\n destinationNode << I18nUpdateOpCode.SHIFT_REF |\n (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[0] = mask;\n updateOpCodes[1] = updateOpCodes.length - 2;\n return updateOpCodes;\n}\n\nfunction getBindingMask(icuExpression: IcuExpression, mask = 0): number {\n mask = mask | toMaskBit(icuExpression.mainBinding);\n let match;\n for (let i = 0; i < icuExpression.values.length; i++) {\n const valueArr = icuExpression.values[i];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value === 'string') {\n while (match = BINDING_REGEXP.exec(value)) {\n mask = mask | toMaskBit(parseInt(match[1], 10));\n }\n } else {\n mask = getBindingMask(value as IcuExpression, mask);\n }\n }\n }\n return mask;\n}\n\nconst i18nIndexStack: number[] = [];\nlet i18nIndexStackPointer = -1;\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have\n * more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is\n * that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n return 1 << Math.min(bindingIndex, 31);\n}\n\nconst parentIndexStack: number[] = [];\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�!{index}(:{block})�`/`�/!{index}(:{block})�`: *Projection Placeholder*: Marks the\n * beginning and end of <ng-content> that was embedded in the original translation block.\n * The placeholder `index` points to the element index in the template instructions set.\n * An optional `block` that matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nIndexStack[++i18nIndexStackPointer] = index;\n // We need to delay projections until `i18nEnd`\n setDelayProjection(true);\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n i18nStartFirstPass(tView, index, message, subTemplateIndex);\n }\n}\n\n// Count for the number of vars that will be allocated for each i18n block.\n// It is global because this is used in multiple functions that include loops and recursive calls.\n// This is reset to 0 when `i18nStartFirstPass` is called.\nlet i18nVarsCount: number;\n\n/**\n * See `i18nStart` above.\n */\nfunction i18nStartFirstPass(\n tView: TView, index: number, message: string, subTemplateIndex?: number) {\n const viewData = getLView();\n const startIndex = tView.blueprint.length - HEADER_OFFSET;\n i18nVarsCount = 0;\n const previousOrParentTNode = getPreviousOrParentTNode();\n const parentTNode = getIsParent() ? getPreviousOrParentTNode() :\n previousOrParentTNode && previousOrParentTNode.parent;\n let parentIndex =\n parentTNode && parentTNode !== viewData[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;\n let parentIndexPointer = 0;\n parentIndexStack[parentIndexPointer] = parentIndex;\n const createOpCodes: I18nMutateOpCodes = [];\n // If the previous node wasn't the direct parent then we have a translation without top level\n // element and we need to keep a reference of the previous element if there is one\n if (index > 0 && previousOrParentTNode !== parentTNode) {\n // Create an OpCode to select the previous TNode\n createOpCodes.push(\n previousOrParentTNode.index << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select);\n }\n const updateOpCodes: I18nUpdateOpCodes = [];\n const icuExpressions: TIcu[] = [];\n\n const templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = templateTranslation.split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if (i & 1) {\n // Odd indexes are placeholders (elements and sub-templates)\n if (value.charAt(0) === '/') {\n // It is a closing tag\n if (value.charAt(1) === TagType.ELEMENT) {\n const phIndex = parseInt(value.substr(2), 10);\n parentIndex = parentIndexStack[--parentIndexPointer];\n createOpCodes.push(phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.ElementEnd);\n }\n } else {\n const phIndex = parseInt(value.substr(1), 10);\n // The value represents a placeholder that we move to the designated index\n createOpCodes.push(\n phIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Select,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n if (value.charAt(0) === TagType.ELEMENT) {\n parentIndexStack[++parentIndexPointer] = parentIndex = phIndex;\n }\n }\n } else {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = extractParts(value);\n for (let j = 0; j < parts.length; j++) {\n if (j & 1) {\n // Odd indexes are ICU expressions\n // Create the comment node that will anchor the ICU expression\n const icuNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(\n COMMENT_MARKER, ngDevMode ? `ICU ${icuNodeIndex}` : '', icuNodeIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n // Update codes for the ICU expression\n const icuExpression = parts[j] as IcuExpression;\n const mask = getBindingMask(icuExpression);\n icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n const tIcuIndex = icuExpressions.length - 1;\n updateOpCodes.push(\n toMaskBit(icuExpression.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - icuExpression.mainBinding,\n icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch, tIcuIndex,\n mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n icuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate, tIcuIndex);\n } else if (parts[j] !== '') {\n const text = parts[j] as string;\n // Even indexes are text (including bindings)\n const hasBinding = text.match(BINDING_REGEXP);\n // Create text nodes\n const textNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(\n // If there is a binding, the value will be set during update\n hasBinding ? '' : text, textNodeIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);\n }\n }\n }\n }\n }\n\n allocExpando(viewData, i18nVarsCount);\n\n ngDevMode &&\n attachI18nOpCodesDebug(\n createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, viewData);\n\n // NOTE: local var needed to properly assert the type of `TI18n`.\n const tI18n: TI18n = {\n vars: i18nVarsCount,\n create: createOpCodes,\n update: updateOpCodes,\n icus: icuExpressions.length ? icuExpressions : null,\n };\n\n tView.data[index + HEADER_OFFSET] = tI18n;\n}\n\nfunction appendI18nNode(\n tNode: TNode, parentTNode: TNode, previousTNode: TNode | null, viewData: LView): TNode {\n ngDevMode && ngDevMode.rendererMoveNode++;\n const nextNode = tNode.next;\n if (!previousTNode) {\n previousTNode = parentTNode;\n }\n\n // Re-organize node tree to put this node in the correct position.\n if (previousTNode === parentTNode && tNode !== parentTNode.child) {\n tNode.next = parentTNode.child;\n parentTNode.child = tNode;\n } else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {\n tNode.next = previousTNode.next;\n previousTNode.next = tNode;\n } else {\n tNode.next = null;\n }\n\n if (parentTNode !== viewData[T_HOST]) {\n tNode.parent = parentTNode as TElementNode;\n }\n\n // If tNode was moved around, we might need to fix a broken link.\n let cursor: TNode|null = tNode.next;\n while (cursor) {\n if (cursor.next === tNode) {\n cursor.next = nextNode;\n }\n cursor = cursor.next;\n }\n\n // If the placeholder to append is a projection, we need to move the projected nodes instead\n if (tNode.type === TNodeType.Projection) {\n const tProjectionNode = tNode as TProjectionNode;\n appendProjectedNodes(\n viewData, tProjectionNode, tProjectionNode.projection, findComponentView(viewData));\n return tNode;\n }\n\n appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);\n\n const slotValue = viewData[tNode.index];\n if (tNode.type !== TNodeType.Container && isLContainer(slotValue)) {\n // Nodes that inject ViewContainerRef also have a comment node that should be moved\n appendChild(slotValue[NATIVE], tNode, viewData);\n }\n return tNode;\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ɵɵi18nPostprocess(\n message: string, replacements: {[key: string]: (string | string[])} = {}): string {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result: string = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n const content = phs || tmpl;\n const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder: string) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n } else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n\n /**\n * Step 3: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key] as string[];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift() !;\n }\n return match;\n });\n\n return result;\n}\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nEnd(): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nEndFirstPass(tView);\n // Stop delaying projections\n setDelayProjection(false);\n}\n\n/**\n * See `i18nEnd` above.\n */\nfunction i18nEndFirstPass(tView: TView) {\n const viewData = getLView();\n ngDevMode && assertEqual(\n viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex,\n 'i18nEnd should be called before any binding');\n\n const rootIndex = i18nIndexStack[i18nIndexStackPointer--];\n const tI18n = tView.data[rootIndex + HEADER_OFFSET] as TI18n;\n ngDevMode && assertDefined(tI18n, `You should call i18nStart before i18nEnd`);\n\n // Find the last node that was added before `i18nEnd`\n let lastCreatedNode = getPreviousOrParentTNode();\n\n // Read the instructions to insert/move/remove DOM elements\n const visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData);\n\n // Remove deleted nodes\n for (let i = rootIndex + 1; i <= lastCreatedNode.index - HEADER_OFFSET; i++) {\n if (visitedNodes.indexOf(i) === -1) {\n removeNode(i, viewData);\n }\n }\n}\n\n/**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\nfunction createDynamicNodeAtIndex(\n lView: LView, index: number, type: TNodeType, native: RElement | RText | null,\n name: string | null): TElementNode|TIcuContainerNode {\n const previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n lView[index + HEADER_OFFSET] = native;\n const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, type as any, name, null);\n\n // We are creating a dynamic node, the previous tNode might not be pointing at this node.\n // We will link ourselves into the tree later with `appendI18nNode`.\n if (previousOrParentTNode.next === tNode) {\n previousOrParentTNode.next = null;\n }\n\n return tNode;\n}\n\nfunction readCreateOpCodes(\n index: number, createOpCodes: I18nMutateOpCodes, icus: TIcu[] | null,\n viewData: LView): number[] {\n const renderer = getLView()[RENDERER];\n let currentTNode: TNode|null = null;\n let previousTNode: TNode|null = null;\n const visitedNodes: number[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i];\n if (typeof opCode == 'string') {\n const textRNode = createTextNode(opCode, renderer);\n const textNodeIndex = createOpCodes[++i] as number;\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n previousTNode = currentTNode;\n currentTNode =\n createDynamicNodeAtIndex(viewData, textNodeIndex, TNodeType.Element, textRNode, null);\n visitedNodes.push(textNodeIndex);\n setIsNotParent();\n } else if (typeof opCode == 'number') {\n switch (opCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.AppendChild:\n const destinationNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_PARENT;\n let destinationTNode: TNode;\n if (destinationNodeIndex === index) {\n // If the destination node is `i18nStart`, we don't have a\n // top-level node and we should use the host node instead\n destinationTNode = viewData[T_HOST] !;\n } else {\n destinationTNode = getTNode(destinationNodeIndex, viewData);\n }\n ngDevMode &&\n assertDefined(\n currentTNode !,\n `You need to create or select a node before you can insert it into the DOM`);\n previousTNode = appendI18nNode(currentTNode !, destinationTNode, previousTNode, viewData);\n break;\n case I18nMutateOpCode.Select:\n const nodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n visitedNodes.push(nodeIndex);\n previousTNode = currentTNode;\n currentTNode = getTNode(nodeIndex, viewData);\n if (currentTNode) {\n setPreviousOrParentTNode(currentTNode, currentTNode.type === TNodeType.Element);\n }\n break;\n case I18nMutateOpCode.ElementEnd:\n const elementIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n previousTNode = currentTNode = getTNode(elementIndex, viewData);\n setPreviousOrParentTNode(currentTNode, false);\n break;\n case I18nMutateOpCode.Attr:\n const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;\n const attrName = createOpCodes[++i] as string;\n const attrValue = createOpCodes[++i] as string;\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n elementAttributeInternal(elementNodeIndex, attrName, attrValue, viewData);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n } else {\n switch (opCode) {\n case COMMENT_MARKER:\n const commentValue = createOpCodes[++i] as string;\n const commentNodeIndex = createOpCodes[++i] as number;\n ngDevMode && assertEqual(\n typeof commentValue, 'string',\n `Expected \"${commentValue}\" to be a comment node value`);\n const commentRNode = renderer.createComment(commentValue);\n ngDevMode && ngDevMode.rendererCreateComment++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(\n viewData, commentNodeIndex, TNodeType.IcuContainer, commentRNode, null);\n visitedNodes.push(commentNodeIndex);\n attachPatchData(commentRNode, viewData);\n (currentTNode as TIcuContainerNode).activeCaseIndex = null;\n // We will add the case nodes later, during the update phase\n setIsNotParent();\n break;\n case ELEMENT_MARKER:\n const tagNameValue = createOpCodes[++i] as string;\n const elementNodeIndex = createOpCodes[++i] as number;\n ngDevMode && assertEqual(\n typeof tagNameValue, 'string',\n `Expected \"${tagNameValue}\" to be an element node tag name`);\n const elementRNode = renderer.createElement(tagNameValue);\n ngDevMode && ngDevMode.rendererCreateElement++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(\n viewData, elementNodeIndex, TNodeType.Element, elementRNode, tagNameValue);\n visitedNodes.push(elementNodeIndex);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n\n setIsNotParent();\n\n return visitedNodes;\n}\n\nfunction readUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes, icus: TIcu[] | null, bindingsStartIndex: number,\n changeMask: number, viewData: LView, bypassCheckBit = false) {\n let caseCreated = false;\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i] as number;\n if (bypassCheckBit || (checkBit & changeMask)) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n value += renderStringify(viewData[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;\n let tIcuIndex: number;\n let tIcu: TIcu;\n let icuTNode: TIcuContainerNode;\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const propName = updateOpCodes[++j] as string;\n const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);\n break;\n case I18nUpdateOpCode.Text:\n textBindingInternal(viewData, nodeIndex, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n tIcuIndex = updateOpCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n // If there is an active case, delete the old nodes\n if (icuTNode.activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[icuTNode.activeCaseIndex];\n for (let k = 0; k < removeCodes.length; k++) {\n const removeOpCode = removeCodes[k] as number;\n switch (removeOpCode & I18nMutateOpCode.MASK_OPCODE) {\n case I18nMutateOpCode.Remove:\n const nodeIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n removeNode(nodeIndex, viewData);\n break;\n case I18nMutateOpCode.RemoveNestedIcu:\n const nestedIcuNodeIndex =\n removeCodes[k + 1] as number >>> I18nMutateOpCode.SHIFT_REF;\n const nestedIcuTNode =\n getTNode(nestedIcuNodeIndex, viewData) as TIcuContainerNode;\n const activeIndex = nestedIcuTNode.activeCaseIndex;\n if (activeIndex !== null) {\n const nestedIcuTIndex = removeOpCode >>> I18nMutateOpCode.SHIFT_REF;\n const nestedTIcu = icus ![nestedIcuTIndex];\n addAllToArray(nestedTIcu.remove[activeIndex], removeCodes);\n }\n break;\n }\n }\n }\n\n // Update the active caseIndex\n const caseIndex = getCaseIndex(tIcu, value);\n icuTNode.activeCaseIndex = caseIndex !== -1 ? caseIndex : null;\n\n // Add the nodes for the new case\n readCreateOpCodes(-1, tIcu.create[caseIndex], icus, viewData);\n caseCreated = true;\n break;\n case I18nUpdateOpCode.IcuUpdate:\n tIcuIndex = updateOpCodes[++j] as number;\n tIcu = icus ![tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;\n readUpdateOpCodes(\n tIcu.update[icuTNode.activeCaseIndex !], icus, bindingsStartIndex, changeMask,\n viewData, caseCreated);\n break;\n }\n }\n }\n }\n }\n i += skipCodes;\n }\n}\n\nfunction removeNode(index: number, viewData: LView) {\n const removedPhTNode = getTNode(index, viewData);\n const removedPhRNode = getNativeByIndex(index, viewData);\n if (removedPhRNode) {\n nativeRemoveNode(viewData[RENDERER], removedPhRNode);\n }\n\n const slotValue = ɵɵload(index) as RElement | RComment | LContainer | StylingContext;\n if (isLContainer(slotValue)) {\n const lContainer = slotValue as LContainer;\n if (removedPhTNode.type !== TNodeType.Container) {\n nativeRemoveNode(viewData[RENDERER], lContainer[NATIVE]);\n }\n }\n\n // Define this node as detached so that we don't risk projecting it\n removedPhTNode.flags |= TNodeFlags.isDetached;\n ngDevMode && ngDevMode.rendererRemoveNode++;\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, message, subTemplateIndex);\n ɵɵi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ɵɵi18nAttributes(index: number, values: string[]): void {\n const tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n i18nAttributesFirstPass(tView, index, values);\n}\n\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getPreviousOrParentTNode();\n const previousElementIndex = previousElement.index - HEADER_OFFSET;\n const updateOpCodes: I18nUpdateOpCodes = [];\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n const parts = message.split(ICU_REGEXP);\n for (let j = 0; j < parts.length; j++) {\n const value = parts[j];\n\n if (j & 1) {\n // Odd indexes are ICU expressions\n // TODO(ocombe): support ICU expressions in attributes\n throw new Error('ICU expressions are not yet supported in attributes');\n } else if (value !== '') {\n // Even indexes are text (including bindings)\n const hasBinding = !!value.match(BINDING_REGEXP);\n if (hasBinding) {\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n addAllToArray(\n generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n }\n } else {\n const lView = getLView();\n elementAttributeInternal(previousElementIndex, attrName, value, lView);\n // Check if that attribute is a directive input\n const tNode = getTNode(previousElementIndex, lView);\n const dataValue = tNode.inputs && tNode.inputs[attrName];\n if (dataValue) {\n setInputsForProperty(lView, dataValue, value);\n }\n }\n }\n }\n }\n\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n tView.data[index + HEADER_OFFSET] = updateOpCodes;\n }\n}\n\nlet changeMask = 0b0;\nlet shiftsCounter = 0;\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵi18nExp<T>(value: T): TsickleIssue1009 {\n const lView = getLView();\n const expression = bind(lView, value);\n if (expression !== NO_CHANGE) {\n changeMask = changeMask | (1 << shiftsCounter);\n }\n shiftsCounter++;\n return ɵɵi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nApply(index: number) {\n if (shiftsCounter) {\n const lView = getLView();\n const tView = lView[TVIEW];\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index + HEADER_OFFSET];\n let updateOpCodes: I18nUpdateOpCodes;\n let icus: TIcu[]|null = null;\n if (Array.isArray(tI18n)) {\n updateOpCodes = tI18n as I18nUpdateOpCodes;\n } else {\n updateOpCodes = (tI18n as TI18n).update;\n icus = (tI18n as TI18n).icus;\n }\n const bindingsStartIndex = lView[BINDING_INDEX] - shiftsCounter - 1;\n readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, lView);\n\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n shiftsCounter = 0;\n }\n}\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case IcuType.plural: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case IcuType.select: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index;\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param tIcus\n * @param icuExpression\n * @param startIndex\n * @param expandoStartIndex\n */\nfunction icuStart(\n tIcus: TIcu[], icuExpression: IcuExpression, startIndex: number,\n expandoStartIndex: number): void {\n const createCodes = [];\n const removeCodes = [];\n const updateCodes = [];\n const vars = [];\n const childIcus: number[][] = [];\n for (let i = 0; i < icuExpression.values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = icuExpression.values[i];\n const nestedIcus: IcuExpression[] = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n const icuCase: IcuCase =\n parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);\n createCodes.push(icuCase.create);\n removeCodes.push(icuCase.remove);\n updateCodes.push(icuCase.update);\n vars.push(icuCase.vars);\n childIcus.push(icuCase.childIcus);\n }\n const tIcu: TIcu = {\n type: icuExpression.type,\n vars,\n childIcus,\n cases: icuExpression.cases,\n create: createCodes,\n remove: removeCodes,\n update: updateCodes\n };\n tIcus.push(tIcu);\n // Adding the maximum possible of vars needed (based on the cases with the most vars)\n i18nVarsCount += Math.max(...vars);\n}\n\n/**\n * Transforms a string template into an HTML template and a list of instructions used to update\n * attributes or nodes that contain bindings.\n *\n * @param unsafeHtml The string to parse\n * @param parentIndex\n * @param nestedIcus\n * @param tIcus\n * @param expandoStartIndex\n */\nfunction parseIcuCase(\n unsafeHtml: string, parentIndex: number, nestedIcus: IcuExpression[], tIcus: TIcu[],\n expandoStartIndex: number): IcuCase {\n const inertBodyHelper = new InertBodyHelper(document);\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n if (!inertBodyElement) {\n throw new Error('Unable to generate inert body element');\n }\n const wrapper = getTemplateContent(inertBodyElement !) as Element || inertBodyElement;\n const opCodes: IcuCase = {vars: 0, childIcus: [], create: [], remove: [], update: []};\n parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);\n return opCodes;\n}\n\nconst NESTED_ICU = /�(\\d+)�/;\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n * @param currentNode The first node to parse\n * @param icuCase The data for the ICU expression case that contains those nodes\n * @param parentIndex Index of the current node's parent\n * @param nestedIcus Data for the nested ICU expressions that this case contains\n * @param tIcus Data for all ICU expressions of the current message\n * @param expandoStartIndex Expando start index for the current ICU expression\n */\nfunction parseNodes(\n currentNode: Node | null, icuCase: IcuCase, parentIndex: number, nestedIcus: IcuExpression[],\n tIcus: TIcu[], expandoStartIndex: number) {\n if (currentNode) {\n const nestedIcusToCreate: [IcuExpression, number][] = [];\n while (currentNode) {\n const nextNode: Node|null = currentNode.nextSibling;\n const newIndex = expandoStartIndex + ++icuCase.vars;\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode as Element;\n const tagName = element.tagName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n // This isn't a valid element, we won't create an element for it\n icuCase.vars--;\n } else {\n icuCase.create.push(\n ELEMENT_MARKER, tagName, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i) !;\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n addAllToArray(\n generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl),\n icuCase.update);\n } else if (SRCSET_ATTRS[lowerAttrName]) {\n addAllToArray(\n generateBindingUpdateOpCodes(\n attr.value, newIndex, attr.name, sanitizeSrcset),\n icuCase.update);\n } else {\n addAllToArray(\n generateBindingUpdateOpCodes(attr.value, newIndex, attr.name),\n icuCase.update);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ${lowerAttrName} on element ${tagName} (see http://g.co/ng/security#xss)`);\n }\n } else {\n icuCase.create.push(\n newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Attr, attr.name,\n attr.value);\n }\n }\n // Parse the children of this node (if any)\n parseNodes(\n currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex);\n // Remove the parent node after the children\n icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n icuCase.create.push(\n hasBinding ? '' : value, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n icuCase.remove.push(newIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const match = NESTED_ICU.exec(currentNode.textContent || '');\n if (match) {\n const nestedIcuIndex = parseInt(match[1], 10);\n const newLocal = ngDevMode ? `nested ICU ${nestedIcuIndex}` : '';\n // Create the comment node that will anchor the ICU expression\n icuCase.create.push(\n COMMENT_MARKER, newLocal, newIndex,\n parentIndex << I18nMutateOpCode.SHIFT_PARENT | I18nMutateOpCode.AppendChild);\n const nestedIcu = nestedIcus[nestedIcuIndex];\n nestedIcusToCreate.push([nestedIcu, newIndex]);\n } else {\n // We do not handle any other type of comment\n icuCase.vars--;\n }\n break;\n default:\n // We do not handle any other type of element\n icuCase.vars--;\n }\n currentNode = nextNode !;\n }\n\n for (let i = 0; i < nestedIcusToCreate.length; i++) {\n const nestedIcu = nestedIcusToCreate[i][0];\n const nestedIcuNodeIndex = nestedIcusToCreate[i][1];\n icuStart(tIcus, nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n const nestTIcuIndex = tIcus.length - 1;\n icuCase.vars += Math.max(...tIcus[nestTIcuIndex].vars);\n icuCase.childIcus.push(nestTIcuIndex);\n const mask = getBindingMask(nestedIcu);\n icuCase.update.push(\n toMaskBit(nestedIcu.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - nestedIcu.mainBinding,\n nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch,\n nestTIcuIndex,\n mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n nestedIcuNodeIndex << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate,\n nestTIcuIndex);\n icuCase.remove.push(\n nestTIcuIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.RemoveNestedIcu,\n nestedIcuNodeIndex << I18nMutateOpCode.SHIFT_REF | I18nMutateOpCode.Remove);\n }\n }\n}\n\nlet TRANSLATIONS: {[key: string]: string} = {};\nexport interface I18nLocalizeOptions { translations: {[key: string]: string}; }\n\n/**\n * Set the configuration for `i18nLocalize`.\n *\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function i18nConfigureLocalize(options: I18nLocalizeOptions = {\n translations: {}\n}) {\n TRANSLATIONS = options.translations;\n}\n\nconst LOCALIZE_PH_REGEXP = /\\{\\$(.*?)\\}/g;\n\n/**\n * A goog.getMsg-like function for users that do not use Closure.\n *\n * This method is required as a *temporary* measure to prevent i18n tests from being blocked while\n * running outside of Closure Compiler. This method will not be needed once runtime translation\n * service support is introduced.\n *\n * @codeGenApi\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\nexport function ɵɵi18nLocalize(input: string, placeholders?: {[key: string]: string}) {\n if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string\n input = TRANSLATIONS[input];\n }\n if (placeholders !== undefined && Object.keys(placeholders).length) {\n return input.replace(LOCALIZE_PH_REGEXP, (_, key) => placeholders[key] || '');\n }\n return input;\n}\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../render3/ng_module_ref';\nimport {stringify} from '../util/stringify';\n\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map<string, NgModuleFactory<any>|NgModuleType>();\n\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nexport function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {\n const existing = modules.get(id) as NgModuleFactory<any>;\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>| null, incoming: Type<any>): void {\n if (type && type !== incoming) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n\nexport function registerNgModuleType(ngModuleType: NgModuleType) {\n if (ngModuleType.ngModuleDef.id !== null) {\n const id = ngModuleType.ngModuleDef.id;\n const existing = modules.get(id) as NgModuleType | null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n\n let imports = ngModuleType.ngModuleDef.imports;\n if (imports instanceof Function) {\n imports = imports();\n }\n if (imports) {\n imports.forEach((i: NgModuleType<any>) => registerNgModuleType(i));\n }\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string) {\n return modules.get(id);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {INJECTOR} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\nimport {StaticProvider} from '../di/interface/provider';\nimport {R3Injector, createInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {registerNgModuleType} from '../linker/ng_module_factory_registration';\nimport {NgModuleDef} from '../metadata/ng_module';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgLocaleIdDef, getNgModuleDef} from './definition';\nimport {setLocaleId} from './i18n';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\nexport interface NgModuleType<T = any> extends Type<T> { ngModuleDef: NgModuleDef<T>; }\n\nconst COMPONENT_FACTORY_RESOLVER: StaticProvider = {\n provide: viewEngine_ComponentFactoryResolver,\n useClass: ComponentFactoryResolver,\n deps: [viewEngine_NgModuleRef],\n};\n\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n // tslint:disable-next-line:require-internal-with-underscore\n _r3Injector: R3Injector;\n injector: Injector = this;\n instance: T;\n destroyCbs: (() => void)[]|null = [];\n\n constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode && assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n if (ngLocaleIdDef) {\n setLocaleId(ngLocaleIdDef);\n }\n\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef !.bootstrap);\n const additionalProviders: StaticProvider[] = [\n {\n provide: viewEngine_NgModuleRef,\n useValue: this,\n },\n COMPONENT_FACTORY_RESOLVER\n ];\n this._r3Injector = createInjector(\n ngModuleType, _parent, additionalProviders, stringify(ngModuleType)) as R3Injector;\n this.instance = this.get(ngModuleType);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n if (token === Injector || token === viewEngine_NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n }\n\n get componentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return this.get(viewEngine_ComponentFactoryResolver);\n }\n\n destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs !.forEach(fn => fn());\n this.destroyCbs = null;\n }\n onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs !.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n\n const ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType as NgModuleType);\n }\n }\n\n create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n decorators?: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being\n * tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null,\n propDecorators: {[field: string]: any} | null): void {\n return noSideEffects(() => {\n const clazz = type as TypeWithMetadata;\n\n // We determine whether a class has its own metadata by taking the metadata from the parent\n // constructor and checking whether it's the same as the subclass metadata below. We can't use\n // `hasOwnProperty` here because it doesn't work correctly in IE10 for static fields that are\n // defined by TS. See https://github.com/angular/angular/pull/28439#issuecomment-459349218.\n const parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;\n const parentConstructor: TypeWithMetadata|null = parentPrototype && parentPrototype.constructor;\n\n if (decorators !== null) {\n if (clazz.decorators !== undefined &&\n (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {\n clazz.decorators.push(...decorators);\n } else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which use\n // tsickle-style annotations and reflect over them in the same way, this could cause issues,\n // but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have different\n // decorator types. Decorators on individual fields are not merged, as it's also incredibly\n // unlikely that a field will be decorated both with an Angular decorator and a non-Angular\n // decorator that's also been downleveled.\n if (clazz.propDecorators !== undefined &&\n (!parentConstructor || parentConstructor.propDecorators !== clazz.propDecorators)) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {getBindingRoot, getLView, isCreationMode} from './state';\n\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |------consts------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return isCreationMode() ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const lView = getLView();\n const bindingIndex = getBindingRoot() + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getBinding(lView, bindingIndex + 1);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(\n lView, bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getBinding(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(\n lView, bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getBinding(lView, bindingIndex + 3);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,\n exp3: any, exp4: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(\n lView, bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getBinding(lView, bindingIndex + 4);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(\n lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(\n lView, bindingIndex + 6, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(\n lView, bindingIndex + 7, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,\n thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(\n lView, bindingIndex + 8, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n let bindingIndex = getBindingRoot() + slotOffset;\n let different = false;\n const lView = getLView();\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getBinding(lView, bindingIndex);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WrappedValue} from '../change_detection/change_detection_util';\nimport {PipeTransform} from '../change_detection/pipe_transform';\n\nimport {store, ɵɵload} from './instructions/all';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';\nimport {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunctionV} from './pure_function';\nimport {getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getLView()[TVIEW];\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeInstance = pipeDef.factory();\n store(index, pipeInstance);\n return pipeInstance;\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n *\n * @publicApi\n */\nfunction getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> {\n if (registry) {\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(`The pipe '${name}' could not be found!`);\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ?\n ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ?\n ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any {\n const pipeInstance = ɵɵload<PipeTransform>(index);\n return unwrapValue(\n isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(index: number): boolean {\n return (<PipeDef<any>>getLView()[TVIEW].data[index + HEADER_OFFSET]).pure;\n}\n\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue(newValue: any): any {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n const lView = getLView();\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n const bindingToInvalidateIdx = lView[BINDING_INDEX];\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <reference types=\"rxjs\" />\n\nimport {Subject, Subscription} from 'rxjs';\n\n/**\n * Use in directives and components to emit custom events synchronously\n * or asynchronously, and register handlers for those events by subscribing\n * to an instance.\n *\n * @usageNotes\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @publicApi\n */\nexport class EventEmitter<T> extends Subject<T> {\n // TODO: mark this as internal once all the facades are gone\n // we can't mark it as internal now because EventEmitter exported via @angular/core would not\n // contain this property making it incompatible with all the code that uses EventEmitter via\n // facades, which are local to the code and do not have this property stripped.\n /**\n * Internal\n */\n __isAsync: boolean; // tslint:disable-line\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param isAsync When true, deliver events asynchronously.\n *\n */\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T) { super.next(value); }\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param generatorOrNext When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification\n * from this emitter.\n * @param complete When supplied, a custom handler for a completion\n * notification from this emitter.\n */\n subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription {\n let schedulerFn: (t: any) => any;\n let errorFn = (err: any): any => null;\n let completeFn = (): any => null;\n\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? (value: any) => {\n setTimeout(() => generatorOrNext.next(value));\n } : (value: any) => { generatorOrNext.next(value); };\n\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :\n (err) => { generatorOrNext.error(err); };\n }\n\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :\n () => { generatorOrNext.complete(); };\n }\n } else {\n schedulerFn = this.__isAsync ? (value: any) => { setTimeout(() => generatorOrNext(value)); } :\n (value: any) => { generatorOrNext(value); };\n\n if (error) {\n errorFn =\n this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };\n }\n\n if (complete) {\n completeFn =\n this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };\n }\n }\n\n const sink = super.subscribe(schedulerFn, errorFn, completeFn);\n\n if (generatorOrNext instanceof Subscription) {\n generatorOrNext.add(sink);\n }\n\n return sink;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {flatten} from '../util/array_utils';\nimport {getSymbolIterator} from '../util/symbol';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n return ((this as any as{_results: Array<T>})._results as any)[getSymbolIterator()]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T>/* implements Iterable<T> */ {\n public readonly dirty = true;\n private _results: Array<T> = [];\n public readonly changes: Observable<any> = new EventEmitter();\n\n readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n readonly first !: T;\n // TODO(issue/24571): remove '!'.\n readonly last !: T;\n\n constructor() {\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype as any;\n if (!proto[symbol]) proto[symbol] = symbolIterator;\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] { return this._results.map(fn); }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T|undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void { this._results.forEach(fn); }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] { return this._results.slice(); }\n\n toString(): string { return this._results.toString(); }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The results tree to store\n */\n reset(resultsTree: Array<T|any[]>): void {\n this._results = flatten(resultsTree);\n (this as{dirty: boolean}).dirty = false;\n (this as{length: number}).length = this._results.length;\n (this as{last: T}).last = this._results[this.length - 1];\n (this as{first: T}).first = this._results[0];\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void { (this.changes as EventEmitter<any>).emit(this); }\n\n /** internal */\n setDirty() { (this as{dirty: boolean}).dirty = true; }\n\n /** internal */\n destroy(): void {\n (this.changes as EventEmitter<any>).complete();\n (this.changes as EventEmitter<any>).unsubscribe();\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {SchemaMetadata, ViewEncapsulation} from '../../core';\nimport {ProcessProvidersFunction} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {CssSelectorList} from './projection';\nimport {TView} from './view';\n\n\n/**\n * Definition of what a template rendering function should look like for a component.\n */\nexport type ComponentTemplate<T> = {\n // Note: the ctx parameter is typed as T|U, as using only U would prevent a template with\n // e.g. ctx: {} from being assigned to ComponentTemplate<any> as TypeScript won't infer U = any\n // in that scenario. By including T this incompatibility is resolved.\n <U extends T>(rf: RenderFlags, ctx: T | U): void;\n};\n\n/**\n * Definition of what a view queries function should look like.\n */\nexport type ViewQueriesFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => void;\n\n/**\n * Definition of what a content queries function should look like.\n */\nexport type ContentQueriesFunction<T> =\n <U extends T>(rf: RenderFlags, ctx: U, directiveIndex: number) => void;\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/**\n * Flags passed into template functions to determine which blocks (i.e. creation, update)\n * should be executed.\n *\n * Typically, a template runs both the creation block and the update block on initialization and\n * subsequent runs only execute the update block. However, dynamically created views require that\n * the creation block be executed separately from the update block (for backwards compat).\n */\nexport const enum RenderFlags {\n /* Whether to run the creation block (e.g. create elements and directives) */\n Create = 0b01,\n\n /* Whether to run the update block (e.g. refresh bindings) */\n Update = 0b10\n}\n\n/**\n * A subclass of `Type` which has a static `ngComponentDef`:`ComponentDef` field making it\n * consumable for rendering.\n */\nexport interface ComponentType<T> extends Type<T> { ngComponentDef: never; }\n\n/**\n * A subclass of `Type` which has a static `ngDirectiveDef`:`DirectiveDef` field making it\n * consumable for rendering.\n */\nexport interface DirectiveType<T> extends Type<T> { ngDirectiveDef: never; }\n\nexport const enum DirectiveDefFlags {ContentQuery = 0b10}\n\n/**\n * A subclass of `Type` which has a static `ngPipeDef`:`PipeDef` field making it\n * consumable for rendering.\n */\nexport interface PipeType<T> extends Type<T> { ngPipeDef: never; }\n\n/**\n * @codeGenApi\n */\nexport type ɵɵDirectiveDefWithMeta<\n T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string},\n OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef<T>;\n\n/**\n * Runtime information for classes that are inherited by components or directives\n * that aren't defined as components or directives.\n *\n * This is an internal data structure used by the renderer to determine what inputs\n * and outputs should be inherited.\n *\n * See: {@link defineBase}\n *\n * @codeGenApi\n */\nexport interface ɵɵBaseDef<T> {\n /**\n * A dictionary mapping the inputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Input('alias') propertyName: any;`).\n */\n readonly inputs: {[P in keyof T]: string};\n\n /**\n * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of\n * public or minified name.\n */\n readonly declaredInputs: {[P in keyof T]: string};\n\n /**\n * A dictionary mapping the outputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Output('alias') propertyName: any;`).\n */\n readonly outputs: {[P in keyof T]: string};\n\n /**\n * Function to create and refresh content queries associated with a given directive.\n */\n contentQueries: ContentQueriesFunction<T>|null;\n\n /**\n * Query-related instructions for a directive. Note that while directives don't have a\n * view and as such view queries won't necessarily do anything, there might be\n * components that extend the directive.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\n /**\n * Refreshes host bindings on the associated directive.\n */\n hostBindings: HostBindingsFunction<T>|null;\n}\n\n/**\n * Runtime link information for Directives.\n *\n * This is internal data structure used by the render to link\n * directives into templates.\n *\n * NOTE: Always use `defineDirective` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * @param Selector type metadata specifying the selector of the directive or component\n *\n * See: {@link defineDirective}\n */\nexport interface DirectiveDef<T> extends ɵɵBaseDef<T> {\n /** Token representing the directive. Used by DI. */\n type: Type<T>;\n\n /** Function that resolves providers and publishes them into the DI system. */\n providersResolver:\n (<U extends T>(def: DirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) =>\n void)|null;\n\n /** The selectors that will be used to match nodes to this directive. */\n readonly selectors: CssSelectorList;\n\n /**\n * Name under which the directive is exported (for use with local references in template)\n */\n readonly exportAs: string[]|null;\n\n /**\n * Factory function used to create a new directive instance.\n */\n factory: FactoryFn<T>;\n\n /* The following are lifecycle hooks for this component */\n onChanges: (() => void)|null;\n onInit: (() => void)|null;\n doCheck: (() => void)|null;\n afterContentInit: (() => void)|null;\n afterContentChecked: (() => void)|null;\n afterViewInit: (() => void)|null;\n afterViewChecked: (() => void)|null;\n onDestroy: (() => void)|null;\n\n /**\n * The features applied to this directive\n */\n readonly features: DirectiveDefFeature[]|null;\n\n setInput:\n (<U extends T>(\n this: DirectiveDef<U>, instance: U, value: any, publicName: string,\n privateName: string) => void)|null;\n}\n\n/**\n * @codeGenApi\n */\nexport type ɵɵComponentDefWithMeta<\n T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string},\n OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef<T>;\n\n/**\n * Runtime link information for Components.\n *\n * This is internal data structure used by the render to link\n * components into templates.\n *\n * NOTE: Always use `defineComponent` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link defineComponent}\n */\nexport interface ComponentDef<T> extends DirectiveDef<T> {\n /**\n * Runtime unique component ID.\n */\n readonly id: string;\n\n /**\n * The View template of the component.\n */\n readonly template: ComponentTemplate<T>;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n readonly ngContentSelectors?: string[];\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n readonly styles: string[];\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of the 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 readonly consts: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n readonly vars: number;\n\n /**\n * Query-related instructions for a component.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\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 [ShadowDOM](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 readonly 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 readonly data: {[kind: string]: any};\n\n /** Whether or not this component's ChangeDetectionStrategy is OnPush */\n readonly onPush: boolean;\n\n /**\n * Registry of directives and components that may be found in this view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directiveDefs: DirectiveDefListOrFactory|null;\n\n /**\n * 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 pipeDefs: PipeDefListOrFactory|null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas: SchemaMetadata[]|null;\n\n /**\n * Ivy runtime uses this place to store the computed tView for the component. This gets filled on\n * the first run of component.\n */\n tView: TView|null;\n\n /**\n * Used to store the result of `noSideEffects` function so that it is not removed by closure\n * compiler. The property should never be read.\n */\n readonly _?: never;\n}\n\n/**\n * Runtime link information for Pipes.\n *\n * This is internal data structure used by the renderer to link\n * pipes into templates.\n *\n * NOTE: Always use `definePipe` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link definePipe}\n */\nexport interface PipeDef<T> {\n /**\n * Pipe name.\n *\n * Used to resolve pipe in templates.\n */\n readonly name: string;\n\n /**\n * Factory function used to create a new pipe instance.\n */\n factory: FactoryFn<T>;\n\n /**\n * Whether or not the pipe is pure.\n *\n * Pure pipes result only depends on the pipe input and not on internal\n * state of the pipe.\n */\n readonly pure: boolean;\n\n /* The following are lifecycle hooks for this pipe */\n onDestroy: (() => void)|null;\n}\n\n/**\n * @codeGenApi\n */\nexport type ɵɵPipeDefWithMeta<T, Name extends string> = PipeDef<T>;\n\nexport interface DirectiveDefFeature {\n <T>(directiveDef: DirectiveDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\nexport interface ComponentDefFeature {\n <T>(componentDef: ComponentDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\n\n/**\n * Type used for directiveDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;\n\nexport type DirectiveDefList = (DirectiveDef<any>| ComponentDef<any>)[];\n\nexport type DirectiveTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;\n\nexport type DirectiveTypeList =\n (DirectiveDef<any>| ComponentDef<any>|\n Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\nexport type HostBindingsFunction<T> =\n <U extends T>(rf: RenderFlags, ctx: U, elementIndex: number) => void;\n\n/**\n * Type used for PipeDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;\n\nexport type PipeDefList = PipeDef<any>[];\n\nexport type PipeTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;\n\nexport type PipeTypeList =\n (PipeDef<any>| Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {QueryList} from '../../linker';\n\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode} from './node';\n\n\n/** Used for tracking queries (e.g. ViewChild, ContentChild). */\nexport interface LQueries {\n /**\n * The parent LQueries instance.\n *\n * When there is a content query, a new LQueries instance is created to avoid mutating any\n * existing LQueries. After we are done searching content children, the parent property allows\n * us to traverse back up to the original LQueries instance to continue to search for matches\n * in the main view.\n */\n parent: LQueries|null;\n\n /**\n * The index of the node on which this LQueries instance was created / cloned in a given LView.\n *\n * This index is stored to minimize LQueries cloning: we can observe that LQueries can be mutated\n * only under 2 conditions:\n * - we are crossing an element that has directives with content queries (new queries are added);\n * - we are descending into element hierarchy (creating a child element of an existing element)\n * and the current LQueries object is tracking shallow queries (shallow queries are removed).\n *\n * Since LQueries are not cloned systematically we need to know exactly where (on each element)\n * cloning occurred, so we can properly restore the set of tracked queries when going up the\n * elements hierarchy.\n *\n * Always set to -1 for view queries as view queries are created before we process any node in a\n * given view.\n */\n nodeIndex: number;\n\n /**\n * Ask queries to prepare a copy of itself. This ensures that:\n * - tracking new queries on content nodes doesn't mutate list of queries tracked on a parent\n * node;\n * - we don't track shallow queries when descending into elements hierarchy.\n *\n * We will clone LQueries before constructing content queries\n */\n clone(tNode: TNode): LQueries;\n\n /**\n * Notify `LQueries` that a new `TNode` has been created and needs to be added to query results\n * if matching query predicate.\n */\n addNode(tNode: TElementNode|TContainerNode|TElementContainerNode): void;\n\n /**\n * Notify `LQueries` that a new `TNode` has been created and needs to be added to query results\n * if matching query predicate. This is a special mode invoked if the query container has to\n * be created out of order (e.g. view created in the constructor of a directive).\n */\n insertNodeBeforeViews(tNode: TElementNode|TContainerNode|TElementContainerNode): void;\n\n /**\n * Notify `LQueries` that a new LContainer was added to ivy data structures. As a result we need\n * to prepare room for views that might be inserted into this container.\n */\n container(): LQueries|null;\n\n /**\n * Notify `LQueries` that a new `LView` has been created. As a result we need to prepare room\n * and collect nodes that match query predicate.\n */\n createView(): LQueries|null;\n\n /**\n * Notify `LQueries` that a new `LView` has been added to `LContainer`. As a result all\n * the matching nodes from this view should be added to container's queries.\n */\n insertView(newViewIndex: number): void;\n\n /**\n * Notify `LQueries` that an `LView` has been removed from `LContainer`. As a result all\n * the matching nodes from this view should be removed from container's queries.\n */\n removeView(): void;\n\n /**\n * Add additional `QueryList` to track.\n *\n * @param queryList `QueryList` to update with changes.\n * @param predicate Either `Type` or selector array of [key, value] predicates.\n * @param descend If true the query will recursively apply to the children.\n * @param read Indicates which token should be read from DI for this query.\n */\n track<T>(\n queryList: QueryList<T>, predicate: Type<any>|string[], descend?: boolean,\n read?: Type<T>): void;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {Type} from '../interface/type';\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {assertDataInRange, assertDefined, assertEqual} from '../util/assert';\n\nimport {assertPreviousIsParent} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {NG_ELEMENT_ID} from './fields';\nimport {store} from './instructions/all';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';\nimport {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';\nimport {LQueries, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';\nimport {CONTENT_QUERIES, HEADER_OFFSET, LView, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {getCurrentQueryIndex, getIsParent, getLView, getPreviousOrParentTNode, isCreationMode, setCurrentQueryIndex} from './state';\nimport {isContentQueryHost, loadInternal} from './util/view_utils';\nimport {createElementRef, createTemplateRef} from './view_engine_compatibility';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;\n\n/**\n * A predicate which determines if a given element/directive should be included in the query\n * results.\n */\nexport interface QueryPredicate<T> {\n /**\n * If looking for directives then it contains the directive type.\n */\n type: Type<T>|null;\n\n /**\n * If selector then contains local names to query for.\n */\n selector: string[]|null;\n\n /**\n * Indicates which token should be read from DI for this query.\n */\n read: Type<T>|null;\n}\n\n/**\n * An object representing a query, which is a combination of:\n * - query predicate to determines if a given element/directive should be included in the query\n * - values collected based on a predicate\n * - `QueryList` to which collected values should be reported\n */\nclass LQuery<T> {\n constructor(\n /**\n * Next query. Used when queries are stored as a linked list in `LQueries`.\n */\n public next: LQuery<any>|null,\n\n /**\n * Destination to which the value should be added.\n */\n public list: QueryList<T>,\n\n /**\n * A predicate which determines if a given element/directive should be included in the query\n * results.\n */\n public predicate: QueryPredicate<T>,\n\n /**\n * Values which have been located.\n * This is what builds up the `QueryList._valuesTree`.\n */\n public values: any[],\n\n /**\n * A pointer to an array that stores collected values from views. This is necessary so we\n * know a container into which to insert nodes collected from views.\n */\n public containerValues: any[]|null) {}\n}\n\nexport class LQueries_ implements LQueries {\n constructor(\n public parent: LQueries_|null, private shallow: LQuery<any>|null,\n private deep: LQuery<any>|null, public nodeIndex: number = -1) {}\n\n track<T>(queryList: QueryList<T>, predicate: Type<T>|string[], descend?: boolean, read?: Type<T>):\n void {\n if (descend) {\n this.deep = createLQuery(this.deep, queryList, predicate, read != null ? read : null);\n } else {\n this.shallow = createLQuery(this.shallow, queryList, predicate, read != null ? read : null);\n }\n }\n\n clone(tNode: TNode): LQueries {\n return this.shallow !== null || isContentQueryHost(tNode) ?\n new LQueries_(this, null, this.deep, tNode.index) :\n this;\n }\n\n container(): LQueries|null {\n const shallowResults = copyQueriesToContainer(this.shallow);\n const deepResults = copyQueriesToContainer(this.deep);\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n }\n\n createView(): LQueries|null {\n const shallowResults = copyQueriesToView(this.shallow);\n const deepResults = copyQueriesToView(this.deep);\n\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n }\n\n insertView(index: number): void {\n insertView(index, this.shallow);\n insertView(index, this.deep);\n }\n\n addNode(tNode: TElementNode|TContainerNode|TElementContainerNode): void {\n add(this.deep, tNode, false);\n add(this.shallow, tNode, false);\n }\n\n insertNodeBeforeViews(tNode: TElementNode|TContainerNode|TElementContainerNode): void {\n add(this.deep, tNode, true);\n add(this.shallow, tNode, true);\n }\n\n removeView(): void {\n removeView(this.shallow);\n removeView(this.deep);\n }\n}\n\nfunction copyQueriesToContainer(query: LQuery<any>| null): LQuery<any>|null {\n let result: LQuery<any>|null = null;\n\n while (query) {\n const containerValues: any[] = []; // prepare room for views\n query.values.push(containerValues);\n result = new LQuery<any>(result, query.list, query.predicate, containerValues, null);\n query = query.next;\n }\n\n return result;\n}\n\nfunction copyQueriesToView(query: LQuery<any>| null): LQuery<any>|null {\n let result: LQuery<any>|null = null;\n\n while (query) {\n result = new LQuery<any>(result, query.list, query.predicate, [], query.values);\n query = query.next;\n }\n\n return result;\n}\n\nfunction insertView(index: number, query: LQuery<any>| null) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n query.containerValues !.splice(index, 0, query.values);\n\n // mark a query as dirty only when inserted view had matching modes\n if (query.values.length) {\n query.list.setDirty();\n }\n\n query = query.next;\n }\n}\n\nfunction removeView(query: LQuery<any>| null) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n\n const containerValues = query.containerValues !;\n const viewValuesIdx = containerValues.indexOf(query.values);\n const removed = containerValues.splice(viewValuesIdx, 1);\n\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n\n query = query.next;\n }\n}\n\nfunction assertViewQueryhasPointerToDeclarationContainer(query: LQuery<any>) {\n assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number|null {\n const localNames = tNode.localNames;\n if (localNames) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\n\n// TODO: \"read\" should be an AbstractType (FW-486)\nfunction queryByReadToken(read: any, tNode: TNode, currentView: LView): any {\n const factoryFn = (read as any)[NG_ELEMENT_ID];\n if (typeof factoryFn === 'function') {\n return factoryFn();\n } else {\n const tView = currentView[TVIEW];\n const matchingIdx = locateDirectiveOrProvider(tNode, tView, read as Type<any>, false, false);\n if (matchingIdx !== null) {\n return getNodeInjectable(tView.data, currentView, matchingIdx, tNode as TElementNode);\n }\n }\n return null;\n}\n\nfunction queryByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n return createElementRef(ViewEngine_ElementRef, tNode, currentView);\n }\n if (tNode.type === TNodeType.Container) {\n return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\n }\n return null;\n}\n\nfunction queryByTemplateRef(\n templateRefToken: ViewEngine_TemplateRef<any>, tNode: TNode, currentView: LView,\n read: any): any {\n const templateRefResult = (templateRefToken as any)[NG_ELEMENT_ID]();\n if (read) {\n return templateRefResult ? queryByReadToken(read, tNode, currentView) : null;\n }\n return templateRefResult;\n}\n\nfunction queryRead(tNode: TNode, currentView: LView, read: any, matchingIdx: number): any {\n if (read) {\n return queryByReadToken(read, tNode, currentView);\n }\n if (matchingIdx > -1) {\n return getNodeInjectable(\n currentView[TVIEW].data, currentView, matchingIdx, tNode as TElementNode);\n }\n // if read token and / or strategy is not specified,\n // detect it using appropriate tNode type\n return queryByTNodeType(tNode, currentView);\n}\n\n/**\n * Add query matches for a given node.\n *\n * @param query The first query in the linked list\n * @param tNode The TNode to match against queries\n * @param insertBeforeContainer Whether or not we should add matches before the last\n * container array. This mode is necessary if the query container had to be created\n * out of order (e.g. a view was created in a constructor)\n */\nfunction add(\n query: LQuery<any>| null, tNode: TElementNode | TContainerNode | TElementContainerNode,\n insertBeforeContainer: boolean) {\n const lView = getLView();\n const tView = lView[TVIEW];\n\n while (query) {\n const predicate = query.predicate;\n const type = predicate.type as any;\n if (type) {\n let result = null;\n if (type === ViewEngine_TemplateRef) {\n result = queryByTemplateRef(type, tNode, lView, predicate.read);\n } else {\n const matchingIdx = locateDirectiveOrProvider(tNode, tView, type, false, false);\n if (matchingIdx !== null) {\n result = queryRead(tNode, lView, predicate.read, matchingIdx);\n }\n }\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n } else {\n const selector = predicate.selector !;\n for (let i = 0; i < selector.length; i++) {\n const matchingIdx = getIdxOfMatchingSelector(tNode, selector[i]);\n if (matchingIdx !== null) {\n const result = queryRead(tNode, lView, predicate.read, matchingIdx);\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n }\n }\n }\n query = query.next;\n }\n}\n\nfunction addMatch(query: LQuery<any>, matchingValue: any, insertBeforeViewMatches: boolean): void {\n // Views created in constructors may have their container values created too early. In this case,\n // ensure template node results are unshifted before container results. Otherwise, results inside\n // embedded views will appear before results on parent template nodes when flattened.\n insertBeforeViewMatches ? query.values.unshift(matchingValue) : query.values.push(matchingValue);\n query.list.setDirty();\n}\n\nfunction createPredicate<T>(predicate: Type<T>| string[], read: Type<T>| null): QueryPredicate<T> {\n const isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate as Type<T>,\n selector: isArray ? predicate as string[] : null,\n read: read\n };\n}\n\nfunction createLQuery<T>(\n previous: LQuery<any>| null, queryList: QueryList<T>, predicate: Type<T>| string[],\n read: Type<T>| null): LQuery<T> {\n return new LQuery(\n previous, queryList, createPredicate(predicate, read),\n (queryList as any as QueryList_<T>)._valuesTree, null);\n}\n\ntype QueryList_<T> = QueryList<T>& {_valuesTree: any[], _static: boolean};\n\n/**\n * Creates a QueryList and stores it in LView's collection of active queries (LQueries).\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n */\nfunction createQueryListInLView<T>(\n // TODO: \"read\" should be an AbstractType (FW-486)\n lView: LView, predicate: Type<any>| string[], descend: boolean, read: any, isStatic: boolean,\n nodeIndex: number): QueryList<T> {\n ngDevMode && assertPreviousIsParent(getIsParent());\n const queryList = new QueryList<T>() as QueryList_<T>;\n const queries = lView[QUERIES] || (lView[QUERIES] = new LQueries_(null, null, null, nodeIndex));\n queryList._valuesTree = [];\n queryList._static = isStatic;\n queries.track(queryList, predicate, descend, read);\n storeCleanupWithContext(lView, queryList, queryList.destroy);\n return queryList;\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const queryListImpl = (queryList as any as QueryList_<any>);\n const creationMode = isCreationMode();\n\n // if creation mode and static or update mode and not static\n if (queryList.dirty && creationMode === queryListImpl._static) {\n queryList.reset(queryListImpl._valuesTree || []);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}\n\n/**\n * Creates new QueryList for a static view query.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵstaticViewQuery<T>(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate: Type<any>| string[], descend: boolean, read: any): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n viewQueryInternal(lView, tView, predicate, descend, read, true);\n tView.staticViewQueries = true;\n}\n\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate: Type<any>| string[], descend: boolean, read: any): QueryList<T> {\n const lView = getLView();\n const tView = lView[TVIEW];\n return viewQueryInternal(lView, tView, predicate, descend, read, false);\n}\n\nfunction viewQueryInternal<T>(\n lView: LView, tView: TView, predicate: Type<any>| string[], descend: boolean, read: any,\n isStatic: boolean): QueryList<T> {\n if (tView.firstTemplatePass) {\n tView.expandoStartIndex++;\n }\n const index = getCurrentQueryIndex();\n const queryList: QueryList<T> =\n createQueryListInLView<T>(lView, predicate, descend, read, isStatic, -1);\n store(index - HEADER_OFFSET, queryList);\n setCurrentQueryIndex(index + 1);\n return queryList;\n}\n\n/**\n * Loads current View Query and moves the pointer/index to the next View Query in LView.\n *\n * @codeGenApi\n */\nexport function ɵɵloadViewQuery<T>(): T {\n const index = getCurrentQueryIndex();\n setCurrentQueryIndex(index + 1);\n return loadInternal<T>(getLView(), index - HEADER_OFFSET);\n}\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number, predicate: Type<any>| string[], descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any): QueryList<T> {\n const lView = getLView();\n const tView = lView[TVIEW];\n const tNode = getPreviousOrParentTNode();\n return contentQueryInternal(\n lView, tView, directiveIndex, predicate, descend, read, false, tNode.index);\n}\n\nfunction contentQueryInternal<T>(\n lView: LView, tView: TView, directiveIndex: number, predicate: Type<any>| string[],\n descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any, isStatic: boolean, nodeIndex: number): QueryList<T> {\n const contentQuery: QueryList<T> =\n createQueryListInLView<T>(lView, predicate, descend, read, isStatic, nodeIndex);\n (lView[CONTENT_QUERIES] || (lView[CONTENT_QUERIES] = [])).push(contentQuery);\n if (tView.firstTemplatePass) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex =\n tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(directiveIndex);\n }\n }\n return contentQuery;\n}\n\n/**\n * Registers a QueryList, associated with a static content query, for later refresh\n * (part of a view refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵstaticContentQuery<T>(\n directiveIndex: number, predicate: Type<any>| string[], descend: boolean,\n // TODO(FW-486): \"read\" should be an AbstractType\n read: any): void {\n const lView = getLView();\n const tView = lView[TVIEW];\n const tNode = getPreviousOrParentTNode();\n contentQueryInternal(lView, tView, directiveIndex, predicate, descend, read, true, tNode.index);\n tView.staticContentQueries = true;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵloadContentQuery<T>(): QueryList<T> {\n const lView = getLView();\n ngDevMode &&\n assertDefined(\n lView[CONTENT_QUERIES], 'Content QueryList array should be defined if reading a query.');\n\n const index = getCurrentQueryIndex();\n ngDevMode && assertDataInRange(lView[CONTENT_QUERIES] !, index);\n\n setCurrentQueryIndex(index + 1);\n return lView[CONTENT_QUERIES] ![index];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\n\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\nimport {createTemplateRef} from './view_engine_compatibility';\n\n\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView) {\n return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {LifecycleHooksFeature, renderComponent, whenRendered} from './component';\nimport {ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition';\nimport {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';\nimport {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';\nimport {ɵɵProvidersFeature} from './features/providers_feature';\nimport {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ɵɵBaseDef, ɵɵComponentDefWithMeta, ɵɵDirectiveDefWithMeta, ɵɵPipeDefWithMeta} from './interfaces/definition';\nimport {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';\n\nexport {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';\nexport {ɵɵgetFactoryOf, ɵɵgetInheritedFactory} from './di';\n// clang-format off\nexport {\n detectChanges,\n markDirty,\n store,\n tick,\n\n ɵɵallocHostVars,\n\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n\n ɵɵclassMap,\n ɵɵclassProp,\n ɵɵcomponentHostSyntheticListener,\n\n ɵɵcontainer,\n ɵɵcontainerRefreshEnd,\n ɵɵcontainerRefreshStart,\n\n ɵɵdirectiveInject,\n\n ɵɵelement,\n ɵɵelementContainerEnd,\n\n ɵɵelementContainerStart,\n ɵɵelementEnd,\n\n ɵɵelementHostAttrs,\n ɵɵelementStart,\n ɵɵembeddedViewEnd,\n\n ɵɵembeddedViewStart,\n\n ɵɵgetCurrentView,\n ɵɵinjectAttribute,\n\n ɵɵinterpolation1,\n ɵɵinterpolation2,\n ɵɵinterpolation3,\n ɵɵinterpolation4,\n ɵɵinterpolation5,\n ɵɵinterpolation6,\n ɵɵinterpolation7,\n ɵɵinterpolation8,\n ɵɵinterpolationV,\n\n ɵɵlistener,\n ɵɵload,\n\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n\n ɵɵnextContext,\n\n ɵɵprojection,\n ɵɵprojectionDef,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n\n ɵɵreference,\n\n ɵɵselect,\n ɵɵstyleMap,\n ɵɵstyleProp,\n ɵɵstyleSanitizer,\n ɵɵstyling,\n ɵɵstylingApply,\n ɵɵtemplate,\n\n ɵɵtext,\n ɵɵtextBinding,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n\n ɵɵupdateSyntheticHostBinding,\n} from './instructions/all';\nexport {RenderFlags} from './interfaces/definition';\nexport {CssSelectorList, ProjectionSlots} from './interfaces/projection';\n\nexport {\n ɵɵrestoreView,\n\n ɵɵenableBindings,\n ɵɵdisableBindings,\n} from './state';\n\nexport {\n DEFAULT_LOCALE_ID,\n ɵɵi18n,\n ɵɵi18nAttributes,\n ɵɵi18nExp,\n ɵɵi18nStart,\n ɵɵi18nEnd,\n ɵɵi18nApply,\n ɵɵi18nPostprocess,\n i18nConfigureLocalize,\n ɵɵi18nLocalize,\n getLocaleId,\n setLocaleId,\n} from './i18n';\n\nexport {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref';\n\nexport {\n AttributeMarker\n} from './interfaces/node';\n\nexport {\n setClassMetadata,\n} from './metadata';\n\nexport {\n ɵɵpipe,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n} from './pipe';\n\nexport {\n ɵɵqueryRefresh,\n ɵɵviewQuery,\n ɵɵstaticViewQuery,\n ɵɵloadViewQuery,\n ɵɵcontentQuery,\n ɵɵloadContentQuery,\n ɵɵstaticContentQuery\n} from './query';\n\nexport {\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n} from './pure_function';\n\nexport {ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound';\n\nexport {ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody} from './util/misc_utils';\n\n// clang-format on\n\nexport {\n ɵɵBaseDef,\n ComponentDef,\n ɵɵComponentDefWithMeta,\n ComponentTemplate,\n ComponentType,\n DirectiveDef,\n DirectiveDefFlags,\n ɵɵDirectiveDefWithMeta,\n DirectiveType,\n ɵɵNgOnChangesFeature,\n ɵɵInheritDefinitionFeature,\n ɵɵProvidersFeature,\n PipeDef,\n ɵɵPipeDefWithMeta,\n LifecycleHooksFeature,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefineNgModule,\n ɵɵdefineBase,\n ɵɵdefinePipe,\n getHostElement,\n getComponent,\n getDirectives,\n getRenderedText,\n renderComponent,\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\n whenRendered,\n};\n\nexport {NO_CHANGE} from './tokens';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: Function} =\n (() => ({\n 'ɵɵattribute': r3.ɵɵattribute,\n 'ɵɵattributeInterpolate1': r3.ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': r3.ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': r3.ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': r3.ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': r3.ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': r3.ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': r3.ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': r3.ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': r3.ɵɵattributeInterpolateV,\n 'ɵɵdefineBase': r3.ɵɵdefineBase,\n 'ɵɵdefineComponent': r3.ɵɵdefineComponent,\n 'ɵɵdefineDirective': r3.ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,\n 'ɵɵdefinePipe': r3.ɵɵdefinePipe,\n 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,\n 'ɵɵgetFactoryOf': r3.ɵɵgetFactoryOf,\n 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵcontainer': r3.ɵɵcontainer,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵcontainerRefreshStart': r3.ɵɵcontainerRefreshStart,\n 'ɵɵcontainerRefreshEnd': r3.ɵɵcontainerRefreshEnd,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵallocHostVars': r3.ɵɵallocHostVars,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵpureFunction0': r3.ɵɵpureFunction0,\n 'ɵɵpureFunction1': r3.ɵɵpureFunction1,\n 'ɵɵpureFunction2': r3.ɵɵpureFunction2,\n 'ɵɵpureFunction3': r3.ɵɵpureFunction3,\n 'ɵɵpureFunction4': r3.ɵɵpureFunction4,\n 'ɵɵpureFunction5': r3.ɵɵpureFunction5,\n 'ɵɵpureFunction6': r3.ɵɵpureFunction6,\n 'ɵɵpureFunction7': r3.ɵɵpureFunction7,\n 'ɵɵpureFunction8': r3.ɵɵpureFunction8,\n 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,\n 'ɵɵrestoreView': r3.ɵɵrestoreView,\n 'ɵɵinterpolation1': r3.ɵɵinterpolation1,\n 'ɵɵinterpolation2': r3.ɵɵinterpolation2,\n 'ɵɵinterpolation3': r3.ɵɵinterpolation3,\n 'ɵɵinterpolation4': r3.ɵɵinterpolation4,\n 'ɵɵinterpolation5': r3.ɵɵinterpolation5,\n 'ɵɵinterpolation6': r3.ɵɵinterpolation6,\n 'ɵɵinterpolation7': r3.ɵɵinterpolation7,\n 'ɵɵinterpolation8': r3.ɵɵinterpolation8,\n 'ɵɵinterpolationV': r3.ɵɵinterpolationV,\n 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵload': r3.ɵɵload,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵupdateSyntheticHostBinding': r3.ɵɵupdateSyntheticHostBinding,\n 'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,\n 'ɵɵpipeBind1': r3.ɵɵpipeBind1,\n 'ɵɵpipeBind2': r3.ɵɵpipeBind2,\n 'ɵɵpipeBind3': r3.ɵɵpipeBind3,\n 'ɵɵpipeBind4': r3.ɵɵpipeBind4,\n 'ɵɵpipeBindV': r3.ɵɵpipeBindV,\n 'ɵɵprojectionDef': r3.ɵɵprojectionDef,\n 'ɵɵproperty': r3.ɵɵproperty,\n 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV,\n 'ɵɵpipe': r3.ɵɵpipe,\n 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,\n 'ɵɵviewQuery': r3.ɵɵviewQuery,\n 'ɵɵstaticViewQuery': r3.ɵɵstaticViewQuery,\n 'ɵɵstaticContentQuery': r3.ɵɵstaticContentQuery,\n 'ɵɵloadViewQuery': r3.ɵɵloadViewQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵloadContentQuery': r3.ɵɵloadContentQuery,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵelementHostAttrs': r3.ɵɵelementHostAttrs,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵstyling': r3.ɵɵstyling,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstyleSanitizer': r3.ɵɵstyleSanitizer,\n 'ɵɵstylingApply': r3.ɵɵstylingApply,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵselect': r3.ɵɵselect,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵtext': r3.ɵɵtext,\n 'ɵɵtextBinding': r3.ɵɵtextBinding,\n 'ɵɵtextInterpolate': r3.ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': r3.ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': r3.ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': r3.ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': r3.ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': r3.ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': r3.ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': r3.ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': r3.ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': r3.ɵɵtextInterpolateV,\n 'ɵɵembeddedViewStart': r3.ɵɵembeddedViewStart,\n 'ɵɵembeddedViewEnd': r3.ɵɵembeddedViewEnd,\n 'ɵɵi18n': r3.ɵɵi18n,\n 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,\n 'ɵɵi18nExp': r3.ɵɵi18nExp,\n 'ɵɵi18nStart': r3.ɵɵi18nStart,\n 'ɵɵi18nEnd': r3.ɵɵi18nEnd,\n 'ɵɵi18nApply': r3.ɵɵi18nApply,\n 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,\n 'ɵɵi18nLocalize': r3.ɵɵi18nLocalize,\n 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵdefaultStyleSanitizer': sanitization.ɵɵdefaultStyleSanitizer,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\n }))();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3InjectorMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJECTOR_DEF} from '../../di/interface/defs';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Component} from '../../metadata';\nimport {ModuleWithProviders, NgModule, NgModuleDef, NgModuleTransitiveScopes} from '../../metadata/ng_module';\nimport {flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {NgModuleType} from '../ng_module_ref';\nimport {maybeUnwrapFn, stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\n\nconst EMPTY_ARRAY: Type<any>[] = [];\n\ninterface ModuleQueueItem {\n moduleType: Type<any>;\n ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const {moduleType, ngModule} = moduleQueue[i];\n\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n } finally {\n flushingModuleQueue = false;\n }\n }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[] | Type<any>): boolean {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n moduleType: NgModuleType, ngModule: NgModule,\n allowDuplicateDeclarationsInRoot: boolean = false): void {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef: any = null;\n Object.defineProperty(moduleType, NG_MODULE_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n ngModuleDef = getCompilerFacade().compileNgModule(\n angularCoreEnv, `ng:///${moduleType.name}/ngModuleDef.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n emitInline: true,\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n }\n return ngModuleDef;\n }\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJECTOR_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode && verifySemanticsOfNgModuleDef(\n moduleType as any as NgModuleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n ngInjectorDef = getCompilerFacade().compileInjector(\n angularCoreEnv, `ng:///${moduleType.name}/ngInjectorDef.js`, meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean): void {\n if (verifiedNgModule.get(moduleType)) return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n const ngModuleDef = getNgModuleDef(moduleType, true);\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(mod => verifySemanticsOfNgModuleDef(mod, false));\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n const combinedDeclarations: Type<any>[] = [\n ...declarations.map(resolveForwardRef), //\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n\n const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(mod => verifySemanticsOfNgModuleDef(mod, false));\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyCorrectBootstrapType);\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyComponentIsPartOfNgModule);\n ngModule.entryComponents && ngModule.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(\n `Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n\n function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(\n `Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n }\n }\n }\n\n function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\n `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n }\n } else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n\n function verifyComponentIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(\n `Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n }\n }\n\n function verifyCorrectBootstrapType(type: Type<any>) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n }\n\n function verifyComponentEntryComponentsIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n const component = getAnnotation<Component>(type, 'Component');\n if (component && component.entryComponents) {\n component.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(\n typeOrWithProviders: NgModuleType<any>| {ngModule: NgModuleType<any>}): NgModuleType<any> {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T|null {\n let annotation: T|null = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n\n function collect(annotations: any[] | null) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n\n function readAnnotation(\n decorator: {type: {prototype: {ngMetadataName: string}, args: any[]}, args: any}): void {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator as any;\n } else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new Map<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new Map<NgModuleType<any>, boolean>();\n moduleQueue.length = 0;\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type, true);\n return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n return computeCombinedExports(type);\n } else {\n return type;\n }\n }))];\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ngComponentDef set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n const transitiveScopes = transitiveScopesFor(moduleType);\n\n declarations.forEach(declaration => {\n if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n // An `ngComponentDef` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any>& {ngComponentDef: ComponentDef<any>};\n const componentDef = getComponentDef(component) !;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIRECTIVE_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n (declaration as Type<any>& {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n }\n });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n componentDef: ComponentDef<C>, transitiveScopes: NgModuleTransitiveScopes) {\n componentDef.directiveDefs = () =>\n Array.from(transitiveScopes.compilation.directives)\n .map(\n dir => dir.hasOwnProperty(NG_COMPONENT_DEF) ? getComponentDef(dir) ! :\n getDirectiveDef(dir) !)\n .filter(def => !!def);\n componentDef.pipeDefs = () =>\n Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe) !);\n componentDef.schemas = transitiveScopes.schemas;\n\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be called\n * on modules with components that have not fully compiled yet, but the result should not be used\n * until they have.\n */\nexport function transitiveScopesFor<T>(\n moduleType: Type<T>,\n processNgModuleFn?: (ngModule: NgModuleType) => void): NgModuleTransitiveScopes {\n if (!isNgModule(moduleType)) {\n throw new Error(`${moduleType.name} does not have an ngModuleDef`);\n }\n const def = getNgModuleDef(moduleType) !;\n\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n\n const scopes: NgModuleTransitiveScopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n };\n\n maybeUnwrapFn(def.declarations).forEach(declared => {\n const declaredWithDefs = declared as Type<any>& { ngPipeDef?: any; };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has an ngComponentDef or ngDirectiveDef, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n\n maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n const importedType = imported as Type<I>& {\n // If imported is an @NgModule:\n ngModuleDef?: NgModuleDef<I>;\n };\n\n if (!isNgModule<I>(importedType)) {\n throw new Error(`Importing ${importedType.name} which does not have an ngModuleDef`);\n }\n\n if (processNgModuleFn) {\n processNgModuleFn(importedType as NgModuleType);\n }\n\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(importedType, processNgModuleFn);\n importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n });\n\n maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E>& {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ngComponentDef?: any;\n ngDirectiveDef?: any;\n ngModuleDef?: NgModuleDef<E>;\n ngPipeDef?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have an\n // ngComponentDef as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType, processNgModuleFn);\n exportedScope.exported.directives.forEach(entry => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(entry => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n } else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n } else {\n scopes.exported.directives.add(exportedType);\n }\n });\n\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any>| ModuleWithProviders<{}>): Type<any> {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as{ngModule?: any}).ngModule !== undefined;\n}\n\nfunction isNgModule<T>(value: Type<T>): value is Type<T>&{ngModuleDef: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {R3DirectiveMetadataFacade, getCompilerFacade} from '../../compiler/compiler_facade';\nimport {R3BaseMetadataFacade, R3ComponentMetadataFacade, R3QueryMetadataFacade} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {compileInjectable} from '../../di/jit/injectable';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Query} from '../../metadata/di';\nimport {Component, Directive, Input} from '../../metadata/directives';\nimport {componentNeedsResolution, maybeQueueResolutionOfComponentResources} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {getBaseDef, getComponentDef, getDirectiveDef} from '../definition';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../empty';\nimport {NG_BASE_DEF, NG_COMPONENT_DEF, NG_DIRECTIVE_DEF} from '../fields';\nimport {ComponentType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/misc_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {flushModuleScopingQueueAsMuchAsPossible, patchComponentDefWithScope, transitiveScopesFor} from './module';\n\n\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * ngComponentDef onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ngComponentDef`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n let ngComponentDef: any = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n Object.defineProperty(type, NG_COMPONENT_DEF, {\n get: () => {\n const compiler = getCompilerFacade();\n if (ngComponentDef === null) {\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta: R3ComponentMetadataFacade = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces: metadata.preserveWhitespaces || false,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n directives: [],\n changeDetection: metadata.changeDetection,\n pipes: new Map(),\n encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n };\n if (meta.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n\n // Add ngInjectableDef so components are reachable through the module injector by default\n // This is mostly to support injecting components in tests. In real application code,\n // components should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n}\n\nfunction hasSelectorScope<T>(component: Type<T>): component is Type<T>&\n {ngSelectorScope: Type<any>} {\n return (component as{ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * ngDirectiveDef onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive): void {\n let ngDirectiveDef: any = null;\n Object.defineProperty(type, NG_DIRECTIVE_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ngDirectiveDef.js`;\n const compiler = getCompilerFacade();\n const facade = directiveMetadata(type as ComponentType<any>, directive);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngDirectiveDef = compiler.compileDirective(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n // Add ngInjectableDef so directives are reachable through the module injector by default\n // This is mostly to support injecting directives in tests. In real application code,\n // directives should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n // Reflect inputs and outputs.\n const propMetadata = getReflect().ownPropMetadata(type);\n\n return {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n selector: metadata.selector !,\n deps: reflectDependencies(type),\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: {usesOnChanges: type.prototype.hasOwnProperty('ngOnChanges')},\n typeSourceSpan: null !,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n };\n}\n\n/**\n * Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addBaseDefToUndecoratedParents(type: Type<any>) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type);\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the base def if there are no annotations and the base def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) && !getBaseDef(parent)) {\n const facade = extractBaseDefMetadata(parent);\n facade && compileBase(parent, facade);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\n\n/** Compiles the base metadata into a base definition. */\nfunction compileBase(type: Type<any>, facade: R3BaseMetadataFacade): void {\n let ngBaseDef: any = null;\n Object.defineProperty(type, NG_BASE_DEF, {\n get: () => {\n if (ngBaseDef === null) {\n const name = type && type.name;\n const sourceMapUrl = `ng://${name}/ngBaseDef.js`;\n const compiler = getCompilerFacade();\n ngBaseDef = compiler.compileBase(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngBaseDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\n/** Extracts the metadata necessary to construct an `ngBaseDef` from a class. */\nfunction extractBaseDefMetadata(type: Type<any>): R3BaseMetadataFacade|null {\n const propMetadata = getReflect().ownPropMetadata(type);\n const viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery);\n const queries = extractQueriesMetadata(type, propMetadata, isContentQuery);\n let inputs: {[key: string]: string | [string, string]}|undefined;\n let outputs: {[key: string]: string}|undefined;\n // We only need to know whether there are any HostListener or HostBinding\n // decorators present, the parsing logic is in the compiler already.\n let hasHostDecorators = false;\n\n for (const field in propMetadata) {\n propMetadata[field].forEach(ann => {\n const metadataName = ann.ngMetadataName;\n if (metadataName === 'Input') {\n inputs = inputs || {};\n inputs[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n } else if (metadataName === 'Output') {\n outputs = outputs || {};\n outputs[field] = ann.bindingPropertyName || field;\n } else if (metadataName === 'HostBinding' || metadataName === 'HostListener') {\n hasHostDecorators = true;\n }\n });\n }\n\n // Only generate the base def if there's any info inside it.\n if (inputs || outputs || viewQueries.length || queries.length || hasHostDecorators) {\n return {name: type.name, inputs, outputs, viewQueries, queries, propMetadata};\n }\n\n return null;\n}\n\nfunction convertToR3QueryPredicate(selector: any): any|string[] {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static\n };\n}\nfunction extractQueriesMetadata(\n type: Type<any>, propMetadata: {[key: string]: any[]},\n isQueryAnn: (ann: any) => ann is Query): R3QueryMetadataFacade[] {\n const queriesMeta: R3QueryMetadataFacade[] = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\n `Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnn)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string | undefined): string[]|null {\n if (exportAs === undefined) {\n return null;\n }\n\n return exportAs.split(',').map(part => part.trim());\n}\n\nfunction isContentQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnn(value: any): value is Input {\n return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n return value.split(',').map(piece => piece.trim());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Pipe} from '../../metadata/directives';\nimport {NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n let ngPipeDef: any = null;\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const typeName = type.name;\n ngPipeDef =\n getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${typeName}/ngPipeDef.js`, {\n type: type,\n typeArgumentCount: 0,\n name: typeName,\n deps: reflectDependencies(type),\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\n });\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di';\nimport {Type} from '../interface/type';\nimport {compileComponent as render3CompileComponent, compileDirective as render3CompileDirective} from '../render3/jit/directive';\nimport {compilePipe as render3CompilePipe} from '../render3/jit/pipe';\nimport {TypeDecorator, makeDecorator, makePropDecorator} from '../util/decorators';\nimport {noop} from '../util/noop';\n\nimport {ViewEncapsulation} from './view';\n\n\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n /**\n * Decorator that marks a class as an Angular directive.\n * You can define your own directives to attach custom behavior to elements in the DOM.\n *\n * The options provide configuration metadata that determines\n * how the directive should be processed, instantiated and used at\n * runtime.\n *\n * Directive classes, like component classes, can implement\n * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.\n *\n *\n * @usageNotes\n * To define a directive, mark the class with the decorator and provide metadata.\n *\n * ```ts\n * import {Directive} from '@angular/core';\n *\n * @Directive({\n * selector: 'my-directive',\n * })\n * export class MyDirective {\n * ...\n * }\n * ```\n *\n * ### Declaring directives\n *\n * Directives are [declarables](guide/glossary#declarable).\n * They must be declared by an NgModule\n * in order to be usable in an app.\n *\n * A directive must belong to exactly one NgModule. Do not re-declare\n * a directive imported from another module.\n * List the directive class in the `declarations` field of an NgModule.\n *\n * ```ts\n * declarations: [\n * AppComponent,\n * MyDirective\n * ],\n * ```\n *\n * @Annotation\n */\n (obj: Directive): TypeDecorator;\n\n /**\n * See the `Directive` decorator.\n */\n new (obj: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n /**\n * The CSS selector that identifies this directive in a template\n * and triggers instantiation of the directive.\n *\n * Declare as one of the following:\n *\n * - `element-name`: Select by element name.\n * - `.class`: Select by class name.\n * - `[attribute]`: Select by attribute name.\n * - `[attribute=value]`: Select by attribute name and value.\n * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n *\n * Angular only allows directives to apply on CSS selectors that do not cross\n * element boundaries.\n *\n * For the following template HTML, a directive with an `input[type=text]` selector,\n * would be instantiated only on the `<input type=\"text\">` element.\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n */\n selector?: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * @usageNotes\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n *\n * ```\n *\n */\n inputs?: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * in the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * @usageNotes\n *\n * ```typescript\n * @Component({\n * selector: 'child-dir',\n * outputs: [ 'bankNameChange' ]\n * template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n * })\n * class ChildDir {\n * bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `\n * {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n * `\n * })\n * class MainComponent {\n * bankName: string;\n *\n * onBankNameChange(bankName: string) {\n * this.bankName = bankName;\n * }\n * }\n * ```\n *\n */\n outputs?: string[];\n\n /**\n * Configures the [injector](guide/glossary#injector) of this\n * directive or component with a [token](guide/glossary#di-token)\n * that maps to a [provider](guide/glossary#provider) of a dependency.\n */\n providers?: Provider[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * @usageNotes\n *\n * ```ts\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`\n * })\n * class MainComponent {\n * }\n * ```\n *\n */\n exportAs?: string;\n\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * @usageNotes\n *\n * The following example shows how queries are defined\n * and when their results are available in lifecycle hooks:\n *\n * ```ts\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>'\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n *\n * @Annotation\n */\n queries?: {[key: string]: any};\n\n /**\n * Maps class properties to host element bindings for properties,\n * attributes, and events, using a set of key-value pairs.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, Angular updates the directive's host element.\n *\n * When the key is a property of the host element, the property value is\n * the propagated to the specified DOM property.\n *\n * When the key is a static attribute in the DOM, the attribute value\n * is propagated to the specified property in the host element.\n *\n * For event handling:\n * - The key is the DOM event that the directive listens to.\n * To listen to global events, add the target to the event name.\n * The target can be `window`, `document` or `body`.\n * - The value is the statement to execute when the event occurs. If the\n * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n * event. A handler method can refer to the `$event` local variable.\n *\n */\n host?: {[key: string]: string};\n\n /**\n * If true, this directive/component will be skipped by the AOT compiler and so will always be\n * compiled using JIT.\n *\n * This exists to support future Ivy work and has no effect currently.\n */\n jit?: true;\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n 'Directive', (dir: Directive = {}) => dir, undefined, undefined,\n (type: Type<any>, meta: Directive) => SWITCH_COMPILE_DIRECTIVE(type, meta));\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n /**\n * Decorator that marks a class as an Angular component and provides configuration\n * metadata that determines how the component should be processed,\n * instantiated, and used at runtime.\n *\n * Components are the most basic UI building block of an Angular app.\n * An Angular app contains a tree of Angular components.\n *\n * Angular components are a subset of directives, always associated with a template.\n * Unlike other directives, only one component can be instantiated per an element in a template.\n *\n * A component must belong to an NgModule in order for it to be available\n * to another component or application. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * Note that, in addition to these options for configuring a directive,\n * you can control a component's runtime behavior by implementing\n * life-cycle hooks. For more information, see the\n * [Lifecycle Hooks](guide/lifecycle-hooks) guide.\n *\n * @usageNotes\n *\n * ### Setting component inputs\n *\n * The following example creates a component with two data-bound properties,\n * specified by the `inputs` value.\n *\n * <code-example path=\"core/ts/metadata/directives.ts\" region=\"component-input\"\n * linenums=\"false\">\n * </code-example>\n *\n *\n * ### Setting component outputs\n *\n * The following example shows two event emitters that emit on an interval. One\n * emits an output every second, while the other emits every five seconds.\n *\n * {@example core/ts/metadata/directives.ts region='component-output-interval\n * linenums=\"false\"}\n *\n * ### Injecting a class with a view provider\n *\n * The following simple example injects a class into a component\n * using the view provider specified in component metadata:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`\n * })\n * class HelloWorld {\n * }\n *\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.\n * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * By default, the AOT compiler removes whitespace characters as follows:\n * * Trims all whitespaces at the beginning and the end of a template.\n * * Removes whitespace-only text nodes. For example,\n *\n * ```html\n * <button>Action 1</button> <button>Action 2</button>\n * ```\n *\n * becomes:\n *\n * ```html\n * <button>Action 1</button><button>Action 2</button>\n * ```\n *\n * * Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\n (obj: Component): TypeDecorator;\n /**\n * See the `Component` decorator.\n */\n new (obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n /**\n * The change-detection strategy to use for this component.\n *\n * When a component is instantiated, Angular creates a change detector,\n * which is responsible for propagating the component's bindings.\n * The strategy is one of:\n * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n * See [example](#injecting-a-class-with-a-view-provider).\n *\n */\n viewProviders?: Provider[];\n\n /**\n * The module ID of the module that contains the component.\n * The component must be able to resolve relative URLs for templates and styles.\n * SystemJS exposes the `__moduleName` variable within each module.\n * In CommonJS, this can be set to `module.id`.\n *\n */\n moduleId?: string;\n\n /**\n * The relative path or absolute URL of a template file for an Angular component.\n * If provided, do not supply an inline template using `template`.\n *\n */\n templateUrl?: string;\n\n /**\n * An inline template for an Angular component. If provided,\n * do not supply a template file using `templateUrl`.\n *\n */\n template?: string;\n\n /**\n * One or more relative paths or absolute URLs for files containing CSS stylesheets to use\n * in this component.\n */\n styleUrls?: string[];\n\n /**\n * One or more inline CSS stylesheets to use\n * in this component.\n */\n styles?: string[];\n\n /**\n * One or more animation `trigger()` calls, containing\n * `state()` and `transition()` definitions.\n * See the [Animations guide](/guide/animations) and animations API documentation.\n *\n */\n animations?: any[];\n\n /**\n * An encapsulation policy for the template and CSS styles. One of:\n * - `ViewEncapsulation.Native`: Deprecated. Use `ViewEncapsulation.ShadowDom` instead.\n * - `ViewEncapsulation.Emulated`: Use shimmed CSS that\n * emulates the native behavior.\n * - `ViewEncapsulation.None`: Use global CSS without any\n * encapsulation.\n * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.\n *\n * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is\n * `ViewEncapsulation.Emulated`.\n *\n * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`\n * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Overrides the default encapsulation start and end delimiters (`{{` and `}}`)\n */\n interpolation?: [string, string];\n\n /**\n * A set of components that should be compiled along with\n * this component. For each component listed here,\n * Angular creates a {@link ComponentFactory} and stores it in the\n * {@link ComponentFactoryResolver}.\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * True to preserve or false to remove potentially superfluous whitespace characters\n * from the compiled template. Whitespace characters are those matching the `\\s`\n * character class in JavaScript regular expressions. Default is false, unless\n * overridden in compiler options.\n */\n preserveWhitespaces?: boolean;\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n 'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n Directive, undefined,\n (type: Type<any>, meta: Component) => SWITCH_COMPILE_COMPONENT(type, meta));\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n /**\n *\n * Decorator that marks a class as pipe and supplies configuration metadata.\n *\n * A pipe class must implement the `PipeTransform` interface.\n * For example, if the name is \"myPipe\", use a template binding expression\n * such as the following:\n *\n * ```\n * {{ exp | myPipe }}\n * ```\n *\n * The result of the expression is passed to the pipe's `transform()` method.\n *\n * A pipe must belong to an NgModule in order for it to be available\n * to a template. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n */\n (obj: Pipe): TypeDecorator;\n\n /**\n * See the `Pipe` decorator.\n */\n new (obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n /**\n * The pipe name to use in template bindings.\n *\n */\n name: string;\n\n /**\n * When true, the pipe is pure, meaning that the\n * `transform()` method is invoked only when its input arguments\n * change. Pipes are pure by default.\n *\n * If the pipe has internal state (that is, the result\n * depends on state other than its arguments), set `pure` to false.\n * In this case, the pipe is invoked on each change-detection cycle,\n * even if the arguments have not changed.\n */\n pure?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n 'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,\n (type: Type<any>, meta: Pipe) => SWITCH_COMPILE_PIPE(type, meta));\n\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n /**\n * Decorator that marks a class field as an input property and supplies configuration metadata.\n * The input property is bound to a DOM property in the template. During change detection,\n * Angular automatically updates the data property with the DOM property's value.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for input binding.\n *\n * The following example creates a component with two input properties,\n * one of which is given a special binding name.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * // This property is bound using its original name.\n * @Input() bankName: string;\n * // this property value is bound to a different property name\n * // when this component is instantiated in a template.\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and is not automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bankName=\"RBC\" account-id=\"4747\"></bank-account>\n * `\n * })\n * class App {}\n * ```\n */\n (bindingPropertyName?: string): any;\n new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n /**\n * The name of the DOM property to which the input property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator =\n makePropDecorator('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n /**\n * Decorator that marks a class field as an output property and supplies configuration metadata.\n * The DOM property bound to the output property is automatically updated during change detection.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for output binding.\n *\n * See `Input` decorator for an example of providing a binding name.\n *\n */\n (bindingPropertyName?: string): any;\n new (bindingPropertyName?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n /**\n * The name of the DOM property to which the output property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator =\n makePropDecorator('Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n /**\n * Decorator that marks a DOM property as a host-binding property and supplies configuration\n * metadata.\n * Angular automatically checks host property bindings during change detection, and\n * if a binding changes it updates the host element of the directive.\n *\n * @usageNotes\n *\n * The following example creates a directive that sets the `valid` and `invalid`\n * properties on the DOM element that has an `ngModel` directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control: NgModel) {}\n * @HostBinding('class.valid') get valid() { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * })\n * class App {\n * prop;\n * }\n * ```\n *\n */\n (hostPropertyName?: string): any;\n new (hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n /**\n * The DOM property that is bound to a data property.\n */\n hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator =\n makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n /**\n * Decorator that declares a DOM event to listen for,\n * and provides a handler method to run when that event occurs.\n */\n (eventName: string, args?: string[]): any;\n new (eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n /**\n * The DOM event to listen for.\n */\n eventName?: string;\n /**\n * A set of arguments to pass to the handler method when the event occurs.\n */\n args?: string[];\n}\n\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator =\n makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\n\n\nexport const SWITCH_COMPILE_COMPONENT__POST_R3__ = render3CompileComponent;\nexport const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = render3CompileDirective;\nexport const SWITCH_COMPILE_PIPE__POST_R3__ = render3CompilePipe;\n\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n\nconst SWITCH_COMPILE_COMPONENT: typeof render3CompileComponent = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE: typeof render3CompileDirective = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE: typeof render3CompilePipe = SWITCH_COMPILE_PIPE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';\nimport {Provider} from '../di/interface/provider';\nimport {convertInjectableProviderToFactory} from '../di/util';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {NgModuleType} from '../render3';\nimport {compileNgModule as render3CompileNgModule} from '../render3/jit/module';\nimport {TypeDecorator, makeDecorator} from '../util/decorators';\n\n\n/**\n * Represents the expansion of an `NgModule` into its scopes.\n *\n * A scope is a set of directives and pipes that are visible in a particular context. Each\n * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will\n * be recognized in the templates of components declared by the module. The `exported` scope is the\n * set of directives and pipes exported by a module (that is, module B's exported scope gets added\n * to module A's compilation scope when module A imports B).\n */\nexport interface NgModuleTransitiveScopes {\n compilation: {directives: Set<any>; pipes: Set<any>;};\n exported: {directives: Set<any>; pipes: Set<any>;};\n schemas: SchemaMetadata[]|null;\n}\n\n/**\n * @publicApi\n */\nexport type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;\n\n/**\n * Runtime link information for NgModules.\n *\n * This is the internal data structure used by the runtime to assemble components, directives,\n * pipes, and injectors.\n *\n * NOTE: Always use `ɵɵdefineNgModule` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n */\nexport interface NgModuleDef<T> {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap: Type<any>[]|(() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations: Type<any>[]|(() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports: Type<any>[]|(() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports: Type<any>[]|(() => Type<any>[]);\n\n /**\n * Cached value of computed `transitiveCompileScopes` for this module.\n *\n * This should never be read directly, but accessed via `transitiveScopesFor`.\n */\n transitiveCompileScopes: NgModuleTransitiveScopes|null;\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas: SchemaMetadata[]|null;\n\n /** Unique ID for the module with which it should be registered. */\n id: string|null;\n}\n\n/**\n * A wrapper around an NgModule that associates it with the providers.\n *\n * @param T the module type. In Ivy applications, this must be explicitly\n * provided.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<\n T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {\n ngModule: Type<T>;\n providers?: Provider[];\n}\n\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n /**\n * Decorator that marks a class as an NgModule and supplies configuration metadata.\n */\n (obj?: NgModule): TypeDecorator;\n new (obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n /**\n * The set of injectable objects that are available in the injector\n * of this module.\n *\n * @see [Dependency Injection guide](guide/dependency-injection)\n * @see [NgModule guide](guide/providers)\n *\n * @usageNotes\n *\n * Dependencies whose providers are listed here become available for injection\n * into any component, directive, pipe or service that is a child of this injector.\n * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n * to any part of the app.\n *\n * A lazy-loaded module has its own injector, typically a child of the app root injector.\n * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n * If a lazy-loaded module also provides the `UserService`, any component created\n * within that module's context (such as by router navigation) gets the local instance\n * of the service, not the instance in the root injector.\n * Components in external modules continue to receive the instance provided by their injectors.\n *\n * ### Example\n *\n * The following example defines a class that is injected in\n * the HelloWorld NgModule:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @NgModule({\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n providers?: Provider[];\n\n /**\n * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))\n * that belong to this module.\n *\n * @usageNotes\n *\n * The set of selectors that are available to a template include those declared here, and\n * those that are exported from imported NgModules.\n *\n * Declarables must belong to exactly one module.\n * The compiler emits an error if you try to declare the same class in more than one module.\n * Be careful not to declare a class that is imported from another module.\n *\n * ### Example\n *\n * The following example allows the CommonModule to use the `NgFor`\n * directive.\n *\n * ```javascript\n * @NgModule({\n * declarations: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n declarations?: Array<Type<any>|any[]>;\n\n /**\n * The set of NgModules whose exported [declarables](guide/glossary#declarable)\n * are available to templates in this module.\n *\n * @usageNotes\n *\n * A template can use exported declarables from any\n * imported module, including those from modules that are imported indirectly\n * and re-exported.\n * For example, `ModuleA` imports `ModuleB`, and also exports\n * it, which makes the declarables from `ModuleB` available\n * wherever `ModuleA` is imported.\n *\n * ### Example\n *\n * The following example allows MainModule to use anything exported by\n * `CommonModule`:\n *\n * ```javascript\n * @NgModule({\n * imports: [CommonModule]\n * })\n * class MainModule {\n * }\n * ```\n *\n */\n imports?: Array<Type<any>|ModuleWithProviders<{}>|any[]>;\n\n /**\n * The set of components, directives, and pipes declared in this\n * NgModule that can be used in the template of any component that is part of an\n * NgModule that imports this NgModule. Exported declarations are the module's public API.\n *\n * A declarable belongs to one and only one NgModule.\n * A module can list another module among its exports, in which case all of that module's\n * public declaration are exported.\n *\n * @usageNotes\n *\n * Declarations are private by default.\n * If this ModuleA does not export UserComponent, then only the components within this\n * ModuleA can use UserComponent.\n *\n * ModuleA can import ModuleB and also export it, making exports from ModuleB\n * available to an NgModule that imports ModuleA.\n *\n * ### Example\n *\n * The following example exports the `NgFor` directive from CommonModule.\n *\n * ```javascript\n * @NgModule({\n * exports: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n exports?: Array<Type<any>|any[]>;\n\n /**\n * The set of components to compile when this NgModule is defined,\n * so that they can be dynamically loaded into the view.\n *\n * For each component listed here, Angular creates a `ComponentFactory`\n * and stores it in the `ComponentFactoryResolver`.\n *\n * Angular automatically adds components in the module's bootstrap\n * and route definitions into the `entryComponents` list. Use this\n * option to add components that are bootstrapped\n * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.\n *\n * @see [Entry Components](guide/entry-components)\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * The set of components that are bootstrapped when\n * this module is bootstrapped. The components listed here\n * are automatically added to `entryComponents`.\n */\n bootstrap?: Array<Type<any>|any[]>;\n\n /**\n * The set of schemas that declare elements to be allowed in the NgModule.\n * Elements and properties that are neither Angular components nor directives\n * must be declared in a schema.\n *\n * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n *\n * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n * you must ensure that allowed elements and properties securely escape inputs.\n */\n schemas?: Array<SchemaMetadata|any[]>;\n\n /**\n * A name or path that uniquely identifies this NgModule in `getModuleFactory`.\n * If left `undefined`, the NgModule is not registered with\n * `getModuleFactory`.\n */\n id?: string;\n\n /**\n * If true, this module will be skipped by the AOT compiler and so will always be compiled\n * using JIT.\n *\n * This exists to support future Ivy work and has no effect currently.\n */\n jit?: true;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,\n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n (type: NgModuleType, meta: NgModule) => SWITCH_COMPILE_NGMODULE(type, meta));\n\n/**\n * @description\n * Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule\n * annotation.\n *\n * Reference to the current application is provided as a parameter.\n *\n * See [\"Bootstrapping\"](guide/bootstrapping) and [\"Entry components\"](guide/entry-components).\n *\n * @usageNotes\n * ```typescript\n * class AppModule implements DoBootstrap {\n * ngDoBootstrap(appRef: ApplicationRef) {\n * appRef.bootstrap(AppComponent); // Or some other component\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; }\n\nfunction preR3NgModuleCompile(moduleType: InjectorType<any>, metadata: NgModule): void {\n let imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = [...imports, metadata.exports];\n }\n\n moduleType.ngInjectorDef = ɵɵdefineInjector({\n factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n}\n\n\nexport const SWITCH_COMPILE_NGMODULE__POST_R3__ = render3CompileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE: typeof render3CompileNgModule = SWITCH_COMPILE_NGMODULE__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\nimport {Attribute} from './di';\nimport {ContentChild, ContentChildren, Query, ViewChild, ViewChildren} from './metadata/di';\nimport {Component, Directive, HostBinding, HostListener, Input, Output, Pipe} from './metadata/directives';\nimport {DoBootstrap, ModuleWithProviders, NgModule} from './metadata/ng_module';\nimport {SchemaMetadata} from './metadata/schema';\nimport {ViewEncapsulation} from './metadata/view';\n\nexport {Attribute} from './di';\nexport {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './interface/lifecycle_hooks';\nexport {ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildDecorator, ContentChildren, ContentChildrenDecorator, Query, ViewChild, ViewChildDecorator, ViewChildren, ViewChildrenDecorator} from './metadata/di';\nexport {Component, ComponentDecorator, Directive, DirectiveDecorator, HostBinding, HostBindingDecorator, HostListener, HostListenerDecorator, Input, InputDecorator, Output, OutputDecorator, Pipe, PipeDecorator} from './metadata/directives';\nexport {DoBootstrap, ModuleWithProviders, NgModule, NgModuleDecorator} from './metadata/ng_module';\nexport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from './metadata/schema';\nexport {ViewEncapsulation} from './metadata/view';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPromise} from '../src/util/lang';\n\nimport {Inject, Injectable, InjectionToken, Optional} from './di';\n\n\n/**\n * A function that will be executed when an application is initialized.\n *\n * @publicApi\n */\nexport const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationInitStatus {\n // TODO(issue/24571): remove '!'.\n private resolve !: Function;\n // TODO(issue/24571): remove '!'.\n private reject !: Function;\n private initialized = false;\n public readonly donePromise: Promise<any>;\n public readonly done = false;\n\n constructor(@Inject(APP_INITIALIZER) @Optional() private appInits: (() => any)[]) {\n this.donePromise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises: Promise<any>[] = [];\n\n const complete = () => {\n (this as{done: boolean}).done = true;\n this.resolve();\n };\n\n if (this.appInits) {\n for (let i = 0; i < this.appInits.length; i++) {\n const initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n\n Promise.all(asyncInitPromises).then(() => { complete(); }).catch(e => { this.reject(e); });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './di';\nimport {ComponentRef} from './linker/component_factory';\n\n\n/**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>('AppId');\n\nexport function _appIdRandomProviderFactory() {\n return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @publicApi\n */\nexport const APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: <any[]>[],\n};\n\nfunction _randomChar(): string {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n\n/**\n * A function that will be executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');\n\n/**\n * A token that indicates an opaque platform id.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>('Platform ID');\n\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER =\n new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');\n\n/**\n * A token which indicates the root directory of the application\n * @publicApi\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from './di';\n\n@Injectable()\nexport class Console {\n log(message: string): void {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message: string): void {\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID = new InjectionToken<string>('LocaleId');\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>('Translations');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[]) {}\n}\n\n\nfunction _throwError() {\n throw new Error(`Runtime compiler is not loaded`);\n}\n\nconst Compiler_compileModuleSync__PRE_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T> =\n _throwError as any;\nexport const Compiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) =>\n NgModuleFactory<T> = function<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n\nconst Compiler_compileModuleAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = _throwError as any;\nexport const Compiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = function<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = function<T>(moduleType: Type<T>):\n ModuleWithComponentFactories<T> {\n const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n const moduleDef = getNgModuleDef(moduleType) !;\n const componentFactories =\n maybeUnwrapFn(moduleDef.declarations)\n .reduce((factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n }, [] as ComponentFactory<any>[]);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync =\n Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = function<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync =\n Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n@Injectable()\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T> = Compiler_compileModuleSync;\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync:\n <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>> = Compiler_compileModuleAsync;\n\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T> =\n Compiler_compileModuleAndAllComponentsSync;\n\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = Compiler_compileModuleAndAllComponentsAsync;\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string|undefined { return undefined; }\n}\n\n/**\n * Options for creating a compiler\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n useJit?: boolean,\n defaultEncapsulation?: ViewEncapsulation,\n providers?: StaticProvider[],\n missingTranslation?: MissingTranslationStrategy,\n preserveWhitespaces?: boolean,\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {global} from '../util/global';\n\n/**\n * A scope function for the Web Tracing Framework (WTF).\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport interface WtfScopeFn { (arg0?: any, arg1?: any): any; }\n\ninterface WTF {\n trace: Trace;\n}\n\ninterface Trace {\n events: Events;\n leaveScope(scope: Scope, returnValue: any): any /** TODO #9100 */;\n beginTimeRange(rangeType: string, action: string): Range;\n endTimeRange(range: Range): any /** TODO #9100 */;\n}\n\nexport interface Range {}\n\ninterface Events {\n createScope(signature: string, flags: any): Scope;\n}\n\nexport interface Scope { (...args: any[] /** TODO #9100 */): any; }\n\nlet trace: Trace;\nlet events: Events;\n\nexport function detectWTF(): boolean {\n const wtf: WTF = (global as any /** TODO #9100 */)['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n}\n\nexport function createScope(signature: string, flags: any = null): any {\n return events.createScope(signature, flags);\n}\n\nexport function leave<T>(scope: Scope): void;\nexport function leave<T>(scope: Scope, returnValue?: T): T;\nexport function leave<T>(scope: Scope, returnValue?: any): any {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n}\n\nexport function startTimeRange(rangeType: string, action: string): Range {\n return trace.beginTimeRange(rangeType, action);\n}\n\nexport function endTimeRange(range: Range): void {\n trace.endTimeRange(range);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {WtfScopeFn, createScope, detectWTF, endTimeRange, leave, startTimeRange} from './wtf_impl';\n\nexport {WtfScopeFn} from './wtf_impl';\n\n\n/**\n * True if WTF is enabled.\n */\nexport const wtfEnabled = detectWTF();\n\nfunction noopScope(arg0?: any, arg1?: any): any {\n return null;\n}\n\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =\n wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope;\n\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfLeave: <T>(scope: any, returnValue?: T) => T =\n wtfEnabled ? leave : (s: any, r?: any) => r;\n\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfStartTimeRange: (rangeType: string, action: string) => any =\n wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null;\n\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\nexport const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst promise: Promise<any> = (() => Promise.resolve(0))();\n\ndeclare const Zone: any;\n\nexport function scheduleMicroTask(fn: Function) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(() => { fn && fn.apply(null, null); });\n } else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter} from '../event_emitter';\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor({enableLongStackTrace = false}) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['wtfZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['wtfZoneSpec']);\n }\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean { return Zone.current.get('isAngularZone') === true; }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs) as T;\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs) as T;\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs) as T;\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn) as T;\n }\n}\n\nfunction noop() {}\nconst EMPTY_PAYLOAD = {};\n\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n\n hasPendingMicrotasks: boolean;\n hasPendingMacrotasks: boolean;\n isStable: boolean;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{'isAngularZone': true},\n onInvokeTask: (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task, applyThis: any,\n applyArgs: any): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n onLeave(zone);\n }\n },\n\n\n onInvoke: (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function,\n applyThis: any, applyArgs: any[], source: string): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n onLeave(zone);\n }\n },\n\n onHasTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone.hasPendingMicrotasks = hasTaskState.microTask;\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n readonly isStable: boolean = true;\n readonly onUnstable: EventEmitter<any> = new EventEmitter();\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter();\n readonly onStable: EventEmitter<any> = new EventEmitter();\n readonly onError: EventEmitter<any> = new EventEmitter();\n\n run(fn: () => any): any { return fn(); }\n\n runGuarded(fn: () => any): any { return fn(); }\n\n runOutsideAngular(fn: () => any): any { return fn(); }\n\n runTask<T>(fn: () => any): any { return fn(); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '../di';\nimport {scheduleMicroTask} from '../util/microtask';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\n// Angular internal, not intended for public API.\nexport type DoneCallback = (didWork: boolean, tasks?: PendingMacrotask[]) => void;\nexport type UpdateCallback = (tasks: PendingMacrotask[]) => boolean;\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: DoneCallback;\n updateCb?: UpdateCallback;\n}\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _pendingCount: number = 0;\n private _isZoneStable: boolean = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n private _didWork: boolean = false;\n private _callbacks: WaitCallback[] = [];\n\n private taskTrackingZone: {macroTasks: Task[]}|null = null;\n\n constructor(private _ngZone: NgZone) {\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._didWork = true;\n this._isZoneStable = false;\n }\n });\n\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n }\n });\n });\n }\n\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n increasePendingRequestCount(): number {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n decreasePendingRequestCount(): number {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop() !;\n clearTimeout(cb.timeoutId);\n cb.doneCb(this._didWork);\n }\n this._didWork = false;\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n\n this._didWork = true;\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this.taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data\n };\n });\n }\n\n private addCallback(cb: DoneCallback, timeout?: number, updateCb?: UpdateCallback) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb(this._didWork, this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\n\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb as DoneCallback, timeout, updateCb as UpdateCallback);\n this._runCallbacksIfReady();\n }\n\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n getPendingRequestCount(): number { return this._pendingCount; }\n\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable()\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n constructor() { _testabilityGetter.addToWindow(this); }\n\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) { this._applications.delete(token); }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() { this._applications.clear(); }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability|null { return this._applications.get(elem) || null; }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] { return Array.from(this._applications.values()); }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] { return Array.from(this._applications.keys()); }\n\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability|null {\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null;\n}\n\nclass _NoopGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {}\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null {\n return null;\n }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability = new _NoopGetTestability();\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, Observer, Subscription, merge} from 'rxjs';\nimport {share} from 'rxjs/operators';\n\nimport {ApplicationInitStatus} from './application_init';\nimport {APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER} from './application_tokens';\nimport {getCompilerFacade} from './compiler/compiler_facade';\nimport {Console} from './console';\nimport {Injectable, InjectionToken, Injector, StaticProvider} from './di';\nimport {ErrorHandler} from './error_handler';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {Type} from './interface/type';\nimport {COMPILER_OPTIONS, CompilerFactory, CompilerOptions} from './linker/compiler';\nimport {ComponentFactory, ComponentRef} from './linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from './linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nimport {InternalViewRef, ViewRef} from './linker/view_ref';\nimport {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';\nimport {WtfScopeFn, wtfCreateScope, wtfLeave} from './profile/profile';\nimport {assertNgModuleType} from './render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from './render3/component_ref';\nimport {DEFAULT_LOCALE_ID, setLocaleId} from './render3/i18n';\nimport {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';\nimport {Testability, TestabilityRegistry} from './testability/testability';\nimport {isDevMode} from './util/is_dev_mode';\nimport {isPromise} from './util/lang';\nimport {scheduleMicroTask} from './util/microtask';\nimport {stringify} from './util/stringify';\nimport {NgZone, NoopNgZone} from './zone/ng_zone';\n\nlet _platform: PlatformRef;\n\nlet compileNgModuleFactory:\n <M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>) =>\n Promise<NgModuleFactory<M>> = compileNgModuleFactory__PRE_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n const compilerFactory: CompilerFactory = injector.get(CompilerFactory);\n const compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n}\n\nexport function compileNgModuleFactory__POST_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers !));\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade();\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\n\nlet isBoundToModule: <C>(cf: ComponentFactory<C>) => boolean = isBoundToModule__PRE_R3__;\n\nexport function isBoundToModule__PRE_R3__<C>(cf: ComponentFactory<C>): boolean {\n return cf instanceof ComponentFactoryBoundToModule;\n}\n\nexport function isBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultipleToken');\n\n\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(public name: string, public token: any) {}\n}\n\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error(\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) inits.forEach((init: any) => init());\n return _platform;\n}\n\n/**\n * Creates a factory for a platform\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,\n name: string, providers: StaticProvider[] = []): (extraProviders?: StaticProvider[]) =>\n PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(\n providers.concat(extraProviders).concat({provide: marker, useValue: true}));\n } else {\n const injectedProviders: StaticProvider[] =\n providers.concat(extraProviders).concat({provide: marker, useValue: true});\n createPlatform(Injector.create({providers: injectedProviders, name: desc}));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new Error('No platform exists!');\n }\n\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error(\n 'A platform with a different configuration has been created. Please destroy it first.');\n }\n\n return platform;\n}\n\n/**\n * Destroy the existing platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef|null {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone|'zone.js'|'noop';\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Function[] = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):\n Promise<NgModuleRef<M>> {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZoneOption = options ? options.ngZone : undefined;\n const ngZone = getNgZone(ngZoneOption);\n const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create(\n {providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});\n const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);\n const exceptionHandler: ErrorHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n // If the `LOCALE_ID` provider is defined at bootstrap we set the value for runtime i18n (ivy)\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId);\n moduleRef.onDestroy(() => remove(this._modules, moduleRef));\n ngZone !.runOutsideAngular(\n () => ngZone !.onError.subscribe(\n {next: (error: any) => { exceptionHandler.handleError(error); }}));\n return _callAndReportToErrorHandler(exceptionHandler, ngZone !, () => {\n const initStatus: ApplicationInitStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>, compilerOptions: (CompilerOptions&BootstrapOptions)|\n Array<CompilerOptions&BootstrapOptions> = []): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n\n private _moduleDoBootstrap(moduleRef: InternalNgModuleRef<any>): void {\n const appRef = moduleRef.injector.get(ApplicationRef) as ApplicationRef;\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new Error(\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n\n /**\n * Register a listener to be called when the platform is disposed.\n */\n onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }\n\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector { return this._injector; }\n\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }\n\n get destroyed() { return this._destroyed; }\n}\n\nfunction getNgZone(ngZoneOption?: NgZone | 'zone.js' | 'noop'): NgZone {\n let ngZone: NgZone;\n\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n } else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({enableLongStackTrace: isDevMode()});\n }\n return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(\n errorHandler: ErrorHandler, ngZone: NgZone, callback: () => any): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n\nfunction optionsReducer<T extends Object>(dst: any, objs: T | T[]): T {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n } else {\n dst = {...dst, ...(objs as any)};\n }\n return dst;\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationRef {\n /** @internal */\n static _tickScope: WtfScopeFn = wtfCreateScope('ApplicationRef#tick()');\n private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n private _views: InternalViewRef[] = [];\n private _runningTick: boolean = false;\n private _enforceNoNewChanges: boolean = false;\n private _stable = true;\n\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n *\n * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.\n */\n // TODO(issue/24571): remove '!'.\n public readonly isStable !: Observable<boolean>;\n\n /** @internal */\n constructor(\n private _zone: NgZone, private _console: Console, private _injector: Injector,\n private _exceptionHandler: ErrorHandler,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _initStatus: ApplicationInitStatus) {\n this._enforceNoNewChanges = isDevMode();\n\n this._zone.onMicrotaskEmpty.subscribe(\n {next: () => { this._zone.run(() => { this.tick(); }); }});\n\n const isCurrentlyStable = new Observable<boolean>((observer: Observer<boolean>) => {\n this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks;\n this._zone.runOutsideAngular(() => {\n observer.next(this._stable);\n observer.complete();\n });\n });\n\n const isStable = new Observable<boolean>((observer: Observer<boolean>) => {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n let stableSub: Subscription;\n this._zone.runOutsideAngular(() => {\n stableSub = this._zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(() => {\n if (!this._stable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks) {\n this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n\n const unstableSub: Subscription = this._zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n if (this._stable) {\n this._stable = false;\n this._zone.runOutsideAngular(() => { observer.next(false); });\n }\n });\n\n return () => {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n\n (this as{isStable: Observable<boolean>}).isStable =\n merge(isCurrentlyStable, isStable.pipe(share()));\n }\n\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n bootstrap<C>(componentOrFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?: string|any):\n ComponentRef<C> {\n if (!this._initStatus.done) {\n throw new Error(\n 'Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n let componentFactory: ComponentFactory<C>;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory) !;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule = isBoundToModule(componentFactory) ? null : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n\n compRef.onDestroy(() => { this._unloadComponent(compRef); });\n const testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\n `Angular is running in the development mode. Call enableProdMode() to enable the production mode.`);\n }\n return compRef;\n }\n\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick(): void {\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n\n const scope = ApplicationRef._tickScope();\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n if (this._enforceNoNewChanges) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n } finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n }\n\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners =\n this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach((listener) => listener(componentRef));\n }\n\n private _unloadComponent(componentRef: ComponentRef<any>): void {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n }\n\n /** @internal */\n ngOnDestroy() {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach((view) => view.destroy());\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() { return this._views.length; }\n}\n\nfunction remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n const result: any[] = [];\n parts.forEach((part) => part && result.push(...part));\n return result;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Public API for Zone\nexport {NgZone, NoopNgZone as ɵNoopNgZone} from './zone/ng_zone';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Public API for render\nexport {RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2, RootRenderer} from './render/api';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory as R3NgModuleFactory, NgModuleType} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_factory_registration';\n\n\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class NgModuleFactoryLoader {\n abstract load(path: string): Promise<NgModuleFactory<any>>;\n}\n\nexport function getModuleFactory__PRE_R3__(id: string): NgModuleFactory<any> {\n const factory = getRegisteredNgModuleType(id) as NgModuleFactory<any>| null;\n if (!factory) throw noModuleError(id);\n return factory;\n}\n\nexport function getModuleFactory__POST_R3__(id: string): NgModuleFactory<any> {\n const type = getRegisteredNgModuleType(id) as NgModuleType | null;\n if (!type) throw noModuleError(id);\n return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nexport const getModuleFactory: (id: string) => NgModuleFactory<any> = getModuleFactory__PRE_R3__;\n\nfunction noModuleError(id: string, ): Error {\n return new Error(`No module with ID ${id} loaded`);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nexport const ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Injectable, Optional} from '../di';\nimport {ivyEnabled} from '../ivy_switch';\n\nimport {Compiler} from './compiler';\nimport {NgModuleFactory} from './ng_module_factory';\nimport {NgModuleFactoryLoader} from './ng_module_factory_loader';\n\nconst _SEPARATOR = '#';\n\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\ndeclare var System: any;\n\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class SystemJsNgModuleLoaderConfig {\n /**\n * Prefix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathPrefix !: string;\n\n /**\n * Suffix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathSuffix !: string;\n}\n\nconst DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n@Injectable()\nexport class SystemJsNgModuleLoader implements NgModuleFactoryLoader {\n private _config: SystemJsNgModuleLoaderConfig;\n\n constructor(private _compiler: Compiler, @Optional() config?: SystemJsNgModuleLoaderConfig) {\n this._config = config || DEFAULT_CONFIG;\n }\n\n load(path: string): Promise<NgModuleFactory<any>> {\n const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n }\n\n private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n if (exportName === undefined) {\n exportName = 'default';\n }\n\n return System.import(module)\n .then((module: any) => module[exportName])\n .then((type: any) => checkNotEmpty(type, module, exportName))\n .then((type: any) => this._compiler.compileModuleAsync(type));\n }\n\n private loadFactory(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then((module: any) => module[exportName + factoryClassSuffix])\n .then((factory: any) => checkNotEmpty(factory, module, exportName));\n }\n}\n\nfunction checkNotEmpty(value: any, modulePath: string, exportName: string): any {\n if (!value) {\n throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n }\n return value;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationRef} from '../application_ref';\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular [view](guide/glossary#view),\n * specifically the [host view](guide/glossary#view-tree) that is defined by a component.\n * Also serves as the base class\n * that adds destroy methods for [embedded views](guide/glossary#view-tree).\n *\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n /**\n * Destroys this view and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Reports whether this view has been destroyed.\n * @returns True after the `destroy()` method has been called, false otherwise.\n */\n abstract get destroyed(): boolean;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for views.\n * @param callback A handler function that cleans up developer-defined data\n * associated with a view. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): any /** TODO #9100 */;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n /**\n * The context for this view, inherited from the anchor element.\n */\n abstract get context(): C;\n\n /**\n * The root nodes for this embedded view.\n */\n abstract get rootNodes(): any[];\n}\n\nexport interface InternalViewRef extends ViewRef {\n detachFromAppRef(): void;\n attachToAppRef(appRef: ApplicationRef): void;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Public API for compiler\nexport {COMPILER_OPTIONS, Compiler, CompilerFactory, CompilerOptions, ModuleWithComponentFactories} from './linker/compiler';\nexport {ComponentFactory, ComponentRef} from './linker/component_factory';\nexport {ComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {ElementRef} from './linker/element_ref';\nexport {NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nexport {NgModuleFactoryLoader, getModuleFactory} from './linker/ng_module_factory_loader';\nexport {QueryList} from './linker/query_list';\nexport {SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig} from './linker/system_js_ng_module_factory_loader';\nexport {TemplateRef} from './linker/template_ref';\nexport {ViewContainerRef} from './linker/view_container_ref';\nexport {EmbeddedViewRef, ViewRef} from './linker/view_ref';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di';\nimport {getViewComponent} from '../render3/global_utils_api';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {StylingIndex} from '../render3/interfaces/styling';\nimport {LView, PARENT, TData, TVIEW, T_HOST} from '../render3/interfaces/view';\nimport {getProp, getValue, isClassBasedValue} from '../render3/styling/class_and_style_bindings';\nimport {getStylingContextFromLView} from '../render3/styling/util';\nimport {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, isBrowserEvents, loadLContext, loadLContextFromNode} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER, isPropMetadataString, renderStringify} from '../render3/util/misc_utils';\nimport {findComponentView} from '../render3/util/view_traversal_utils';\nimport {getComponentViewByIndex, getNativeByTNode, isComponent, isLContainer} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\nimport {DebugContext} from '../view/index';\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n constructor(public name: string, public callback: Function) {}\n}\n\n/**\n * @publicApi\n */\nexport interface DebugNode {\n readonly listeners: DebugEventListener[];\n readonly parent: DebugElement|null;\n readonly nativeNode: any;\n readonly injector: Injector;\n readonly componentInstance: any;\n readonly context: any;\n readonly references: {[key: string]: any};\n readonly providerTokens: any[];\n}\nexport class DebugNode__PRE_R3__ {\n readonly listeners: DebugEventListener[] = [];\n readonly parent: DebugElement|null = null;\n readonly nativeNode: any;\n private readonly _debugContext: DebugContext;\n\n constructor(nativeNode: any, parent: DebugNode|null, _debugContext: DebugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n\n get injector(): Injector { return this._debugContext.injector; }\n\n get componentInstance(): any { return this._debugContext.component; }\n\n get context(): any { return this._debugContext.context; }\n\n get references(): {[key: string]: any} { return this._debugContext.references; }\n\n get providerTokens(): any[] { return this._debugContext.providerTokens; }\n}\n\n/**\n * @publicApi\n */\nexport interface DebugElement extends DebugNode {\n readonly name: string;\n readonly properties: {[key: string]: any};\n readonly attributes: {[key: string]: string | null};\n readonly classes: {[key: string]: boolean};\n readonly styles: {[key: string]: string | null};\n readonly childNodes: DebugNode[];\n readonly nativeElement: any;\n readonly children: DebugElement[];\n\n query(predicate: Predicate<DebugElement>): DebugElement;\n queryAll(predicate: Predicate<DebugElement>): DebugElement[];\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];\n triggerEventHandler(eventName: string, eventObj: any): void;\n}\nexport class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ implements DebugElement {\n readonly name !: string;\n readonly properties: {[key: string]: any} = {};\n readonly attributes: {[key: string]: string | null} = {};\n readonly classes: {[key: string]: boolean} = {};\n readonly styles: {[key: string]: string | null} = {};\n readonly childNodes: DebugNode[] = [];\n readonly nativeElement: any;\n\n constructor(nativeNode: any, parent: any, _debugContext: DebugContext) {\n super(nativeNode, parent, _debugContext);\n this.nativeElement = nativeNode;\n }\n\n addChild(child: DebugNode) {\n if (child) {\n this.childNodes.push(child);\n (child as{parent: DebugNode}).parent = this;\n }\n }\n\n removeChild(child: DebugNode) {\n const childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n (child as{parent: DebugNode | null}).parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n }\n\n insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {\n const siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n newChildren.forEach(c => {\n if (c.parent) {\n (c.parent as DebugElement__PRE_R3__).removeChild(c);\n }\n (child as{parent: DebugNode}).parent = this;\n });\n }\n }\n\n insertBefore(refChild: DebugNode, newChild: DebugNode): void {\n const refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n } else {\n if (newChild.parent) {\n (newChild.parent as DebugElement__PRE_R3__).removeChild(newChild);\n }\n (newChild as{parent: DebugNode}).parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n }\n\n get children(): DebugElement[] {\n return this\n .childNodes //\n .filter((node) => node instanceof DebugElement__PRE_R3__) as DebugElement[];\n }\n\n triggerEventHandler(eventName: string, eventObj: any) {\n this.listeners.forEach((listener) => {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n return debugEls.map((el) => el.nativeElement);\n}\n\nfunction _queryElementChildren(\n element: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[]) {\n element.childNodes.forEach(node => {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\n\nfunction _queryNodeChildren(\n parentNode: DebugNode, predicate: Predicate<DebugNode>, matches: DebugNode[]) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(node => {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\nclass DebugNode__POST_R3__ implements DebugNode {\n readonly nativeNode: Node;\n\n constructor(nativeNode: Node) { this.nativeNode = nativeNode; }\n\n get parent(): DebugElement|null {\n const parent = this.nativeNode.parentNode as Element;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n }\n\n get injector(): Injector { return getInjector(this.nativeNode); }\n\n get componentInstance(): any {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement as Element) || getViewComponent(nativeElement));\n }\n get context(): any { return getContext(this.nativeNode as Element); }\n\n get listeners(): DebugEventListener[] {\n return getListeners(this.nativeNode as Element).filter(isBrowserEvents);\n }\n\n get references(): {[key: string]: any;} { return getLocalRefs(this.nativeNode); }\n\n get providerTokens(): any[] { return getInjectionTokens(this.nativeNode as Element); }\n}\n\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {\n constructor(nativeNode: Element) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n\n get nativeElement(): Element|null {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode as Element : null;\n }\n\n get name(): string { return this.nativeElement !.nodeName; }\n\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties(): {[key: string]: any;} {\n const context = loadLContext(this.nativeNode) !;\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n\n const properties = collectPropertyBindings(tNode, lView, tData);\n const hostProperties = collectHostPropertyBindings(tNode, lView, tData);\n const className = collectClassNames(this);\n const output = {...properties, ...hostProperties};\n\n if (className) {\n output['className'] = output['className'] ? output['className'] + ` ${className}` : className;\n }\n\n return output;\n }\n\n get attributes(): {[key: string]: string | null;} {\n const attributes: {[key: string]: string | null;} = {};\n const element = this.nativeElement;\n\n if (!element) {\n return attributes;\n }\n\n const context = loadLContext(element);\n const lView = context.lView;\n const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n const lowercaseTNodeAttrs: string[] = [];\n\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string') break;\n\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue as string;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n i += 2;\n }\n }\n\n const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(attr.name) === -1) {\n attributes[attr.name] = attr.value;\n }\n }\n\n return attributes;\n }\n\n get classes(): {[key: string]: boolean;} {\n const classes: {[key: string]: boolean;} = {};\n const element = this.nativeElement;\n if (element) {\n const lContext = loadLContextFromNode(element);\n const stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (let i = StylingIndex.SingleStylesStartPosition; i < stylingContext.length;\n i += StylingIndex.Size) {\n if (isClassBasedValue(stylingContext, i)) {\n const className = getProp(stylingContext, i);\n const value = getValue(stylingContext, i);\n if (typeof value == 'boolean') {\n // we want to ignore `null` since those don't overwrite the values.\n classes[className] = value;\n }\n }\n }\n } else {\n // Fallback, just read DOM.\n const eClasses = element.classList;\n for (let i = 0; i < eClasses.length; i++) {\n classes[eClasses[i]] = true;\n }\n }\n }\n return classes;\n }\n\n get styles(): {[key: string]: string | null;} {\n const styles: {[key: string]: string | null;} = {};\n const element = this.nativeElement;\n if (element) {\n const lContext = loadLContextFromNode(element);\n const stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (let i = StylingIndex.SingleStylesStartPosition; i < stylingContext.length;\n i += StylingIndex.Size) {\n if (!isClassBasedValue(stylingContext, i)) {\n const styleName = getProp(stylingContext, i);\n const value = getValue(stylingContext, i) as string | null;\n if (value !== null) {\n // we want to ignore `null` since those don't overwrite the values.\n styles[styleName] = value;\n }\n }\n }\n } else {\n // Fallback, just read DOM.\n const eStyles = (element as HTMLElement).style;\n for (let i = 0; i < eStyles.length; i++) {\n const name = eStyles.item(i);\n styles[name] = eStyles.getPropertyValue(name);\n }\n }\n }\n return styles;\n }\n\n get childNodes(): DebugNode[] {\n const childNodes = this.nativeNode.childNodes;\n const children: DebugNode[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n get children(): DebugElement[] {\n const nativeElement = this.nativeElement;\n if (!nativeElement) return [];\n const childNodes = nativeElement.children;\n const children: DebugElement[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n }\n\n triggerEventHandler(eventName: string, eventObj: any): void {\n this.listeners.forEach((listener) => {\n if (listener.name === eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean) {\n const context = loadLContext(parentElement.nativeNode) !;\n const parentTNode = context.lView[TVIEW].data[context.nodeIndex] as TNode;\n _queryNodeChildrenR3(\n parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _queryNodeChildrenR3(\n tNode: TNode, lView: LView, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean, rootNativeNode: any) {\n const nativeNode = getNativeByTNode(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type === TNodeType.Element || tNode.type === TNodeType.ElementContainer) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponent(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(\n componentView[TVIEW].firstChild !, componentView, predicate, matches, elementsOnly,\n rootNativeNode);\n }\n } else if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(\n nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.type === TNodeType.Container) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n } else if (tNode.type === TNodeType.Projection) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = findComponentView(lView !);\n const componentHost = componentView[T_HOST] as TElementNode;\n const head: TNode|null =\n (componentHost.projection as(TNode | null)[])[tNode.projection as number];\n\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (head) {\n const nextLView = componentView[PARENT] !as LView;\n const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & TNodeFlags.isProjected) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _queryNodeChildrenInContainerR3(\n lContainer: LContainer, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: boolean, rootNativeNode: any) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i];\n _queryNodeChildrenR3(\n childView[TVIEW].node !, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\nfunction _addQueryMatchR3(\n nativeNode: any, predicate: Predicate<DebugNode>, matches: DebugNode[], elementsOnly: boolean,\n rootNativeNode: any) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (debugNode && (elementsOnly ? debugNode instanceof DebugElement__POST_R3__ : true) &&\n predicate(debugNode)) {\n matches.push(debugNode);\n }\n }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n const properties: {[key: string]: string} = {};\n let bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData);\n\n while (bindingIndex < tNode.propertyMetadataEndIndex) {\n let value: any;\n let propMetadata = tData[bindingIndex] as string;\n while (!isPropMetadataString(propMetadata)) {\n // This is the first value for an interpolation. We need to build up\n // the full interpolation by combining runtime values in LView with\n // the static interstitial values stored in TData.\n value = (value || '') + renderStringify(lView[bindingIndex]) + tData[bindingIndex];\n propMetadata = tData[++bindingIndex] as string;\n }\n value = value === undefined ? lView[bindingIndex] : value += lView[bindingIndex];\n // Property metadata string has 3 parts: property name, prefix, and suffix\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n // Attr bindings don't have property names and should be skipped\n if (propertyName) {\n // Wrap value with prefix and suffix (will be '' for normal bindings), if they're defined.\n // Avoid wrapping for normal bindings so that the value doesn't get cast to a string.\n properties[propertyName] = (metadataParts[1] && metadataParts[2]) ?\n metadataParts[1] + value + metadataParts[2] :\n value;\n }\n bindingIndex++;\n }\n return properties;\n}\n\n/**\n * Retrieves the first binding index that holds values for this property\n * binding.\n *\n * For normal bindings (e.g. `[id]=\"id\"`), the binding index is the\n * same as the metadata index. For interpolations (e.g. `id=\"{{id}}-{{name}}\"`),\n * there can be multiple binding values, so we might have to loop backwards\n * from the metadata index until we find the first one.\n *\n * @param metadataIndex The index of the first property metadata string for\n * this node.\n * @param tData The data array for the current TView\n * @returns The first binding index for this binding\n */\nfunction getFirstBindingIndex(metadataIndex: number, tData: TData): number {\n let currentBindingIndex = metadataIndex - 1;\n\n // If the slot before the metadata holds a string, we know that this\n // metadata applies to an interpolation with at least 2 bindings, and\n // we need to search further to access the first binding value.\n let currentValue = tData[currentBindingIndex];\n\n // We need to iterate until we hit either a:\n // - TNode (it is an element slot marking the end of `consts` section), OR a\n // - metadata string (slot is attribute metadata or a previous node's property metadata)\n while (typeof currentValue === 'string' && !isPropMetadataString(currentValue)) {\n currentValue = tData[--currentBindingIndex];\n }\n return currentBindingIndex + 1;\n}\n\nfunction collectHostPropertyBindings(\n tNode: TNode, lView: LView, tData: TData): {[key: string]: string} {\n const properties: {[key: string]: string} = {};\n\n // Host binding values for a node are stored after directives on that node\n let hostPropIndex = tNode.directiveEnd;\n let propMetadata = tData[hostPropIndex] as any;\n\n // When we reach a value in TView.data that is not a string, we know we've\n // hit the next node's providers and directives and should stop copying data.\n while (typeof propMetadata === 'string') {\n const propertyName = propMetadata.split(INTERPOLATION_DELIMITER)[0];\n properties[propertyName] = lView[hostPropIndex];\n propMetadata = tData[++hostPropIndex];\n }\n return properties;\n}\n\n\nfunction collectClassNames(debugElement: DebugElement__POST_R3__): string {\n const classes = debugElement.classes;\n let output = '';\n\n for (const className of Object.keys(classes)) {\n if (classes[className]) {\n output = output ? output + ` ${className}` : className;\n }\n }\n\n return output;\n}\n\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nfunction getDebugNode__PRE_R3__(nativeNode: any): DebugNode|null {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\nexport function getDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: null): null;\nexport function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n (nativeNode as any)[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode as Element) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return (nativeNode as any)[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n\n/**\n * @publicApi\n */\nexport const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__;\n\nexport function getAllDebugNodes(): DebugNode[] {\n return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport interface Predicate<T> { (value: T): boolean; }\n\n/**\n * @publicApi\n */\nexport const DebugNode: {new (...args: any[]): DebugNode} = DebugNode__PRE_R3__;\n\n/**\n * @publicApi\n */\nexport const DebugElement: {new (...args: any[]): DebugElement} = DebugElement__PRE_R3__;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Change detection enables data binding in Angular.\n */\n\nexport {ChangeDetectionStrategy, ChangeDetectorRef, CollectionChangeRecord, DefaultIterableDiffer, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers, NgIterable, PipeTransform, SimpleChange, SimpleChanges, TrackByFunction, WrappedValue} from './change_detection/change_detection';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformRef, createPlatformFactory} from './application_ref';\nimport {PLATFORM_ID} from './application_tokens';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {TestabilityRegistry} from './testability/testability';\n\nconst _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [\n // Set a default platform name for platforms that don't set it explicitly.\n {provide: PLATFORM_ID, useValue: 'unknown'},\n {provide: PlatformRef, deps: [Injector]},\n {provide: TestabilityRegistry, deps: []},\n {provide: Console, deps: []},\n];\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nimport {ApplicationRef} from './application_ref';\nimport {APP_ID_RANDOM_PROVIDER} from './application_tokens';\nimport {IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers} from './change_detection/change_detection';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {Inject, Optional, SkipSelf} from './di/metadata';\nimport {ErrorHandler} from './error_handler';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {ComponentFactoryResolver} from './linker';\nimport {Compiler} from './linker/compiler';\nimport {NgModule} from './metadata';\nimport {SCHEDULER} from './render3/component_ref';\nimport {NgZone} from './zone';\n\nexport function _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\n\nexport function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\n\nexport function _localeFactory(locale?: string): string {\n return locale || 'en-US';\n}\n\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nexport const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps:\n [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n {provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory},\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n {provide: Compiler, useClass: Compiler, deps: []},\n APP_ID_RANDOM_PROVIDER,\n {provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: []},\n {provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: []},\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n];\n\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nexport function zoneSchedulerFactory(ngZone: NgZone): (fn: () => void) => void {\n let queue: (() => void)[] = [];\n ngZone.onStable.subscribe(() => {\n while (queue.length) {\n queue.pop() !();\n }\n });\n return function(fn: () => void) { queue.push(fn); };\n}\n\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({providers: APPLICATION_MODULE_PROVIDERS})\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api';\nimport {SecurityContext} from '../sanitization/security';\n\nimport {BindingDef, BindingFlags, ElementData, ElementHandleEventFn, NodeDef, NodeFlags, OutputDef, OutputType, QueryValueType, ViewData, ViewDefinitionFactory, asElementData} from './types';\nimport {NOOP, calcBindingFlags, checkAndUpdateBinding, dispatchEvent, elementEventFullName, getParentRenderElement, resolveDefinition, resolveRendererType2, splitMatchedQueriesDsl, splitNamespace} from './util';\n\nexport function anchorDef(\n flags: NodeFlags, matchedQueriesDsl: null | [string | number, QueryValueType][],\n ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn,\n templateFactory?: ViewDefinitionFactory): NodeDef {\n flags |= NodeFlags.TypeElement;\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n const template = templateFactory ? resolveDefinition(templateFactory) : null;\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function elementDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: null | [string | number, QueryValueType][], ngContentIndex: null | number,\n childCount: number, namespaceAndName: string | null, fixedAttrs: null | [string, string][] = [],\n bindings?: null | [BindingFlags, string, string | SecurityContext | null][],\n outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn,\n componentView?: null | ViewDefinitionFactory,\n componentRendererType?: RendererType2 | null): NodeDef {\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n let ns: string = null !;\n let name: string = null !;\n if (namespaceAndName) {\n [ns, name] = splitNamespace(namespaceAndName);\n }\n bindings = bindings || [];\n const bindingDefs: BindingDef[] = new Array(bindings.length);\n for (let i = 0; i < bindings.length; i++) {\n const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n\n const [ns, name] = splitNamespace(namespaceAndName);\n let securityContext: SecurityContext = undefined !;\n let suffix: string = undefined !;\n switch (bindingFlags & BindingFlags.Types) {\n case BindingFlags.TypeElementStyle:\n suffix = <string>suffixOrSecurityContext;\n break;\n case BindingFlags.TypeElementAttribute:\n case BindingFlags.TypeProperty:\n securityContext = <SecurityContext>suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n {flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix};\n }\n outputs = outputs || [];\n const outputDefs: OutputDef[] = new Array(outputs.length);\n for (let i = 0; i < outputs.length; i++) {\n const [target, eventName] = outputs[i];\n outputDefs[i] = {\n type: OutputType.ElementOutput,\n target: <any>target, eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n const attrs = <[string, string, string][]>fixedAttrs.map(([namespaceAndName, value]) => {\n const [ns, name] = splitNamespace(namespaceAndName);\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= NodeFlags.ComponentView;\n }\n flags |= NodeFlags.TypeElement;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns,\n name,\n attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createElement(view: ViewData, renderHost: any, def: NodeDef): ElementData {\n const elDef = def.element !;\n const rootSelectorOrNode = view.root.selectorOrNode;\n const renderer = view.renderer;\n let el: any;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n } else {\n el = renderer.createComment('');\n }\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n } else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n const preserveContent =\n (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (let i = 0; i < elDef.attrs.length; i++) {\n const [ns, name, value] = elDef.attrs[i];\n renderer.setAttribute(el, name, value, ns);\n }\n }\n return el;\n}\n\nexport function listenToElementOutputs(view: ViewData, compView: ViewData, def: NodeDef, el: any) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const handleEventClosure = renderEventHandlerClosure(\n view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n let listenTarget: 'window'|'document'|'body'|'component'|null = output.target;\n let listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n const disposable =\n <any>listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables ![def.outputIndex + i] = disposable;\n }\n}\n\nfunction renderEventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\n\nexport function checkAndUpdateElementInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindLen = def.bindings.length;\n let changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;\n return changed;\n}\n\nexport function checkAndUpdateElementDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n }\n return changed;\n}\n\nfunction checkAndUpdateElementValue(view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n const binding = def.bindings[bindingIdx];\n const elData = asElementData(view, def.nodeIndex);\n const renderNode = elData.renderElement;\n const name = binding.name !;\n switch (binding.flags & BindingFlags.Types) {\n case BindingFlags.TypeElementAttribute:\n setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n break;\n case BindingFlags.TypeElementClass:\n setElementClass(view, renderNode, name, value);\n break;\n case BindingFlags.TypeElementStyle:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case BindingFlags.TypeProperty:\n const bindView = (def.flags & NodeFlags.ComponentView &&\n binding.flags & BindingFlags.SyntheticHostProperty) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n}\n\nfunction setElementAttribute(\n view: ViewData, binding: BindingDef, renderNode: any, ns: string | null, name: string,\n value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n const renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n } else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n}\n\nfunction setElementClass(view: ViewData, renderNode: any, name: string, value: boolean) {\n const renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n } else {\n renderer.removeClass(renderNode, name);\n }\n}\n\nfunction setElementStyle(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n let renderValue: string|null =\n view.root.sanitizer.sanitize(SecurityContext.STYLE, value as{} | string);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n const unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n } else {\n renderValue = null;\n }\n const renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n } else {\n renderer.removeStyle(renderNode, name);\n }\n}\n\nfunction setElementProperty(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\n\nimport {NodeDef, NodeFlags, QueryBindingDef, QueryBindingType, QueryDef, QueryValueType, ViewData, asElementData, asProviderData, asQueryList} from './types';\nimport {declaredViewContainer, filterQueryId, isEmbeddedView} from './util';\n\nexport function queryDef(\n flags: NodeFlags, id: number, bindings: {[propName: string]: QueryBindingType}): NodeDef {\n let bindingDefs: QueryBindingDef[] = [];\n for (let propName in bindings) {\n const bindingType = bindings[propName];\n bindingDefs.push({propName, bindingType});\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1, flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: {id, filterId: filterQueryId(id), bindings: bindingDefs},\n ngContent: null\n };\n}\n\nexport function createQuery(): QueryList<any> {\n return new QueryList();\n}\n\nexport function dirtyParentQueries(view: ViewData) {\n const queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n let tplDef = view.parentNodeDef !;\n view = view.parent;\n // content queries\n const end = tplDef.nodeIndex + tplDef.childCount;\n for (let i = 0; i <= end; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeContentQuery) &&\n (nodeDef.flags & NodeFlags.DynamicQuery) &&\n (nodeDef.query !.filterId & queryIds) === nodeDef.query !.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & NodeFlags.TypeElement && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & NodeFlags.TypeContentQuery) ||\n !(nodeDef.childFlags & NodeFlags.DynamicQuery)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n\n // view queries\n if (view.def.nodeFlags & NodeFlags.TypeViewQuery) {\n for (let i = 0; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeViewQuery) && (nodeDef.flags & NodeFlags.DynamicQuery)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\n\nexport function checkAndUpdateQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n let directiveInstance: any;\n let newValues: any[] = undefined !;\n if (nodeDef.flags & NodeFlags.TypeContentQuery) {\n const elementDef = nodeDef.parent !.parent !;\n newValues = calcQueryValues(\n view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query !,\n []);\n directiveInstance = asProviderData(view, nodeDef.parent !.nodeIndex).instance;\n } else if (nodeDef.flags & NodeFlags.TypeViewQuery) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query !, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues);\n const bindings = nodeDef.query !.bindings;\n let notify = false;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n let boundValue: any;\n switch (binding.bindingType) {\n case QueryBindingType.First:\n boundValue = queryList.first;\n break;\n case QueryBindingType.All:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\n\nfunction calcQueryValues(\n view: ViewData, startIndex: number, endIndex: number, queryDef: QueryDef,\n values: any[]): any[] {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n const valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & NodeFlags.TypeElement && nodeDef.element !.template &&\n (nodeDef.element !.template !.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n const elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = elementData.viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n const embeddedView = embeddedViews[k];\n const dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n const projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (let k = 0; k < projectedViews.length; k++) {\n const projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\n\nexport function getQueryValue(\n view: ViewData, nodeDef: NodeDef, queryValueType: QueryValueType): any {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case QueryValueType.RenderElement:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case QueryValueType.ElementRef:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case QueryValueType.TemplateRef:\n return asElementData(view, nodeDef.nodeIndex).template;\n case QueryValueType.ViewContainerRef:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case QueryValueType.Provider:\n return asProviderData(view, nodeDef.nodeIndex).instance;\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NodeDef, NodeFlags, ViewData} from './types';\nimport {RenderNodeAction, getParentRenderElement, visitProjectedRenderNodes} from './util';\n\nexport function ngContentDef(ngContentIndex: null | number, index: number): NodeDef {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: NodeFlags.TypeNgContent,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: {index}\n };\n}\n\nexport function appendNgContent(view: ViewData, renderHost: any, def: NodeDef) {\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n const ngContentIndex = def.ngContent !.index;\n visitProjectedRenderNodes(\n view, ngContentIndex, RenderNodeAction.AppendChild, parentEl, null, undefined);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, PureExpressionData, ViewData, asPureExpressionData} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding} from './util';\n\nexport function purePipeDef(checkIndex: number, argCount: number): NodeDef {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(NodeFlags.TypePurePipe, checkIndex, new Array(argCount + 1));\n}\n\nexport function pureArrayDef(checkIndex: number, argCount: number): NodeDef {\n return _pureExpressionDef(NodeFlags.TypePureArray, checkIndex, new Array(argCount));\n}\n\nexport function pureObjectDef(checkIndex: number, propToIndex: {[p: string]: number}): NodeDef {\n const keys = Object.keys(propToIndex);\n const nbKeys = keys.length;\n const propertyNames = new Array(nbKeys);\n for (let i = 0; i < nbKeys; i++) {\n const key = keys[i];\n const index = propToIndex[key];\n propertyNames[index] = key;\n }\n\n return _pureExpressionDef(NodeFlags.TypePureObject, checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(\n flags: NodeFlags, checkIndex: number, propertyNames: string[]): NodeDef {\n const bindings: BindingDef[] = new Array(propertyNames.length);\n for (let i = 0; i < propertyNames.length; i++) {\n const prop = propertyNames[i];\n bindings[i] = {\n flags: BindingFlags.TypeProperty,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createPureExpression(view: ViewData, def: NodeDef): PureExpressionData {\n return {value: undefined};\n}\n\nexport function checkAndUpdatePureExpressionInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindings = def.bindings;\n let changed = false;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = new Array(bindings.length);\n if (bindLen > 0) value[0] = v0;\n if (bindLen > 1) value[1] = v1;\n if (bindLen > 2) value[2] = v2;\n if (bindLen > 3) value[3] = v3;\n if (bindLen > 4) value[4] = v4;\n if (bindLen > 5) value[5] = v5;\n if (bindLen > 6) value[6] = v6;\n if (bindLen > 7) value[7] = v7;\n if (bindLen > 8) value[8] = v8;\n if (bindLen > 9) value[9] = v9;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n if (bindLen > 0) value[bindings[0].name !] = v0;\n if (bindLen > 1) value[bindings[1].name !] = v1;\n if (bindLen > 2) value[bindings[2].name !] = v2;\n if (bindLen > 3) value[bindings[3].name !] = v3;\n if (bindLen > 4) value[bindings[4].name !] = v4;\n if (bindLen > 5) value[bindings[5].name !] = v5;\n if (bindLen > 6) value[bindings[6].name !] = v6;\n if (bindLen > 7) value[bindings[7].name !] = v7;\n if (bindLen > 8) value[bindings[8].name !] = v8;\n if (bindLen > 9) value[bindings[9].name !] = v9;\n break;\n case NodeFlags.TypePurePipe:\n const pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\nexport function checkAndUpdatePureExpressionDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = values;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n for (let i = 0; i < values.length; i++) {\n value[bindings[i].name !] = values[i];\n }\n break;\n case NodeFlags.TypePurePipe:\n const pipe = values[0];\n const params = values.slice(1);\n value = (<any>pipe.transform)(...params);\n break;\n }\n data.value = value;\n }\n return changed;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BindingDef, BindingFlags, NodeDef, NodeFlags, TextData, ViewData, asTextData} from './types';\nimport {checkAndUpdateBinding, getParentRenderElement} from './util';\n\nexport function textDef(\n checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef {\n const bindings: BindingDef[] = new Array(staticText.length - 1);\n for (let i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: BindingFlags.TypeProperty,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags: NodeFlags.TypeText,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex,\n childCount: 0, bindings,\n bindingFlags: BindingFlags.TypeProperty,\n outputs: [],\n element: null,\n provider: null,\n text: {prefix: staticText[0]},\n query: null,\n ngContent: null,\n };\n}\n\nexport function createText(view: ViewData, renderHost: any, def: NodeDef): TextData {\n let renderNode: any;\n const renderer = view.renderer;\n renderNode = renderer.createText(def.text !.prefix);\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return {renderText: renderNode};\n}\n\nexport function checkAndUpdateTextInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n let changed = false;\n const bindings = def.bindings;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n let value = def.text !.prefix;\n if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nexport function checkAndUpdateTextDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n let value = '';\n for (let i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text !.prefix + value;\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nfunction _addInterpolationPart(value: any, binding: BindingDef): string {\n const valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Renderer2} from '../render/api';\n\nimport {checkAndUpdateElementDynamic, checkAndUpdateElementInline, createElement, listenToElementOutputs} from './element';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {appendNgContent} from './ng_content';\nimport {callLifecycleHooksChildrenFirst, checkAndUpdateDirectiveDynamic, checkAndUpdateDirectiveInline, createDirectiveInstance, createPipeInstance, createProviderInstance} from './provider';\nimport {checkAndUpdatePureExpressionDynamic, checkAndUpdatePureExpressionInline, createPureExpression} from './pure_expression';\nimport {checkAndUpdateQuery, createQuery} from './query';\nimport {createTemplateData, createViewContainerData} from './refs';\nimport {checkAndUpdateTextDynamic, checkAndUpdateTextInline, createText} from './text';\nimport {ArgumentType, CheckType, ElementData, NodeData, NodeDef, NodeFlags, ProviderData, RootData, Services, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn, asElementData, asQueryList, asTextData, shiftInitState} from './types';\nimport {NOOP, checkBindingNoChanges, isComponentView, markParentViewsForCheckProjectedViews, resolveDefinition, tokenKey} from './util';\nimport {detachProjectedView} from './view_attach';\n\nexport function viewDef(\n flags: ViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn,\n updateRenderer?: null | ViewUpdateFn): ViewDefinition {\n // clone nodes and set auto calculated values\n let viewBindingCount = 0;\n let viewDisposableCount = 0;\n let viewNodeFlags = 0;\n let viewRootNodeFlags = 0;\n let viewMatchedQueries = 0;\n let currentParent: NodeDef|null = null;\n let currentRenderParent: NodeDef|null = null;\n let currentElementHasPublicProviders = false;\n let currentElementHasPrivateProviders = false;\n let lastRenderRootNode: NodeDef|null = null;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n\n if (node.element) {\n const elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element !.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n\n\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n\n if (!currentRenderParent && (node.flags & NodeFlags.CatRenderNode)) {\n lastRenderRootNode = node;\n }\n\n if (node.flags & NodeFlags.CatProvider) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent !.element !.publicProviders =\n Object.create(currentParent !.element !.publicProviders);\n currentParent !.element !.allProviders = currentParent !.element !.publicProviders;\n }\n const isPrivateService = (node.flags & NodeFlags.PrivateProvider) !== 0;\n const isComponent = (node.flags & NodeFlags.Component) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent !.element !.publicProviders ![tokenKey(node.provider !.token)] = node;\n } else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent !.element !.allProviders =\n Object.create(currentParent !.element !.publicProviders);\n }\n currentParent !.element !.allProviders ![tokenKey(node.provider !.token)] = node;\n }\n if (isComponent) {\n currentParent !.element !.componentProvider = node;\n }\n }\n\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n } else {\n viewRootNodeFlags |= node.flags;\n }\n\n if (node.childCount > 0) {\n currentParent = node;\n\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n } else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n const newParent: NodeDef|null = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n } else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n\n const handleEvent: ViewHandleEventFn = (view, nodeIndex, eventName, event) =>\n nodes[nodeIndex].element !.handleEvent !(view, eventName, event);\n\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode\n };\n}\n\nfunction isNgContainer(node: NodeDef): boolean {\n return (node.flags & NodeFlags.TypeElement) !== 0 && node.element !.name === null;\n}\n\nfunction validateNode(parent: NodeDef | null, node: NodeDef, nodeCount: number) {\n const template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & NodeFlags.EmbeddedViews) {\n throw new Error(\n `Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`);\n }\n }\n if (node.flags & NodeFlags.CatProvider) {\n const parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & NodeFlags.TypeElement) === 0) {\n throw new Error(\n `Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`);\n }\n }\n if (node.query) {\n if (node.flags & NodeFlags.TypeContentQuery &&\n (!parent || (parent.flags & NodeFlags.TypeDirective) === 0)) {\n throw new Error(\n `Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`);\n }\n if (node.flags & NodeFlags.TypeViewQuery && parent) {\n throw new Error(\n `Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`);\n }\n }\n if (node.childCount) {\n const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\n `Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n }\n }\n}\n\nexport function createEmbeddedView(\n parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createRootView(root: RootData, def: ViewDefinition, context?: any): ViewData {\n const view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const rendererType = nodeDef.element !.componentRendererType;\n let compRenderer: Renderer2;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n } else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(\n parentView.root, compRenderer, parentView, nodeDef.element !.componentProvider, viewDef);\n}\n\nfunction createView(\n root: RootData, renderer: Renderer2, parent: ViewData | null, parentNodeDef: NodeDef | null,\n def: ViewDefinition): ViewData {\n const nodes: NodeData[] = new Array(def.nodes.length);\n const disposables = def.outputCount ? new Array(def.outputCount) : null;\n const view: ViewData = {\n def,\n parent,\n viewContainerParent: null, parentNodeDef,\n context: null,\n component: null, nodes,\n state: ViewState.CatInit, root, renderer,\n oldValues: new Array(def.bindingCount), disposables,\n initIndex: -1\n };\n return view;\n}\n\nfunction initView(view: ViewData, component: any, context: any) {\n view.component = component;\n view.context = context;\n}\n\nfunction createViewNodes(view: ViewData) {\n let renderHost: any;\n if (isComponentView(view)) {\n const hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent !, hostDef !.parent !.nodeIndex).renderElement;\n }\n const def = view.def;\n const nodes = view.nodes;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n let nodeData: any;\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n const el = createElement(view, renderHost, nodeDef) as any;\n let componentView: ViewData = undefined !;\n if (nodeDef.flags & NodeFlags.ComponentView) {\n const compViewDef = resolveDefinition(nodeDef.element !.componentView !);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = <ElementData>{\n renderElement: el,\n componentView,\n viewContainer: null,\n template: nodeDef.element !.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case NodeFlags.TypeText:\n nodeData = createText(view, renderHost, nodeDef) as any;\n break;\n case NodeFlags.TypeClassProvider:\n case NodeFlags.TypeFactoryProvider:\n case NodeFlags.TypeUseExistingProvider:\n case NodeFlags.TypeValueProvider: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & NodeFlags.LazyProvider)) {\n const instance = createProviderInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n break;\n }\n case NodeFlags.TypePipe: {\n const instance = createPipeInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n break;\n }\n case NodeFlags.TypeDirective: {\n nodeData = nodes[i];\n if (!nodeData) {\n const instance = createDirectiveInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n if (nodeDef.flags & NodeFlags.Component) {\n const compView = asElementData(view, nodeDef.parent !.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n nodeData = createPureExpression(view, nodeDef) as any;\n break;\n case NodeFlags.TypeContentQuery:\n case NodeFlags.TypeViewQuery:\n nodeData = createQuery() as any;\n break;\n case NodeFlags.TypeNgContent:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n\n // fill static content and view queries\n execQueriesAction(\n view, NodeFlags.TypeContentQuery | NodeFlags.TypeViewQuery, NodeFlags.StaticQuery,\n CheckType.CheckAndUpdate);\n}\n\nexport function checkNoChangesView(view: ViewData) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckNoChanges);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, CheckType.CheckNoChanges);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n}\n\nexport function checkAndUpdateView(view: ViewData) {\n if (view.state & ViewState.BeforeFirstCheck) {\n view.state &= ~ViewState.BeforeFirstCheck;\n view.state |= ViewState.FirstCheck;\n } else {\n view.state &= ~ViewState.FirstCheck;\n }\n shiftInitState(view, ViewState.InitState_BeforeInit, ViewState.InitState_CallingOnInit);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckAndUpdate);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeContentQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n let callInit = shiftInitState(\n view, ViewState.InitState_CallingOnInit, ViewState.InitState_CallingAfterContentInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterContentChecked | (callInit ? NodeFlags.AfterContentInit : 0));\n\n Services.updateRenderer(view, CheckType.CheckAndUpdate);\n\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeViewQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n callInit = shiftInitState(\n view, ViewState.InitState_CallingAfterContentInit, ViewState.InitState_CallingAfterViewInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterViewChecked | (callInit ? NodeFlags.AfterViewInit : 0));\n\n if (view.def.flags & ViewFlags.OnPush) {\n view.state &= ~ViewState.ChecksEnabled;\n }\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit);\n}\n\nexport function checkAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n if (argStyle === ArgumentType.Inline) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\n\nfunction markProjectedViewsForCheck(view: ViewData) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ProjectedTemplate)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n const projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (let i = 0; i < projectedViews.length; i++) {\n const projectedView = projectedViews[i];\n projectedView.state |= ViewState.CheckProjectedView;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n } else if ((nodeDef.childFlags & NodeFlags.ProjectedTemplate) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction checkAndUpdateNodeInline(\n view: ViewData, nodeDef: NodeDef, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any,\n v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeText:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionInline(\n view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\n\nfunction checkAndUpdateNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case NodeFlags.TypeText:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\n\nexport function checkNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n if (argStyle === ArgumentType.Inline) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\n\nfunction checkNoChangesNodeInline(\n view: ViewData, nodeDef: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): void {\n const bindLen = nodeDef.bindings.length;\n if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);\n}\n\nfunction checkNoChangesNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): void {\n for (let i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, nodeDef.nodeIndex),\n `Query ${nodeDef.query!.id} not dirty`, `Query ${nodeDef.query!.id} dirty`,\n (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function destroyView(view: ViewData) {\n if (view.state & ViewState.Destroyed) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, NodeFlags.OnDestroy);\n if (view.disposables) {\n for (let i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= ViewState.Destroyed;\n}\n\nfunction destroyViewNodes(view: ViewData) {\n const len = view.def.nodes.length;\n for (let i = 0; i < len; i++) {\n const def = view.def.nodes[i];\n if (def.flags & NodeFlags.TypeElement) {\n view.renderer.destroyNode !(asElementData(view, i).renderElement);\n } else if (def.flags & NodeFlags.TypeText) {\n view.renderer.destroyNode !(asTextData(view, i).renderText);\n } else if (def.flags & NodeFlags.TypeContentQuery || def.flags & NodeFlags.TypeViewQuery) {\n asQueryList(view, i).destroy();\n }\n }\n}\n\nenum ViewAction {\n CreateViewNodes,\n CheckNoChanges,\n CheckNoChangesProjectedViews,\n CheckAndUpdate,\n CheckAndUpdateProjectedViews,\n Destroy\n}\n\nfunction execComponentViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ComponentView)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ComponentView) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n } else if ((nodeDef.childFlags & NodeFlags.ComponentView) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction execEmbeddedViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.EmbeddedViews)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n // a leaf\n const embeddedViews = asElementData(view, i).viewContainer !._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n } else if ((nodeDef.childFlags & NodeFlags.EmbeddedViews) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction callViewAction(view: ViewData, action: ViewAction) {\n const viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\n\nfunction execProjectedViewsAction(view: ViewData, action: ViewAction) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(\n view: ViewData, queryFlags: NodeFlags, staticDynamicQueryFlag: NodeFlags,\n checkType: CheckType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n const nodeCount = view.def.nodes.length;\n for (let i = 0; i < nodeCount; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case CheckType.CheckAndUpdate:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case CheckType.CheckNoChanges:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';\nimport {Injector} from '../di';\nimport {InjectableType} from '../di/injectable';\nimport {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2} from '../render/api';\nimport {Sanitizer} from '../sanitization/security';\nimport {isDevMode} from '../util/is_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../util/ng_reflect';\n\nimport {isViewDebugError, viewDestroyedError, viewWrappedDebugError} from './errors';\nimport {resolveDep} from './provider';\nimport {dirtyParentQueries, getQueryValue} from './query';\nimport {createInjector, createNgModuleRef, getComponentViewDefinitionFactory} from './refs';\nimport {ArgumentType, BindingFlags, CheckType, DebugContext, ElementData, NgModuleDefinition, NodeDef, NodeFlags, NodeLogger, ProviderOverride, RootData, Services, ViewData, ViewDefinition, ViewState, asElementData, asPureExpressionData} from './types';\nimport {NOOP, isComponentView, renderNode, resolveDefinition, splitDepsDsl, tokenKey, viewParentEl} from './util';\nimport {checkAndUpdateNode, checkAndUpdateView, checkNoChangesNode, checkNoChangesView, createComponentView, createEmbeddedView, createRootView, destroyView} from './view';\n\n\nlet initialized = false;\n\nexport function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n const services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\n\nfunction createProdServices() {\n return {\n setCurrentNode: () => {},\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: (view: ViewData, nodeIndex: number, eventName: string, event: any) =>\n view.def.handleEvent(view, nodeIndex, eventName, event),\n updateDirectives: (view: ViewData, checkType: CheckType) => view.def.updateDirectives(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode,\n view),\n updateRenderer: (view: ViewData, checkType: CheckType) => view.def.updateRenderer(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode,\n view),\n };\n}\n\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\n\nfunction createProdRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n return createRootView(\n createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode),\n def, context);\n}\n\nfunction debugCreateRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string | any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n const root = createRootData(\n elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes,\n rootSelectorOrNode);\n const defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(\n DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(\n elInjector: Injector, ngModule: NgModuleRef<any>, rendererFactory: RendererFactory2,\n projectableNodes: any[][], rootSelectorOrNode: any): RootData {\n const sanitizer = ngModule.injector.get(Sanitizer);\n const errorHandler = ngModule.injector.get(ErrorHandler);\n const renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule,\n injector: elInjector, projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer, rendererFactory, renderer, errorHandler\n };\n}\n\nfunction debugCreateEmbeddedView(\n parentView: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n const defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(\n DebugAction.create, createEmbeddedView, null,\n [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const overrideComponentView =\n viewDefOverrides.get(nodeDef.element !.componentProvider !.provider !.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n } else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(\n DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(\n moduleType: Type<any>, parentInjector: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n const defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nconst providerOverrides = new Map<any, ProviderOverride>();\nconst providerOverridesWithScope = new Map<InjectableType<any>, ProviderOverride>();\nconst viewDefOverrides = new Map<any, ViewDefinition>();\n\nfunction debugOverrideProvider(override: ProviderOverride) {\n providerOverrides.set(override.token, override);\n let injectableDef: ɵɵInjectableDef<any>|null;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token as InjectableType<any>, override);\n }\n}\n\nfunction debugOverrideComponentView(comp: any, compFactory: ComponentFactory<any>) {\n const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n const compViewDef = resolveDefinition(hostViewDef.nodes[0].element !.componentView !);\n viewDefOverrides.set(comp, compViewDef);\n}\n\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def: ViewDefinition): ViewDefinition {\n if (providerOverrides.size === 0) {\n return def;\n }\n const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory !(() => NOOP);\n for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n\n function findElementIndicesWithOverwrittenProviders(def: ViewDefinition): number[] {\n const elIndicesWithOverwrittenProviders: number[] = [];\n let lastElementDef: NodeDef|null = null;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & NodeFlags.CatProviderNoDirective &&\n providerOverrides.has(nodeDef.provider !.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef !.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n\n function applyProviderOverridesToElement(viewDef: ViewDefinition, elIndex: number) {\n for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & NodeFlags.CatProviderNoDirective) {\n const provider = nodeDef.provider !;\n const override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def: NgModuleDefinition): NgModuleDefinition {\n const {hasOverrides, hasDeprecatedOverrides} = calcHasOverrides(def);\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory !(() => NOOP);\n applyProviderOverrides(def);\n return def;\n\n function calcHasOverrides(def: NgModuleDefinition):\n {hasOverrides: boolean, hasDeprecatedOverrides: boolean} {\n let hasOverrides = false;\n let hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return {hasOverrides, hasDeprecatedOverrides};\n }\n def.providers.forEach(node => {\n const override = providerOverrides.get(node.token);\n if ((node.flags & NodeFlags.CatProviderNoDirective) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(module => {\n providerOverridesWithScope.forEach((override, token) => {\n if (getInjectableDef(token) !.providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return {hasOverrides, hasDeprecatedOverrides};\n }\n\n function applyProviderOverrides(def: NgModuleDefinition) {\n for (let i = 0; i < def.providers.length; i++) {\n const provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= NodeFlags.LazyProvider;\n }\n const override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n let moduleSet = new Set<any>(def.modules);\n providerOverridesWithScope.forEach((override, token) => {\n if (moduleSet.has(getInjectableDef(token) !.providedIn)) {\n let provider = {\n token: token,\n flags:\n override.flags | (hasDeprecatedOverrides ? NodeFlags.LazyProvider : NodeFlags.None),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\n\nfunction prodCheckAndUpdateNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction prodCheckNoChangesNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction debugCheckAndUpdateView(view: ViewData) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view: ViewData) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view: ViewData) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nenum DebugAction {\n create,\n detectChanges,\n checkNoChanges,\n destroy,\n handleEvent\n}\n\nlet _currentAction: DebugAction;\nlet _currentView: ViewData;\nlet _currentNodeIndex: number|null;\n\nfunction debugSetCurrentNode(view: ViewData, nodeIndex: number | null) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view: ViewData, nodeIndex: number, eventName: string, event: any) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(\n DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n function debugCheckDirectivesFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugUpdateRenderer(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n function debugCheckRenderNodeFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugCheckAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, givenValues: any[]): void {\n const changed = (<any>checkAndUpdateNode)(view, nodeDef, argStyle, ...givenValues);\n if (changed) {\n const values = argStyle === ArgumentType.Dynamic ? givenValues[0] : givenValues;\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n const bindingValues: {[key: string]: string} = {};\n for (let i = 0; i < nodeDef.bindings.length; i++) {\n const binding = nodeDef.bindings[i];\n const value = values[i];\n if (binding.flags & BindingFlags.TypeProperty) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName !)] =\n normalizeDebugBindingValue(value);\n }\n }\n const elDef = nodeDef.parent !;\n const el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element !.name) {\n // a comment.\n view.renderer.setValue(el, `bindings=${JSON.stringify(bindingValues, null, 2)}`);\n } else {\n // a regular element.\n for (let attr in bindingValues) {\n const value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n } else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\n\nfunction debugCheckNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, values: any[]): void {\n (<any>checkNoChangesNode)(view, nodeDef, argStyle, ...values);\n}\n\nfunction nextDirectiveWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeDirective && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nfunction nextRenderNodeWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.CatRenderNode) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nclass DebugContext_ implements DebugContext {\n private nodeDef: NodeDef;\n private elView: ViewData;\n private elDef: NodeDef;\n\n constructor(public view: ViewData, public nodeIndex: number|null) {\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n let elDef = this.nodeDef;\n let elView = view;\n while (elDef && (elDef.flags & NodeFlags.TypeElement) === 0) {\n elDef = elDef.parent !;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView) !;\n elView = elView.parent !;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n\n private get elOrCompView() {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n }\n\n get injector(): Injector { return createInjector(this.elView, this.elDef); }\n\n get component(): any { return this.elOrCompView.component; }\n\n get context(): any { return this.elOrCompView.context; }\n\n get providerTokens(): any[] {\n const tokens: any[] = [];\n if (this.elDef) {\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n tokens.push(childDef.provider !.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n }\n\n get references(): {[key: string]: any} {\n const references: {[key: string]: any} = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n }\n\n get componentRenderElement() {\n const elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n }\n\n get renderNode(): any {\n return this.nodeDef.flags & NodeFlags.TypeText ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n }\n\n logError(console: Console, ...values: any[]) {\n let logViewDef: ViewDefinition;\n let logNodeIndex: number;\n if (this.nodeDef.flags & NodeFlags.TypeText) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n } else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n let currRenderNodeIndex = -1;\n let nodeLogger: NodeLogger = () => {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return console.error.bind(console, ...values);\n } else {\n return NOOP;\n }\n };\n logViewDef.factory !(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n (<any>console.error)(...values);\n }\n }\n}\n\nfunction getRenderNodeIndex(viewDef: ViewDefinition, nodeIndex: number): number {\n let renderNodeIndex = -1;\n for (let i = 0; i <= nodeIndex; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\n\nfunction findHostElement(view: ViewData): ElementData|null {\n while (view && !isComponentView(view)) {\n view = view.parent !;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view) !.nodeIndex);\n }\n return null;\n}\n\nfunction collectReferences(view: ViewData, nodeDef: NodeDef, references: {[key: string]: any}) {\n for (let refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\n\nfunction callWithDebugContext(action: DebugAction, fn: any, self: any, args: any[]) {\n const oldAction = _currentAction;\n const oldView = _currentView;\n const oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n const result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n } catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext() !);\n }\n}\n\nexport function getCurrentDebugContext(): DebugContext|null {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nexport class DebugRendererFactory2 implements RendererFactory2 {\n constructor(private delegate: RendererFactory2) {}\n\n createRenderer(element: any, renderData: RendererType2|null): Renderer2 {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n }\n\n begin() {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n end() {\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n\n whenRenderingDone(): Promise<any> {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n }\n}\n\nexport class DebugRenderer2 implements Renderer2 {\n readonly data: {[key: string]: any};\n\n private createDebugContext(nativeElement: any) { return this.debugContextFactory(nativeElement); }\n\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n debugContextFactory: (nativeElement?: any) => DebugContext | null = getCurrentDebugContext;\n\n constructor(private delegate: Renderer2) { this.data = this.delegate.data; }\n\n destroyNode(node: any) {\n removeDebugNodeFromIndex(getDebugNode(node) !);\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n }\n\n destroy() { this.delegate.destroy(); }\n\n createElement(name: string, namespace?: string): any {\n const el = this.delegate.createElement(name, namespace);\n const debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n (debugEl as{name: string}).name = name;\n indexDebugNode(debugEl);\n }\n return el;\n }\n\n createComment(value: string): any {\n const comment = this.delegate.createComment(value);\n const debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n }\n\n createText(value: string): any {\n const text = this.delegate.createText(value);\n const debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n }\n\n appendChild(parent: any, newChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n const debugRefEl = getDebugNode(refChild) !;\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n\n this.delegate.insertBefore(parent, newChild, refChild);\n }\n\n removeChild(parent: any, oldChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n }\n\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n const debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n }\n\n listen(\n target: 'document'|'windows'|'body'|any, eventName: string,\n callback: (event: any) => boolean): () => void {\n if (typeof target !== 'string') {\n const debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n\n return this.delegate.listen(target, eventName, callback);\n }\n\n parentNode(node: any): any { return this.delegate.parentNode(node); }\n nextSibling(node: any): any { return this.delegate.nextSibling(node); }\n setValue(node: any, value: string): void { return this.delegate.setValue(node, value); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\n\nimport {initServicesIfNeeded} from './services';\nimport {NgModuleDefinition, NgModuleDefinitionFactory, NgModuleProviderDef, ProviderOverride, Services, ViewDefinition} from './types';\nimport {resolveDefinition} from './util';\n\nexport function overrideProvider(override: ProviderOverride) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\n\nexport function overrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\n\nexport function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createNgModuleFactory(\n ngModuleType: Type<any>, bootstrapComponents: Type<any>[],\n defFactory: NgModuleDefinitionFactory): NgModuleFactory<any> {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def: NgModuleDefinition): NgModuleDefinition {\n const providers = Array.from(def.providers);\n const modules = Array.from(def.modules);\n const providersByKey: {[tokenKey: string]: NgModuleProviderDef} = {};\n for (const key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n\n return {\n factory: def.factory,\n isRoot: def.isRoot, providers, modules, providersByKey,\n };\n}\n\nclass NgModuleFactory_ extends NgModuleFactory<any> {\n constructor(\n public readonly moduleType: Type<any>, private _bootstrapComponents: Type<any>[],\n private _ngModuleDefFactory: NgModuleDefinitionFactory) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n }\n\n create(parentInjector: Injector|null): NgModuleRef<any> {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(\n this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {anchorDef, elementDef} from './element';\nexport {clearOverrides, createNgModuleFactory, overrideComponentView, overrideProvider} from './entrypoint';\nexport {ngContentDef} from './ng_content';\nexport {moduleDef, moduleProvideDef} from './ng_module';\nexport {directiveDef, pipeDef, providerDef} from './provider';\nexport {pureArrayDef, pureObjectDef, purePipeDef} from './pure_expression';\nexport {queryDef} from './query';\nexport {ViewRef_, createComponentFactory, getComponentViewDefinitionFactory, nodeValue} from './refs';\nexport {initServicesIfNeeded} from './services';\nexport {textDef} from './text';\nexport {EMPTY_ARRAY, EMPTY_MAP, createRendererType2, elementEventFullName, inlineInterpolate, interpolate, rootRenderNodes, tokenKey, unwrapValue} from './util';\nexport {viewDef} from './view';\nexport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView} from './view_attach';\n\nexport * from './types';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS} from './application_ref';\nexport {APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER} from './application_tokens';\nexport {defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers} from './change_detection/change_detection';\nexport {devModeEqual as ɵdevModeEqual} from './change_detection/change_detection_util';\nexport {isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';\nexport {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';\nexport {Console as ɵConsole} from './console';\nexport {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility';\nexport {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDef, ɵɵInjectorDef} from './di/interface/defs';\nexport {APP_ROOT as ɵAPP_ROOT} from './di/scope';\nexport {ivyEnabled as ɵivyEnabled} from './ivy_switch';\nexport {ComponentFactory as ɵComponentFactory} from './linker/component_factory';\nexport {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, resolveComponentResources as ɵresolveComponentResources} from './metadata/resource_loading';\nexport {ReflectionCapabilities as ɵReflectionCapabilities} from './reflection/reflection_capabilities';\nexport {GetterFn as ɵGetterFn, MethodFn as ɵMethodFn, SetterFn as ɵSetterFn} from './reflection/types';\nexport {DirectRenderer as ɵDirectRenderer, RenderDebugInfo as ɵRenderDebugInfo} from './render/api';\nexport {_sanitizeHtml as ɵ_sanitizeHtml} from './sanitization/html_sanitizer';\nexport {_sanitizeStyle as ɵ_sanitizeStyle} from './sanitization/style_sanitizer';\nexport {_sanitizeUrl as ɵ_sanitizeUrl} from './sanitization/url_sanitizer';\nexport {global as ɵglobal} from './util/global';\n\nexport {looseIdentical as ɵlooseIdentical,} from './util/comparison';\nexport {stringify as ɵstringify} from './util/stringify';\nexport {makeDecorator as ɵmakeDecorator} from './util/decorators';\nexport {isObservable as ɵisObservable, isPromise as ɵisPromise} from './util/lang';\nexport {clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider} from './view/index';\nexport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from './view/provider';\nexport {getLocalePluralCase as ɵgetLocalePluralCase, findLocaleData as ɵfindLocaleData} from './i18n/locale_data_api';\nexport {LOCALE_DATA as ɵLOCALE_DATA, LocaleDataIndex as ɵLocaleDataIndex} from './i18n/locale_data';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// clang-format off\nexport {\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n ɵɵdefineBase,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefinePipe,\n ɵɵdefineNgModule,\n detectChanges as ɵdetectChanges,\n renderComponent as ɵrenderComponent,\n AttributeMarker as ɵAttributeMarker,\n ComponentType as ɵComponentType,\n ComponentFactory as ɵRender3ComponentFactory,\n ComponentRef as ɵRender3ComponentRef,\n DirectiveType as ɵDirectiveType,\n RenderFlags as ɵRenderFlags,\n ɵɵdirectiveInject,\n ɵɵinjectAttribute,\n ɵɵgetFactoryOf,\n ɵɵgetInheritedFactory,\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\n ɵɵtemplateRefExtractor,\n ɵɵProvidersFeature,\n ɵɵInheritDefinitionFeature,\n ɵɵNgOnChangesFeature,\n LifecycleHooksFeature as ɵLifecycleHooksFeature,\n NgModuleType as ɵNgModuleType,\n NgModuleRef as ɵRender3NgModuleRef,\n CssSelectorList as ɵCssSelectorList,\n markDirty as ɵmarkDirty,\n NgModuleFactory as ɵNgModuleFactory,\n NO_CHANGE as ɵNO_CHANGE,\n ɵɵcontainer,\n ɵɵnextContext,\n ɵɵelementStart,\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n ɵɵelement,\n ɵɵlistener,\n ɵɵtext,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n ɵɵembeddedViewStart,\n ɵɵprojection,\n ɵɵinterpolation1,\n ɵɵinterpolation2,\n ɵɵinterpolation3,\n ɵɵinterpolation4,\n ɵɵinterpolation5,\n ɵɵinterpolation6,\n ɵɵinterpolation7,\n ɵɵinterpolation8,\n ɵɵinterpolationV,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n ɵɵgetCurrentView,\n getDirectives as ɵgetDirectives,\n getHostElement as ɵgetHostElement,\n ɵɵrestoreView,\n ɵɵcontainerRefreshStart,\n ɵɵcontainerRefreshEnd,\n ɵɵqueryRefresh,\n ɵɵviewQuery,\n ɵɵstaticViewQuery,\n ɵɵstaticContentQuery,\n ɵɵloadViewQuery,\n ɵɵcontentQuery,\n ɵɵloadContentQuery,\n ɵɵelementEnd,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n ɵɵupdateSyntheticHostBinding,\n ɵɵcomponentHostSyntheticListener,\n ɵɵprojectionDef,\n ɵɵreference,\n ɵɵenableBindings,\n ɵɵdisableBindings,\n ɵɵallocHostVars,\n ɵɵelementContainerStart,\n ɵɵelementContainerEnd,\n ɵɵstyling,\n ɵɵstyleMap,\n ɵɵclassMap,\n ɵɵstyleProp,\n ɵɵstylingApply,\n ɵɵclassProp,\n ɵɵelementHostAttrs,\n\n ɵɵselect,\n ɵɵtextBinding,\n ɵɵtemplate,\n ɵɵembeddedViewEnd,\n store as ɵstore,\n ɵɵload,\n ɵɵpipe,\n ɵɵBaseDef,\n ComponentDef as ɵComponentDef,\n ɵɵComponentDefWithMeta,\n DirectiveDef as ɵDirectiveDef,\n ɵɵDirectiveDefWithMeta,\n PipeDef as ɵPipeDef,\n ɵɵPipeDefWithMeta,\n whenRendered as ɵwhenRendered,\n ɵɵi18n,\n ɵɵi18nAttributes,\n ɵɵi18nExp,\n ɵɵi18nStart,\n ɵɵi18nEnd,\n ɵɵi18nApply,\n ɵɵi18nPostprocess,\n i18nConfigureLocalize as ɵi18nConfigureLocalize,\n ɵɵi18nLocalize,\n setLocaleId as ɵsetLocaleId,\n DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID,\n setClassMetadata as ɵsetClassMetadata,\n ɵɵresolveWindow,\n ɵɵresolveDocument,\n ɵɵresolveBody,\n} from './render3/index';\n\n\nexport {\n compileComponent as ɵcompileComponent,\n compileDirective as ɵcompileDirective,\n} from './render3/jit/directive';\nexport {\n compileNgModule as ɵcompileNgModule,\n compileNgModuleDefs as ɵcompileNgModuleDefs,\n patchComponentDefWithScope as ɵpatchComponentDefWithScope,\n resetCompiledComponents as ɵresetCompiledComponents,\n flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible,\n transitiveScopesFor as ɵtransitiveScopesFor,\n} from './render3/jit/module';\nexport {\n compilePipe as ɵcompilePipe,\n} from './render3/jit/pipe';\n\nexport {\n NgModuleDef as ɵNgModuleDef,\n ɵɵNgModuleDefWithMeta,\n NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,\n} from './metadata/ng_module';\n\nexport {\n ɵɵsanitizeHtml,\n ɵɵsanitizeStyle,\n ɵɵdefaultStyleSanitizer,\n ɵɵsanitizeScript,\n ɵɵsanitizeUrl,\n ɵɵsanitizeResourceUrl,\n ɵɵsanitizeUrlOrResourceUrl,\n} from './sanitization/sanitization';\n\nexport {\n bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml,\n bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle,\n bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript,\n bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl,\n bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl,\n} from './sanitization/bypass';\n\nexport {\n getLContext as ɵgetLContext\n} from './render3/context_discovery';\n\nexport {\n NG_ELEMENT_ID as ɵNG_ELEMENT_ID,\n NG_COMPONENT_DEF as ɵNG_COMPONENT_DEF,\n NG_DIRECTIVE_DEF as ɵNG_DIRECTIVE_DEF,\n NG_PIPE_DEF as ɵNG_PIPE_DEF,\n NG_MODULE_DEF as ɵNG_MODULE_DEF,\n NG_BASE_DEF as ɵNG_BASE_DEF\n} from './render3/fields';\n\nexport {\n NG_INJECTABLE_DEF as ɵNG_INJECTABLE_DEF,\n NG_INJECTOR_DEF as ɵNG_INJECTOR_DEF,\n} from './di/interface/defs';\n\nexport {\n Player as ɵPlayer,\n PlayerFactory as ɵPlayerFactory,\n PlayState as ɵPlayState,\n PlayerHandler as ɵPlayerHandler,\n} from './render3/interfaces/player';\n\nexport {\n LContext as ɵLContext,\n} from './render3/interfaces/context';\n\nexport {\n bindPlayerFactory as ɵbindPlayerFactory,\n} from './render3/styling/player_factory';\n\nexport {\n addPlayer as ɵaddPlayer,\n getPlayers as ɵgetPlayers,\n} from './render3/players';\n\n// we reexport these symbols just so that they are retained during the dead code elimination\n// performed by rollup while it's creating fesm files.\n//\n// no code actually imports these symbols from the @angular/core entry point\nexport {\n compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__,\n isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__\n} from './application_ref';\nexport {\n SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__,\n SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__,\n SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__,\n} from './metadata/directives';\nexport {\n SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__,\n} from './metadata/ng_module';\nexport {\n getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__,\n} from './debug/debug_node';\nexport {\n SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__,\n} from './di/injectable';\nexport {\n SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__,\n} from './ivy_switch';\nexport {\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__,\n} from './change_detection/change_detector_ref';\nexport {\n Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__,\n Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__,\n Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__,\n Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__,\n} from './linker/compiler';\nexport {\n SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__,\n} from './linker/element_ref';\nexport {\n SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__,\n} from './linker/template_ref';\nexport {\n SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__,\n} from './linker/view_container_ref';\nexport {\n SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__,\n} from './render/api';\n\nexport { getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__ } from './linker/ng_module_factory_loader';\n\nexport { registerNgModuleType as ɵregisterNgModuleType } from './linker/ng_module_factory_registration';\n\nexport {\n publishGlobalUtil as ɵpublishGlobalUtil,\n publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils\n} from './render3/util/global_utils';\n\nexport {createInjector as ɵcreateInjector} from './di/r3_injector';\n\nexport {INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__} from './di/injector';\n\n// clang-format on\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {registerModuleFactory as ɵregisterModuleFactory} from './linker/ng_module_factory_registration';\nexport {ArgumentType as ɵArgumentType, BindingFlags as ɵBindingFlags, DepFlags as ɵDepFlags, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, NodeFlags as ɵNodeFlags, QueryBindingType as ɵQueryBindingType, QueryValueType as ɵQueryValueType, ViewDefinition as ɵViewDefinition, ViewFlags as ɵViewFlags, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid} from './view/index';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point from which you should import all public core APIs.\n */\nexport * from './metadata';\nexport * from './version';\nexport {TypeDecorator} from './util/decorators';\nexport * from './di';\nexport {createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken} from './application_ref';\nexport {enableProdMode, isDevMode} from './util/is_dev_mode';\nexport {APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER} from './application_tokens';\nexport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nexport * from './zone';\nexport * from './render';\nexport * from './linker';\nexport {DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Predicate} from './debug/debug_node';\nexport {GetTestability, Testability, TestabilityRegistry, setTestabilityGetter} from './testability/testability';\nexport * from './change_detection';\nexport * from './platform_core_providers';\nexport {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy} from './i18n/tokens';\nexport {ApplicationModule} from './application_module';\nexport {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './profile/profile';\nexport {AbstractType, Type} from './interface/type';\nexport {EventEmitter} from './event_emitter';\nexport {ErrorHandler} from './error_handler';\nexport * from './core_private_export';\nexport * from './core_render3_private_export';\nexport {Sanitizer, SecurityContext} from './sanitization/security';\nexport * from './codegen_private_exports';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/core';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This 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\nexport {APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_r,_iterableDiffersFactory as ɵangular_packages_core_core_o,_keyValueDiffersFactory as ɵangular_packages_core_core_p,_localeFactory as ɵangular_packages_core_core_q,zoneSchedulerFactory as ɵangular_packages_core_core_s} from './src/application_module';\nexport {_appIdRandomProviderFactory as ɵangular_packages_core_core_f} from './src/application_tokens';\nexport {DefaultIterableDifferFactory as ɵangular_packages_core_core_m} from './src/change_detection/differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory as ɵangular_packages_core_core_n} from './src/change_detection/differs/default_keyvalue_differ';\nexport {DebugElement__PRE_R3__ as ɵangular_packages_core_core_l,DebugNode__PRE_R3__ as ɵangular_packages_core_core_k} from './src/debug/debug_node';\nexport {NullInjector as ɵangular_packages_core_core_b,injectInjectorOnly as ɵangular_packages_core_core_a} from './src/di/injector_compatibility';\nexport {ReflectiveInjector_ as ɵangular_packages_core_core_c} from './src/di/reflective_injector';\nexport {ReflectiveDependency as ɵangular_packages_core_core_d,resolveReflectiveProviders as ɵangular_packages_core_core_e} from './src/di/reflective_provider';\nexport {getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j} from './src/linker/ng_module_factory_loader';\nexport {wtfEnabled as ɵangular_packages_core_core_t} from './src/profile/profile';\nexport {createScope as ɵangular_packages_core_core_v,detectWTF as ɵangular_packages_core_core_u,endTimeRange as ɵangular_packages_core_core_y,leave as ɵangular_packages_core_core_w,startTimeRange as ɵangular_packages_core_core_x} from './src/profile/wtf_impl';\nexport {SCHEDULER as ɵangular_packages_core_core_bb} from './src/render3/component_ref';\nexport {injectAttributeImpl as ɵangular_packages_core_core_bc} from './src/render3/di';\nexport {TElementNode as ɵangular_packages_core_core_bg} from './src/render3/interfaces/node';\nexport {PlayerFactoryBuildFn as ɵangular_packages_core_core_bi} from './src/render3/interfaces/player';\nexport {LView as ɵangular_packages_core_core_bm} from './src/render3/interfaces/view';\nexport {getLView as ɵangular_packages_core_core_bd,getPreviousOrParentTNode as ɵangular_packages_core_core_be,nextContextImpl as ɵangular_packages_core_core_bf} from './src/render3/state';\nexport {BoundPlayerFactory as ɵangular_packages_core_core_bj} from './src/render3/styling/player_factory';\nexport {getRootContext as ɵangular_packages_core_core_bp} from './src/render3/util/view_traversal_utils';\nexport {loadInternal as ɵangular_packages_core_core_bo} from './src/render3/util/view_utils';\nexport {createElementRef as ɵangular_packages_core_core_g,createTemplateRef as ɵangular_packages_core_core_h,createViewRef as ɵangular_packages_core_core_i} from './src/render3/view_engine_compatibility';\nexport {getUrlSanitizer as ɵangular_packages_core_core_bh} from './src/sanitization/sanitization';\nexport {noSideEffects as ɵangular_packages_core_core_bn} from './src/util/closure';\nexport {makeParamDecorator as ɵangular_packages_core_core_bk,makePropDecorator as ɵangular_packages_core_core_bl} from './src/util/decorators';\nexport {getClosureSafeProperty as ɵangular_packages_core_core_bq} from './src/util/property';\nexport {_def as ɵangular_packages_core_core_z} from './src/view/provider';\nexport {DebugContext as ɵangular_packages_core_core_ba} from './src/view/types';"],"names":["InjectFlags","global","USE_VALUE","render3CompileInjectable","EMPTY_ARRAY","CIRCULAR","NO_NEW_LINE","ChangeDetectionStrategy","ChangeDetectorStatus","ViewEncapsulation","INJECTOR","tslib_1.__values","SecurityContext","allowHostInstructionsQueueFlush","flushHostInstructionsQueue","getOldSinglePropIndexValue","getOldProp","getProp","hasValueChanged","setClass","setStyle","initializeStaticStylingContext","isOldStylingContext","getActiveDirectiveStylingIndex","newStylingInit","resolveStylePropValue","updatestyleProp","newStyleProp","updateclassProp","newClassProp","newStyleMap","newClassMap","newStylingApply","getContext","resolveProvider","tslib_1.__extends","viewEngine_NgModuleRef","render3InjectElementRef","RendererStyleFlags2","render3InjectRenderer2","render3InjectChangeDetectorRef","render3InjectTemplateRef","render3InjectViewContainerRef","_renderCompCount","renderDetachView","createInjector","RendererV1","InjectorRefTokenKey","INJECTORRefTokenKey","_createProviderInstance","ComponentFactory","viewEngine_ComponentFactoryResolver","ComponentRef","viewEngine_ElementRef","viewEngine_ComponentFactory","ComponentFactoryResolver","viewEngine_ComponentRef","LocaleDataIndex","NgModuleRef","viewEngine_NgModuleFactory","getPipeDef","unwrapValue","Subscription","Subject","insertView","removeView","ViewEngine_ElementRef","ViewEngine_TemplateRef","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineBase","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetFactoryOf","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵtemplateRefExtractor","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵcontainer","r3.ɵɵnextContext","r3.ɵɵcontainerRefreshStart","r3.ɵɵcontainerRefreshEnd","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵallocHostVars","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵinterpolation1","r3.ɵɵinterpolation2","r3.ɵɵinterpolation3","r3.ɵɵinterpolation4","r3.ɵɵinterpolation5","r3.ɵɵinterpolation6","r3.ɵɵinterpolation7","r3.ɵɵinterpolation8","r3.ɵɵinterpolationV","r3.ɵɵlistener","r3.ɵɵload","r3.ɵɵprojection","r3.ɵɵupdateSyntheticHostBinding","r3.ɵɵcomponentHostSyntheticListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵviewQuery","r3.ɵɵstaticViewQuery","r3.ɵɵstaticContentQuery","r3.ɵɵloadViewQuery","r3.ɵɵcontentQuery","r3.ɵɵloadContentQuery","r3.ɵɵreference","r3.ɵɵelementHostAttrs","r3.ɵɵclassMap","r3.ɵɵstyling","r3.ɵɵstyleMap","r3.ɵɵstyleProp","r3.ɵɵstyleSanitizer","r3.ɵɵstylingApply","r3.ɵɵclassProp","r3.ɵɵselect","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextBinding","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵembeddedViewStart","r3.ɵɵembeddedViewEnd","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵi18nLocalize","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵdefaultStyleSanitizer","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","render3CompileComponent","render3CompileDirective","render3CompilePipe","render3CompileNgModule","tslib_1.__param","LOCALE_ID","TRANSLATIONS","MissingTranslationStrategy","NgModuleFactoryR3","ComponentFactoryR3","noop","R3NgModuleFactory","Observable","merge","share","ViewRef"],"mappings":";;;;;;;;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAA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