{"version":3,"file":"compiler.js","sources":["../../../packages/compiler/esm5/src/core.js","../../../packages/compiler/esm5/src/util.js","../../../packages/compiler/esm5/src/version.js","../../../packages/compiler/esm5/src/template_parser/template_ast.js","../../../packages/compiler/esm5/src/config.js","../../../packages/compiler/esm5/src/aot/static_symbol.js","../../../packages/compiler/esm5/src/compile_metadata.js","../../../packages/compiler/esm5/src/ast_path.js","../../../packages/compiler/esm5/src/ml_parser/ast.js","../../../packages/compiler/esm5/src/assertions.js","../../../packages/compiler/esm5/src/ml_parser/interpolation_config.js","../../../packages/compiler/esm5/src/style_url_resolver.js","../../../packages/compiler/esm5/src/ml_parser/tags.js","../../../packages/compiler/esm5/src/template_parser/template_preparser.js","../../../packages/compiler/esm5/src/directive_normalizer.js","../../../packages/compiler/esm5/src/directive_resolver.js","../../../packages/compiler/esm5/src/chars.js","../../../packages/compiler/esm5/src/expression_parser/lexer.js","../../../packages/compiler/esm5/src/expression_parser/ast.js","../../../packages/compiler/esm5/src/expression_parser/parser.js","../../../packages/compiler/esm5/src/parse_util.js","../../../packages/compiler/esm5/src/ml_parser/lexer.js","../../../packages/compiler/esm5/src/ml_parser/parser.js","../../../packages/compiler/esm5/src/i18n/digest.js","../../../packages/compiler/esm5/src/i18n/i18n_ast.js","../../../packages/compiler/esm5/src/ml_parser/html_tags.js","../../../packages/compiler/esm5/src/i18n/serializers/placeholder.js","../../../packages/compiler/esm5/src/i18n/i18n_parser.js","../../../packages/compiler/esm5/src/i18n/parse_util.js","../../../packages/compiler/esm5/src/i18n/extractor_merger.js","../../../packages/compiler/esm5/src/ml_parser/xml_tags.js","../../../packages/compiler/esm5/src/ml_parser/xml_parser.js","../../../packages/compiler/esm5/src/i18n/serializers/serializer.js","../../../packages/compiler/esm5/src/i18n/serializers/xml_helper.js","../../../packages/compiler/esm5/src/i18n/serializers/xliff.js","../../../packages/compiler/esm5/src/i18n/serializers/xliff2.js","../../../packages/compiler/esm5/src/i18n/serializers/xmb.js","../../../packages/compiler/esm5/src/i18n/serializers/xtb.js","../../../packages/compiler/esm5/src/ml_parser/html_parser.js","../../../packages/compiler/esm5/src/i18n/translation_bundle.js","../../../packages/compiler/esm5/src/i18n/i18n_html_parser.js","../../../packages/compiler/esm5/src/aot/util.js","../../../packages/compiler/esm5/src/identifiers.js","../../../packages/compiler/esm5/src/lifecycle_reflector.js","../../../packages/compiler/esm5/src/selector.js","../../../packages/compiler/esm5/src/metadata_resolver.js","../../../packages/compiler/esm5/src/output/output_ast.js","../../../packages/compiler/esm5/src/provider_analyzer.js","../../../packages/compiler/esm5/src/output/value_util.js","../../../packages/compiler/esm5/src/view_compiler/provider_compiler.js","../../../packages/compiler/esm5/src/ng_module_compiler.js","../../../packages/compiler/esm5/src/ng_module_resolver.js","../../../packages/compiler/esm5/src/output/source_map.js","../../../packages/compiler/esm5/src/output/abstract_emitter.js","../../../packages/compiler/esm5/src/output/ts_emitter.js","../../../packages/compiler/esm5/src/pipe_resolver.js","../../../packages/compiler/esm5/src/schema/dom_security_schema.js","../../../packages/compiler/esm5/src/schema/element_schema_registry.js","../../../packages/compiler/esm5/src/schema/dom_element_schema_registry.js","../../../packages/compiler/esm5/src/shadow_css.js","../../../packages/compiler/esm5/src/style_compiler.js","../../../packages/compiler/esm5/src/ml_parser/html_whitespaces.js","../../../packages/compiler/esm5/src/ml_parser/icu_ast_expander.js","../../../packages/compiler/esm5/src/template_parser/binding_parser.js","../../../packages/compiler/esm5/src/template_parser/template_parser.js","../../../packages/compiler/esm5/src/compiler_util/expression_converter.js","../../../packages/compiler/esm5/src/view_compiler/type_check_compiler.js","../../../packages/compiler/esm5/src/view_compiler/view_compiler.js","../../../packages/compiler/esm5/src/i18n/message_bundle.js","../../../packages/compiler/esm5/src/aot/generated_file.js","../../../packages/compiler/esm5/src/aot/lazy_routes.js","../../../packages/compiler/esm5/src/aot/static_symbol_resolver.js","../../../packages/compiler/esm5/src/aot/summary_serializer.js","../../../packages/compiler/esm5/src/aot/compiler.js","../../../packages/compiler/esm5/src/aot/formatted_error.js","../../../packages/compiler/esm5/src/aot/static_reflector.js","../../../packages/compiler/esm5/src/aot/summary_resolver.js","../../../packages/compiler/esm5/src/aot/compiler_factory.js","../../../packages/compiler/esm5/src/summary_resolver.js","../../../packages/compiler/esm5/src/output/output_interpreter.js","../../../packages/compiler/esm5/src/output/abstract_js_emitter.js","../../../packages/compiler/esm5/src/output/output_jit.js","../../../packages/compiler/esm5/src/jit/compiler.js","../../../packages/compiler/esm5/src/compile_reflector.js","../../../packages/compiler/esm5/src/url_resolver.js","../../../packages/compiler/esm5/src/resource_loader.js","../../../packages/compiler/esm5/src/i18n/extractor.js","../../../packages/compiler/esm5/src/i18n/index.js","../../../packages/compiler/esm5/src/compiler.js","../../../packages/compiler/esm5/public_api.js","../../../packages/compiler/esm5/compiler.js"],"sourcesContent":["/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\n// Attention:\n// This file duplicates types and values from @angular/core\n// so that we are able to make @angular/compiler independent of @angular/core.\n// This is important to prevent a build cycle, as @angular/core needs to\n// be compiled with the compiler.\n/**\n * @record\n */\nexport function Inject() { }\nfunction Inject_tsickle_Closure_declarations() {\n /** @type {?} */\n Inject.prototype.token;\n}\nexport var /** @type {?} */ createInject = makeMetadataFactory('Inject', function (token) { return ({ token: token }); });\nexport var /** @type {?} */ createInjectionToken = makeMetadataFactory('InjectionToken', function (desc) { return ({ _desc: desc }); });\n/**\n * @record\n */\nexport function Attribute() { }\nfunction Attribute_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Attribute.prototype.attributeName;\n}\nexport var /** @type {?} */ createAttribute = makeMetadataFactory('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n/**\n * @record\n */\nexport function Query() { }\nfunction Query_tsickle_Closure_declarations() {\n /** @type {?} */\n Query.prototype.descendants;\n /** @type {?} */\n Query.prototype.first;\n /** @type {?} */\n Query.prototype.read;\n /** @type {?} */\n Query.prototype.isViewQuery;\n /** @type {?} */\n Query.prototype.selector;\n}\nexport var /** @type {?} */ createContentChildren = makeMetadataFactory('ContentChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (tslib_1.__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n});\nexport var /** @type {?} */ createContentChild = makeMetadataFactory('ContentChild', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (tslib_1.__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n});\nexport var /** @type {?} */ createViewChildren = makeMetadataFactory('ViewChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (tslib_1.__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n});\nexport var /** @type {?} */ createViewChild = makeMetadataFactory('ViewChild', function (selector, data) {\n return (tslib_1.__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n});\n/**\n * @record\n */\nexport function Directive() { }\nfunction Directive_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Directive.prototype.selector;\n /** @type {?|undefined} */\n Directive.prototype.inputs;\n /** @type {?|undefined} */\n Directive.prototype.outputs;\n /** @type {?|undefined} */\n Directive.prototype.host;\n /** @type {?|undefined} */\n Directive.prototype.providers;\n /** @type {?|undefined} */\n Directive.prototype.exportAs;\n /** @type {?|undefined} */\n Directive.prototype.queries;\n /** @type {?|undefined} */\n Directive.prototype.guards;\n}\nexport var /** @type {?} */ createDirective = makeMetadataFactory('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n});\n/**\n * @record\n */\nexport function Component() { }\nfunction Component_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Component.prototype.changeDetection;\n /** @type {?|undefined} */\n Component.prototype.viewProviders;\n /** @type {?|undefined} */\n Component.prototype.moduleId;\n /** @type {?|undefined} */\n Component.prototype.templateUrl;\n /** @type {?|undefined} */\n Component.prototype.template;\n /** @type {?|undefined} */\n Component.prototype.styleUrls;\n /** @type {?|undefined} */\n Component.prototype.styles;\n /** @type {?|undefined} */\n Component.prototype.animations;\n /** @type {?|undefined} */\n Component.prototype.encapsulation;\n /** @type {?|undefined} */\n Component.prototype.interpolation;\n /** @type {?|undefined} */\n Component.prototype.entryComponents;\n /** @type {?|undefined} */\n Component.prototype.preserveWhitespaces;\n}\n/** @enum {number} */\nvar ViewEncapsulation = {\n Emulated: 0,\n Native: 1,\n None: 2,\n};\nexport { ViewEncapsulation };\nViewEncapsulation[ViewEncapsulation.Emulated] = \"Emulated\";\nViewEncapsulation[ViewEncapsulation.Native] = \"Native\";\nViewEncapsulation[ViewEncapsulation.None] = \"None\";\n/** @enum {number} */\nvar ChangeDetectionStrategy = {\n OnPush: 0,\n Default: 1,\n};\nexport { ChangeDetectionStrategy };\nChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = \"OnPush\";\nChangeDetectionStrategy[ChangeDetectionStrategy.Default] = \"Default\";\nexport var /** @type {?} */ createComponent = makeMetadataFactory('Component', function (c) {\n if (c === void 0) { c = {}; }\n return (tslib_1.__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));\n});\n/**\n * @record\n */\nexport function Pipe() { }\nfunction Pipe_tsickle_Closure_declarations() {\n /** @type {?} */\n Pipe.prototype.name;\n /** @type {?|undefined} */\n Pipe.prototype.pure;\n}\nexport var /** @type {?} */ createPipe = makeMetadataFactory('Pipe', function (p) { return (tslib_1.__assign({ pure: true }, p)); });\n/**\n * @record\n */\nexport function Input() { }\nfunction Input_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Input.prototype.bindingPropertyName;\n}\nexport var /** @type {?} */ createInput = makeMetadataFactory('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * @record\n */\nexport function Output() { }\nfunction Output_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Output.prototype.bindingPropertyName;\n}\nexport var /** @type {?} */ createOutput = makeMetadataFactory('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * @record\n */\nexport function HostBinding() { }\nfunction HostBinding_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n HostBinding.prototype.hostPropertyName;\n}\nexport var /** @type {?} */ createHostBinding = makeMetadataFactory('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\n/**\n * @record\n */\nexport function HostListener() { }\nfunction HostListener_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n HostListener.prototype.eventName;\n /** @type {?|undefined} */\n HostListener.prototype.args;\n}\nexport var /** @type {?} */ createHostListener = makeMetadataFactory('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });\n/**\n * @record\n */\nexport function NgModule() { }\nfunction NgModule_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n NgModule.prototype.providers;\n /** @type {?|undefined} */\n NgModule.prototype.declarations;\n /** @type {?|undefined} */\n NgModule.prototype.imports;\n /** @type {?|undefined} */\n NgModule.prototype.exports;\n /** @type {?|undefined} */\n NgModule.prototype.entryComponents;\n /** @type {?|undefined} */\n NgModule.prototype.bootstrap;\n /** @type {?|undefined} */\n NgModule.prototype.schemas;\n /** @type {?|undefined} */\n NgModule.prototype.id;\n}\nexport var /** @type {?} */ createNgModule = makeMetadataFactory('NgModule', function (ngModule) { return ngModule; });\n/**\n * @record\n */\nexport function ModuleWithProviders() { }\nfunction ModuleWithProviders_tsickle_Closure_declarations() {\n /** @type {?} */\n ModuleWithProviders.prototype.ngModule;\n /** @type {?|undefined} */\n ModuleWithProviders.prototype.providers;\n}\n/**\n * @record\n */\nexport function SchemaMetadata() { }\nfunction SchemaMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n SchemaMetadata.prototype.name;\n}\nexport var /** @type {?} */ CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nexport var /** @type {?} */ NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nexport var /** @type {?} */ createOptional = makeMetadataFactory('Optional');\nexport var /** @type {?} */ createInjectable = makeMetadataFactory('Injectable');\nexport var /** @type {?} */ createSelf = makeMetadataFactory('Self');\nexport var /** @type {?} */ createSkipSelf = makeMetadataFactory('SkipSelf');\nexport var /** @type {?} */ createHost = makeMetadataFactory('Host');\nexport var /** @type {?} */ Type = Function;\n/** @enum {number} */\nvar SecurityContext = {\n NONE: 0,\n HTML: 1,\n STYLE: 2,\n SCRIPT: 3,\n URL: 4,\n RESOURCE_URL: 5,\n};\nexport { SecurityContext };\nSecurityContext[SecurityContext.NONE] = \"NONE\";\nSecurityContext[SecurityContext.HTML] = \"HTML\";\nSecurityContext[SecurityContext.STYLE] = \"STYLE\";\nSecurityContext[SecurityContext.SCRIPT] = \"SCRIPT\";\nSecurityContext[SecurityContext.URL] = \"URL\";\nSecurityContext[SecurityContext.RESOURCE_URL] = \"RESOURCE_URL\";\n/** @enum {number} */\nvar NodeFlags = {\n None: 0,\n TypeElement: 1,\n TypeText: 2,\n ProjectedTemplate: 4,\n CatRenderNode: 3,\n TypeNgContent: 8,\n TypePipe: 16,\n TypePureArray: 32,\n TypePureObject: 64,\n TypePurePipe: 128,\n CatPureExpression: 224,\n TypeValueProvider: 256,\n TypeClassProvider: 512,\n TypeFactoryProvider: 1024,\n TypeUseExistingProvider: 2048,\n LazyProvider: 4096,\n PrivateProvider: 8192,\n TypeDirective: 16384,\n Component: 32768,\n CatProviderNoDirective: 3840,\n CatProvider: 20224,\n OnInit: 65536,\n OnDestroy: 131072,\n DoCheck: 262144,\n OnChanges: 524288,\n AfterContentInit: 1048576,\n AfterContentChecked: 2097152,\n AfterViewInit: 4194304,\n AfterViewChecked: 8388608,\n EmbeddedViews: 16777216,\n ComponentView: 33554432,\n TypeContentQuery: 67108864,\n TypeViewQuery: 134217728,\n StaticQuery: 268435456,\n DynamicQuery: 536870912,\n CatQuery: 201326592,\n // mutually exclusive values...\n Types: 201347067,\n};\nexport { NodeFlags };\n/** @enum {number} */\nvar DepFlags = {\n None: 0,\n SkipSelf: 1,\n Optional: 2,\n Value: 8,\n};\nexport { DepFlags };\n/** @enum {number} */\nvar ArgumentType = { Inline: 0, Dynamic: 1, };\nexport { ArgumentType };\n/** @enum {number} */\nvar BindingFlags = {\n TypeElementAttribute: 1,\n TypeElementClass: 2,\n TypeElementStyle: 4,\n TypeProperty: 8,\n SyntheticProperty: 16,\n SyntheticHostProperty: 32,\n CatSyntheticProperty: 48,\n // mutually exclusive values...\n Types: 15,\n};\nexport { BindingFlags };\n/** @enum {number} */\nvar QueryBindingType = { First: 0, All: 1, };\nexport { QueryBindingType };\n/** @enum {number} */\nvar QueryValueType = {\n ElementRef: 0,\n RenderElement: 1,\n TemplateRef: 2,\n ViewContainerRef: 3,\n Provider: 4,\n};\nexport { QueryValueType };\n/** @enum {number} */\nvar ViewFlags = {\n None: 0,\n OnPush: 2,\n};\nexport { ViewFlags };\n/** @enum {number} */\nvar MissingTranslationStrategy = {\n Error: 0,\n Warning: 1,\n Ignore: 2,\n};\nexport { MissingTranslationStrategy };\nMissingTranslationStrategy[MissingTranslationStrategy.Error] = \"Error\";\nMissingTranslationStrategy[MissingTranslationStrategy.Warning] = \"Warning\";\nMissingTranslationStrategy[MissingTranslationStrategy.Ignore] = \"Ignore\";\n/**\n * @record\n * @template T\n */\nexport function MetadataFactory() { }\nfunction MetadataFactory_tsickle_Closure_declarations() {\n /* TODO: handle strange member:\n (...args: any[]): T;\n */\n /** @type {?} */\n MetadataFactory.prototype.isTypeOf;\n /** @type {?} */\n MetadataFactory.prototype.ngMetadataName;\n}\n/**\n * @template T\n * @param {?} name\n * @param {?=} props\n * @return {?}\n */\nfunction makeMetadataFactory(name, props) {\n var /** @type {?} */ factory = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var /** @type {?} */ values = props ? props.apply(void 0, args) : {};\n return tslib_1.__assign({ ngMetadataName: name }, values);\n };\n factory.isTypeOf = function (obj) { return obj && obj.ngMetadataName === name; };\n factory.ngMetadataName = name;\n return factory;\n}\n/**\n * @record\n */\nexport function Route() { }\nfunction Route_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Route.prototype.children;\n /** @type {?|undefined} */\n Route.prototype.loadChildren;\n}\n//# sourceMappingURL=core.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar /** @type {?} */ DASH_CASE_REGEXP = /-+([a-z0-9])/g;\n/**\n * @param {?} input\n * @return {?}\n */\nexport function dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[1].toUpperCase();\n });\n}\n/**\n * @param {?} input\n * @param {?} defaultValues\n * @return {?}\n */\nexport function splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\n/**\n * @param {?} input\n * @param {?} defaultValues\n * @return {?}\n */\nexport function splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\n/**\n * @param {?} input\n * @param {?} character\n * @param {?} defaultValues\n * @return {?}\n */\nfunction _splitAt(input, character, defaultValues) {\n var /** @type {?} */ characterIndex = input.indexOf(character);\n if (characterIndex == -1)\n return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\n/**\n * @param {?} value\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\nexport function visitValue(value, visitor, context) {\n if (Array.isArray(value)) {\n return visitor.visitArray(/** @type {?} */ (value), context);\n }\n if (isStrictStringMap(value)) {\n return visitor.visitStringMap(/** @type {?} */ (value), context);\n }\n if (value == null || typeof value == 'string' || typeof value == 'number' ||\n typeof value == 'boolean') {\n return visitor.visitPrimitive(value, context);\n }\n return visitor.visitOther(value, context);\n}\n/**\n * @param {?} val\n * @return {?}\n */\nexport function isDefined(val) {\n return val !== null && val !== undefined;\n}\n/**\n * @template T\n * @param {?} val\n * @return {?}\n */\nexport function noUndefined(val) {\n return val === undefined ? /** @type {?} */ ((null)) : val;\n}\n/**\n * @record\n */\nexport function ValueVisitor() { }\nfunction ValueVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n ValueVisitor.prototype.visitArray;\n /** @type {?} */\n ValueVisitor.prototype.visitStringMap;\n /** @type {?} */\n ValueVisitor.prototype.visitPrimitive;\n /** @type {?} */\n ValueVisitor.prototype.visitOther;\n}\nvar ValueTransformer = /** @class */ (function () {\n function ValueTransformer() {\n }\n /**\n * @param {?} arr\n * @param {?} context\n * @return {?}\n */\n ValueTransformer.prototype.visitArray = /**\n * @param {?} arr\n * @param {?} context\n * @return {?}\n */\n function (arr, context) {\n var _this = this;\n return arr.map(function (value) { return visitValue(value, _this, context); });\n };\n /**\n * @param {?} map\n * @param {?} context\n * @return {?}\n */\n ValueTransformer.prototype.visitStringMap = /**\n * @param {?} map\n * @param {?} context\n * @return {?}\n */\n function (map, context) {\n var _this = this;\n var /** @type {?} */ result = {};\n Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });\n return result;\n };\n /**\n * @param {?} value\n * @param {?} context\n * @return {?}\n */\n ValueTransformer.prototype.visitPrimitive = /**\n * @param {?} value\n * @param {?} context\n * @return {?}\n */\n function (value, context) { return value; };\n /**\n * @param {?} value\n * @param {?} context\n * @return {?}\n */\n ValueTransformer.prototype.visitOther = /**\n * @param {?} value\n * @param {?} context\n * @return {?}\n */\n function (value, context) { return value; };\n return ValueTransformer;\n}());\nexport { ValueTransformer };\nexport var /** @type {?} */ SyncAsync = {\n assertSync: function (value) {\n if (isPromise(value)) {\n throw new Error(\"Illegal state: value cannot be a promise\");\n }\n return value;\n },\n then: function (value, cb) { return isPromise(value) ? value.then(cb) : cb(value); },\n all: function (syncAsyncValues) {\n return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : /** @type {?} */ (syncAsyncValues);\n }\n};\n/**\n * @param {?} msg\n * @param {?=} parseErrors\n * @return {?}\n */\nexport function syntaxError(msg, parseErrors) {\n var /** @type {?} */ error = Error(msg);\n (/** @type {?} */ (error))[ERROR_SYNTAX_ERROR] = true;\n if (parseErrors)\n (/** @type {?} */ (error))[ERROR_PARSE_ERRORS] = parseErrors;\n return error;\n}\nvar /** @type {?} */ ERROR_SYNTAX_ERROR = 'ngSyntaxError';\nvar /** @type {?} */ ERROR_PARSE_ERRORS = 'ngParseErrors';\n/**\n * @param {?} error\n * @return {?}\n */\nexport function isSyntaxError(error) {\n return (/** @type {?} */ (error))[ERROR_SYNTAX_ERROR];\n}\n/**\n * @param {?} error\n * @return {?}\n */\nexport function getParseErrors(error) {\n return (/** @type {?} */ (error))[ERROR_PARSE_ERRORS] || [];\n}\n/**\n * @param {?} s\n * @return {?}\n */\nexport function escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nvar /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});\n/**\n * @param {?} obj\n * @return {?}\n */\nfunction isStrictStringMap(obj) {\n return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\n}\n/**\n * @param {?} str\n * @return {?}\n */\nexport function utf8Encode(str) {\n var /** @type {?} */ encoded = '';\n for (var /** @type {?} */ index = 0; index < str.length; index++) {\n var /** @type {?} */ codePoint = str.charCodeAt(index);\n // decode surrogate\n // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {\n var /** @type {?} */ low = str.charCodeAt(index + 1);\n if (low >= 0xdc00 && low <= 0xdfff) {\n index++;\n codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;\n }\n }\n if (codePoint <= 0x7f) {\n encoded += String.fromCharCode(codePoint);\n }\n else if (codePoint <= 0x7ff) {\n encoded += String.fromCharCode(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0xffff) {\n encoded += String.fromCharCode((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0x1fffff) {\n encoded += String.fromCharCode(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n }\n return encoded;\n}\n/**\n * @record\n */\nexport function OutputContext() { }\nfunction OutputContext_tsickle_Closure_declarations() {\n /** @type {?} */\n OutputContext.prototype.genFilePath;\n /** @type {?} */\n OutputContext.prototype.statements;\n /** @type {?} */\n OutputContext.prototype.importExpr;\n}\n/**\n * @param {?} token\n * @return {?}\n */\nexport function stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return \"\" + token.overriddenName;\n }\n if (token.name) {\n return \"\" + token.name;\n }\n var /** @type {?} */ res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var /** @type {?} */ newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n * @param {?} type\n * @return {?}\n */\nexport function resolveForwardRef(type) {\n if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {\n return type();\n }\n else {\n return type;\n }\n}\n/**\n * Determine if the argument is shaped like a Promise\n * @param {?} obj\n * @return {?}\n */\nexport function isPromise(obj) {\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}\nvar Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n var /** @type {?} */ splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n return Version;\n}());\nexport { Version };\nfunction Version_tsickle_Closure_declarations() {\n /** @type {?} */\n Version.prototype.major;\n /** @type {?} */\n Version.prototype.minor;\n /** @type {?} */\n Version.prototype.patch;\n /** @type {?} */\n Version.prototype.full;\n}\n/**\n * @record\n */\nexport function Console() { }\nfunction Console_tsickle_Closure_declarations() {\n /** @type {?} */\n Console.prototype.log;\n /** @type {?} */\n Console.prototype.warn;\n}\n//# sourceMappingURL=util.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { Version } from './util';\n/**\n * \\@stable\n */\nexport var /** @type {?} */ VERSION = new Version('5.2.11');\n//# sourceMappingURL=version.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\n/**\n * An Abstract Syntax Tree node representing part of a parsed Angular template.\n * @record\n */\nexport function TemplateAst() { }\nfunction TemplateAst_tsickle_Closure_declarations() {\n /**\n * The source span from which this node was parsed.\n * @type {?}\n */\n TemplateAst.prototype.sourceSpan;\n /**\n * Visit this node and possibly transform it.\n * @type {?}\n */\n TemplateAst.prototype.visit;\n}\n/**\n * A segment of text within the template.\n */\nvar /**\n * A segment of text within the template.\n */\nTextAst = /** @class */ (function () {\n function TextAst(value, ngContentIndex, sourceSpan) {\n this.value = value;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n TextAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitText(this, context); };\n return TextAst;\n}());\n/**\n * A segment of text within the template.\n */\nexport { TextAst };\nfunction TextAst_tsickle_Closure_declarations() {\n /** @type {?} */\n TextAst.prototype.value;\n /** @type {?} */\n TextAst.prototype.ngContentIndex;\n /** @type {?} */\n TextAst.prototype.sourceSpan;\n}\n/**\n * A bound expression within the text of a template.\n */\nvar /**\n * A bound expression within the text of a template.\n */\nBoundTextAst = /** @class */ (function () {\n function BoundTextAst(value, ngContentIndex, sourceSpan) {\n this.value = value;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BoundTextAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitBoundText(this, context);\n };\n return BoundTextAst;\n}());\n/**\n * A bound expression within the text of a template.\n */\nexport { BoundTextAst };\nfunction BoundTextAst_tsickle_Closure_declarations() {\n /** @type {?} */\n BoundTextAst.prototype.value;\n /** @type {?} */\n BoundTextAst.prototype.ngContentIndex;\n /** @type {?} */\n BoundTextAst.prototype.sourceSpan;\n}\n/**\n * A plain attribute on an element.\n */\nvar /**\n * A plain attribute on an element.\n */\nAttrAst = /** @class */ (function () {\n function AttrAst(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n AttrAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitAttr(this, context); };\n return AttrAst;\n}());\n/**\n * A plain attribute on an element.\n */\nexport { AttrAst };\nfunction AttrAst_tsickle_Closure_declarations() {\n /** @type {?} */\n AttrAst.prototype.name;\n /** @type {?} */\n AttrAst.prototype.value;\n /** @type {?} */\n AttrAst.prototype.sourceSpan;\n}\n/**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[\\@trigger]=\"stateExp\"`)\n */\nvar /**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[\\@trigger]=\"stateExp\"`)\n */\nBoundElementPropertyAst = /** @class */ (function () {\n function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.isAnimation = this.type === PropertyBindingType.Animation;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BoundElementPropertyAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitElementProperty(this, context);\n };\n return BoundElementPropertyAst;\n}());\n/**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[\\@trigger]=\"stateExp\"`)\n */\nexport { BoundElementPropertyAst };\nfunction BoundElementPropertyAst_tsickle_Closure_declarations() {\n /** @type {?} */\n BoundElementPropertyAst.prototype.isAnimation;\n /** @type {?} */\n BoundElementPropertyAst.prototype.name;\n /** @type {?} */\n BoundElementPropertyAst.prototype.type;\n /** @type {?} */\n BoundElementPropertyAst.prototype.securityContext;\n /** @type {?} */\n BoundElementPropertyAst.prototype.value;\n /** @type {?} */\n BoundElementPropertyAst.prototype.unit;\n /** @type {?} */\n BoundElementPropertyAst.prototype.sourceSpan;\n}\n/**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(\\@trigger.phase)=\"callback($event)\"`).\n */\nvar /**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(\\@trigger.phase)=\"callback($event)\"`).\n */\nBoundEventAst = /** @class */ (function () {\n function BoundEventAst(name, target, phase, handler, sourceSpan) {\n this.name = name;\n this.target = target;\n this.phase = phase;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);\n this.isAnimation = !!this.phase;\n }\n /**\n * @param {?} name\n * @param {?} target\n * @param {?} phase\n * @return {?}\n */\n BoundEventAst.calcFullName = /**\n * @param {?} name\n * @param {?} target\n * @param {?} phase\n * @return {?}\n */\n function (name, target, phase) {\n if (target) {\n return target + \":\" + name;\n }\n else if (phase) {\n return \"@\" + name + \".\" + phase;\n }\n else {\n return name;\n }\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BoundEventAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitEvent(this, context);\n };\n return BoundEventAst;\n}());\n/**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(\\@trigger.phase)=\"callback($event)\"`).\n */\nexport { BoundEventAst };\nfunction BoundEventAst_tsickle_Closure_declarations() {\n /** @type {?} */\n BoundEventAst.prototype.fullName;\n /** @type {?} */\n BoundEventAst.prototype.isAnimation;\n /** @type {?} */\n BoundEventAst.prototype.name;\n /** @type {?} */\n BoundEventAst.prototype.target;\n /** @type {?} */\n BoundEventAst.prototype.phase;\n /** @type {?} */\n BoundEventAst.prototype.handler;\n /** @type {?} */\n BoundEventAst.prototype.sourceSpan;\n}\n/**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\nvar /**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\nReferenceAst = /** @class */ (function () {\n function ReferenceAst(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ReferenceAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitReference(this, context);\n };\n return ReferenceAst;\n}());\n/**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\nexport { ReferenceAst };\nfunction ReferenceAst_tsickle_Closure_declarations() {\n /** @type {?} */\n ReferenceAst.prototype.name;\n /** @type {?} */\n ReferenceAst.prototype.value;\n /** @type {?} */\n ReferenceAst.prototype.sourceSpan;\n}\n/**\n * A variable declaration on a (e.g. `var-someName=\"someLocalName\"`).\n */\nvar /**\n * A variable declaration on a (e.g. `var-someName=\"someLocalName\"`).\n */\nVariableAst = /** @class */ (function () {\n function VariableAst(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n VariableAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitVariable(this, context);\n };\n return VariableAst;\n}());\n/**\n * A variable declaration on a (e.g. `var-someName=\"someLocalName\"`).\n */\nexport { VariableAst };\nfunction VariableAst_tsickle_Closure_declarations() {\n /** @type {?} */\n VariableAst.prototype.name;\n /** @type {?} */\n VariableAst.prototype.value;\n /** @type {?} */\n VariableAst.prototype.sourceSpan;\n}\n/**\n * An element declaration in a template.\n */\nvar /**\n * An element declaration in a template.\n */\nElementAst = /** @class */ (function () {\n function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {\n this.name = name;\n this.attrs = attrs;\n this.inputs = inputs;\n this.outputs = outputs;\n this.references = references;\n this.directives = directives;\n this.providers = providers;\n this.hasViewContainer = hasViewContainer;\n this.queryMatches = queryMatches;\n this.children = children;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ElementAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitElement(this, context);\n };\n return ElementAst;\n}());\n/**\n * An element declaration in a template.\n */\nexport { ElementAst };\nfunction ElementAst_tsickle_Closure_declarations() {\n /** @type {?} */\n ElementAst.prototype.name;\n /** @type {?} */\n ElementAst.prototype.attrs;\n /** @type {?} */\n ElementAst.prototype.inputs;\n /** @type {?} */\n ElementAst.prototype.outputs;\n /** @type {?} */\n ElementAst.prototype.references;\n /** @type {?} */\n ElementAst.prototype.directives;\n /** @type {?} */\n ElementAst.prototype.providers;\n /** @type {?} */\n ElementAst.prototype.hasViewContainer;\n /** @type {?} */\n ElementAst.prototype.queryMatches;\n /** @type {?} */\n ElementAst.prototype.children;\n /** @type {?} */\n ElementAst.prototype.ngContentIndex;\n /** @type {?} */\n ElementAst.prototype.sourceSpan;\n /** @type {?} */\n ElementAst.prototype.endSourceSpan;\n}\n/**\n * A `` element included in an Angular template.\n */\nvar /**\n * A `` element included in an Angular template.\n */\nEmbeddedTemplateAst = /** @class */ (function () {\n function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {\n this.attrs = attrs;\n this.outputs = outputs;\n this.references = references;\n this.variables = variables;\n this.directives = directives;\n this.providers = providers;\n this.hasViewContainer = hasViewContainer;\n this.queryMatches = queryMatches;\n this.children = children;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n EmbeddedTemplateAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitEmbeddedTemplate(this, context);\n };\n return EmbeddedTemplateAst;\n}());\n/**\n * A `` element included in an Angular template.\n */\nexport { EmbeddedTemplateAst };\nfunction EmbeddedTemplateAst_tsickle_Closure_declarations() {\n /** @type {?} */\n EmbeddedTemplateAst.prototype.attrs;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.outputs;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.references;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.variables;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.directives;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.providers;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.hasViewContainer;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.queryMatches;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.children;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.ngContentIndex;\n /** @type {?} */\n EmbeddedTemplateAst.prototype.sourceSpan;\n}\n/**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\nvar /**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\nBoundDirectivePropertyAst = /** @class */ (function () {\n function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {\n this.directiveName = directiveName;\n this.templateName = templateName;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BoundDirectivePropertyAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitDirectiveProperty(this, context);\n };\n return BoundDirectivePropertyAst;\n}());\n/**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\nexport { BoundDirectivePropertyAst };\nfunction BoundDirectivePropertyAst_tsickle_Closure_declarations() {\n /** @type {?} */\n BoundDirectivePropertyAst.prototype.directiveName;\n /** @type {?} */\n BoundDirectivePropertyAst.prototype.templateName;\n /** @type {?} */\n BoundDirectivePropertyAst.prototype.value;\n /** @type {?} */\n BoundDirectivePropertyAst.prototype.sourceSpan;\n}\n/**\n * A directive declared on an element.\n */\nvar /**\n * A directive declared on an element.\n */\nDirectiveAst = /** @class */ (function () {\n function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {\n this.directive = directive;\n this.inputs = inputs;\n this.hostProperties = hostProperties;\n this.hostEvents = hostEvents;\n this.contentQueryStartId = contentQueryStartId;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n DirectiveAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitDirective(this, context);\n };\n return DirectiveAst;\n}());\n/**\n * A directive declared on an element.\n */\nexport { DirectiveAst };\nfunction DirectiveAst_tsickle_Closure_declarations() {\n /** @type {?} */\n DirectiveAst.prototype.directive;\n /** @type {?} */\n DirectiveAst.prototype.inputs;\n /** @type {?} */\n DirectiveAst.prototype.hostProperties;\n /** @type {?} */\n DirectiveAst.prototype.hostEvents;\n /** @type {?} */\n DirectiveAst.prototype.contentQueryStartId;\n /** @type {?} */\n DirectiveAst.prototype.sourceSpan;\n}\n/**\n * A provider declared on an element\n */\nvar /**\n * A provider declared on an element\n */\nProviderAst = /** @class */ (function () {\n function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan) {\n this.token = token;\n this.multiProvider = multiProvider;\n this.eager = eager;\n this.providers = providers;\n this.providerType = providerType;\n this.lifecycleHooks = lifecycleHooks;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ProviderAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n // No visit method in the visitor for now...\n return null;\n };\n return ProviderAst;\n}());\n/**\n * A provider declared on an element\n */\nexport { ProviderAst };\nfunction ProviderAst_tsickle_Closure_declarations() {\n /** @type {?} */\n ProviderAst.prototype.token;\n /** @type {?} */\n ProviderAst.prototype.multiProvider;\n /** @type {?} */\n ProviderAst.prototype.eager;\n /** @type {?} */\n ProviderAst.prototype.providers;\n /** @type {?} */\n ProviderAst.prototype.providerType;\n /** @type {?} */\n ProviderAst.prototype.lifecycleHooks;\n /** @type {?} */\n ProviderAst.prototype.sourceSpan;\n}\n/** @enum {number} */\nvar ProviderAstType = {\n PublicService: 0,\n PrivateService: 1,\n Component: 2,\n Directive: 3,\n Builtin: 4,\n};\nexport { ProviderAstType };\nProviderAstType[ProviderAstType.PublicService] = \"PublicService\";\nProviderAstType[ProviderAstType.PrivateService] = \"PrivateService\";\nProviderAstType[ProviderAstType.Component] = \"Component\";\nProviderAstType[ProviderAstType.Directive] = \"Directive\";\nProviderAstType[ProviderAstType.Builtin] = \"Builtin\";\n/**\n * Position where content is to be projected (instance of `` in a template).\n */\nvar /**\n * Position where content is to be projected (instance of `` in a template).\n */\nNgContentAst = /** @class */ (function () {\n function NgContentAst(index, ngContentIndex, sourceSpan) {\n this.index = index;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n NgContentAst.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitNgContent(this, context);\n };\n return NgContentAst;\n}());\n/**\n * Position where content is to be projected (instance of `` in a template).\n */\nexport { NgContentAst };\nfunction NgContentAst_tsickle_Closure_declarations() {\n /** @type {?} */\n NgContentAst.prototype.index;\n /** @type {?} */\n NgContentAst.prototype.ngContentIndex;\n /** @type {?} */\n NgContentAst.prototype.sourceSpan;\n}\n/** @enum {number} */\nvar PropertyBindingType = {\n /**\n * A normal binding to a property (e.g. `[property]=\"expression\"`).\n */\n Property: 0,\n /**\n * A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n */\n Attribute: 1,\n /**\n * A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n */\n Class: 2,\n /**\n * A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n */\n Style: 3,\n /**\n * A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n */\n Animation: 4,\n};\nexport { PropertyBindingType };\nPropertyBindingType[PropertyBindingType.Property] = \"Property\";\nPropertyBindingType[PropertyBindingType.Attribute] = \"Attribute\";\nPropertyBindingType[PropertyBindingType.Class] = \"Class\";\nPropertyBindingType[PropertyBindingType.Style] = \"Style\";\nPropertyBindingType[PropertyBindingType.Animation] = \"Animation\";\n/**\n * @record\n */\nexport function QueryMatch() { }\nfunction QueryMatch_tsickle_Closure_declarations() {\n /** @type {?} */\n QueryMatch.prototype.queryId;\n /** @type {?} */\n QueryMatch.prototype.value;\n}\n/**\n * A visitor for {\\@link TemplateAst} trees that will process each node.\n * @record\n */\nexport function TemplateAstVisitor() { }\nfunction TemplateAstVisitor_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n TemplateAstVisitor.prototype.visit;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitNgContent;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitEmbeddedTemplate;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitElement;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitReference;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitVariable;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitEvent;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitElementProperty;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitAttr;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitBoundText;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitText;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitDirective;\n /** @type {?} */\n TemplateAstVisitor.prototype.visitDirectiveProperty;\n}\n/**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\nvar /**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\nNullTemplateVisitor = /** @class */ (function () {\n function NullTemplateVisitor() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitNgContent = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitEmbeddedTemplate = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitElement = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitReference = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitVariable = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitEvent = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitElementProperty = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitAttr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitBoundText = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitText = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitDirective = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullTemplateVisitor.prototype.visitDirectiveProperty = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n return NullTemplateVisitor;\n}());\n/**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\nexport { NullTemplateVisitor };\n/**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\nvar /**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\nRecursiveTemplateAstVisitor = /** @class */ (function (_super) {\n tslib_1.__extends(RecursiveTemplateAstVisitor, _super);\n function RecursiveTemplateAstVisitor() {\n return _super.call(this) || this;\n }\n // Nodes with children\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveTemplateAstVisitor.prototype.visitEmbeddedTemplate = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.references);\n visit(ast.variables);\n visit(ast.directives);\n visit(ast.providers);\n visit(ast.children);\n });\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveTemplateAstVisitor.prototype.visitElement = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.inputs);\n visit(ast.outputs);\n visit(ast.references);\n visit(ast.directives);\n visit(ast.providers);\n visit(ast.children);\n });\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveTemplateAstVisitor.prototype.visitDirective = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.inputs);\n visit(ast.hostProperties);\n visit(ast.hostEvents);\n });\n };\n /**\n * @template T\n * @param {?} context\n * @param {?} cb\n * @return {?}\n */\n RecursiveTemplateAstVisitor.prototype.visitChildren = /**\n * @template T\n * @param {?} context\n * @param {?} cb\n * @return {?}\n */\n function (context, cb) {\n var /** @type {?} */ results = [];\n var /** @type {?} */ t = this;\n /**\n * @template T\n * @param {?} children\n * @return {?}\n */\n function visit(children) {\n if (children && children.length)\n results.push(templateVisitAll(t, children, context));\n }\n cb(visit);\n return [].concat.apply([], results);\n };\n return RecursiveTemplateAstVisitor;\n}(NullTemplateVisitor));\n/**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\nexport { RecursiveTemplateAstVisitor };\n/**\n * Visit every node in a list of {\\@link TemplateAst}s with the given {\\@link TemplateAstVisitor}.\n * @param {?} visitor\n * @param {?} asts\n * @param {?=} context\n * @return {?}\n */\nexport function templateVisitAll(visitor, asts, context) {\n if (context === void 0) { context = null; }\n var /** @type {?} */ result = [];\n var /** @type {?} */ visit = visitor.visit ?\n function (ast) { return ((visitor.visit))(ast, context) || ast.visit(visitor, context); } :\n function (ast) { return ast.visit(visitor, context); };\n asts.forEach(function (ast) {\n var /** @type {?} */ astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\n//# sourceMappingURL=template_ast.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { ViewEncapsulation } from './core';\nimport { noUndefined } from './util';\nvar CompilerConfig = /** @class */ (function () {\n function CompilerConfig(_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.defaultEncapsulation, defaultEncapsulation = _c === void 0 ? ViewEncapsulation.Emulated : _c, _d = _b.useJit, useJit = _d === void 0 ? true : _d, _e = _b.jitDevMode, jitDevMode = _e === void 0 ? false : _e, _f = _b.missingTranslation, missingTranslation = _f === void 0 ? null : _f, enableLegacyTemplate = _b.enableLegacyTemplate, preserveWhitespaces = _b.preserveWhitespaces, strictInjectionParameters = _b.strictInjectionParameters;\n this.defaultEncapsulation = defaultEncapsulation;\n this.useJit = !!useJit;\n this.jitDevMode = !!jitDevMode;\n this.missingTranslation = missingTranslation;\n this.enableLegacyTemplate = enableLegacyTemplate === true;\n this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n this.strictInjectionParameters = strictInjectionParameters === true;\n }\n return CompilerConfig;\n}());\nexport { CompilerConfig };\nfunction CompilerConfig_tsickle_Closure_declarations() {\n /** @type {?} */\n CompilerConfig.prototype.defaultEncapsulation;\n /** @type {?} */\n CompilerConfig.prototype.enableLegacyTemplate;\n /** @type {?} */\n CompilerConfig.prototype.useJit;\n /** @type {?} */\n CompilerConfig.prototype.jitDevMode;\n /** @type {?} */\n CompilerConfig.prototype.missingTranslation;\n /** @type {?} */\n CompilerConfig.prototype.preserveWhitespaces;\n /** @type {?} */\n CompilerConfig.prototype.strictInjectionParameters;\n}\n/**\n * @param {?} preserveWhitespacesOption\n * @param {?=} defaultSetting\n * @return {?}\n */\nexport function preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting) {\n if (defaultSetting === void 0) { defaultSetting = true; }\n return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n//# sourceMappingURL=config.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\nvar /**\n * A token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\nStaticSymbol = /** @class */ (function () {\n function StaticSymbol(filePath, name, members) {\n this.filePath = filePath;\n this.name = name;\n this.members = members;\n }\n /**\n * @return {?}\n */\n StaticSymbol.prototype.assertNoMembers = /**\n * @return {?}\n */\n function () {\n if (this.members.length) {\n throw new Error(\"Illegal state: symbol without members expected, but got \" + JSON.stringify(this) + \".\");\n }\n };\n return StaticSymbol;\n}());\n/**\n * A token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\nexport { StaticSymbol };\nfunction StaticSymbol_tsickle_Closure_declarations() {\n /** @type {?} */\n StaticSymbol.prototype.filePath;\n /** @type {?} */\n StaticSymbol.prototype.name;\n /** @type {?} */\n StaticSymbol.prototype.members;\n}\n/**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\nvar /**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\nStaticSymbolCache = /** @class */ (function () {\n function StaticSymbolCache() {\n this.cache = new Map();\n }\n /**\n * @param {?} declarationFile\n * @param {?} name\n * @param {?=} members\n * @return {?}\n */\n StaticSymbolCache.prototype.get = /**\n * @param {?} declarationFile\n * @param {?} name\n * @param {?=} members\n * @return {?}\n */\n function (declarationFile, name, members) {\n members = members || [];\n var /** @type {?} */ memberSuffix = members.length ? \".\" + members.join('.') : '';\n var /** @type {?} */ key = \"\\\"\" + declarationFile + \"\\\".\" + name + memberSuffix;\n var /** @type {?} */ result = this.cache.get(key);\n if (!result) {\n result = new StaticSymbol(declarationFile, name, members);\n this.cache.set(key, result);\n }\n return result;\n };\n return StaticSymbolCache;\n}());\n/**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\nexport { StaticSymbolCache };\nfunction StaticSymbolCache_tsickle_Closure_declarations() {\n /** @type {?} */\n StaticSymbolCache.prototype.cache;\n}\n//# sourceMappingURL=static_symbol.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { StaticSymbol } from './aot/static_symbol';\nimport { splitAtColon, stringify } from './util';\n// group 0: \"[prop] or (event) or @trigger\"\n// group 1: \"prop\" from \"[prop]\"\n// group 2: \"event\" from \"(event)\"\n// group 3: \"@trigger\" from \"@trigger\"\nvar /** @type {?} */ HOST_REG_EXP = /^(?:(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\)))|(\\@[-\\w]+)$/;\n/**\n * @param {?} name\n * @return {?}\n */\nfunction _sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\nvar /** @type {?} */ _anonymousTypeIndex = 0;\n/**\n * @param {?} compileIdentifier\n * @return {?}\n */\nexport function identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n var /** @type {?} */ ref = compileIdentifier.reference;\n if (ref instanceof StaticSymbol) {\n return ref.name;\n }\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n var /** @type {?} */ identifier = stringify(ref);\n if (identifier.indexOf('(') >= 0) {\n // case: anonymous functions!\n identifier = \"anonymous_\" + _anonymousTypeIndex++;\n ref['__anonymousType'] = identifier;\n }\n else {\n identifier = _sanitizeIdentifier(identifier);\n }\n return identifier;\n}\n/**\n * @param {?} compileIdentifier\n * @return {?}\n */\nexport function identifierModuleUrl(compileIdentifier) {\n var /** @type {?} */ ref = compileIdentifier.reference;\n if (ref instanceof StaticSymbol) {\n return ref.filePath;\n }\n // Runtime type\n return \"./\" + stringify(ref);\n}\n/**\n * @param {?} compType\n * @param {?} embeddedTemplateIndex\n * @return {?}\n */\nexport function viewClassName(compType, embeddedTemplateIndex) {\n return \"View_\" + identifierName({ reference: compType }) + \"_\" + embeddedTemplateIndex;\n}\n/**\n * @param {?} compType\n * @return {?}\n */\nexport function rendererTypeName(compType) {\n return \"RenderType_\" + identifierName({ reference: compType });\n}\n/**\n * @param {?} compType\n * @return {?}\n */\nexport function hostViewClassName(compType) {\n return \"HostView_\" + identifierName({ reference: compType });\n}\n/**\n * @param {?} compType\n * @return {?}\n */\nexport function componentFactoryName(compType) {\n return identifierName({ reference: compType }) + \"NgFactory\";\n}\n/**\n * @record\n */\nexport function ProxyClass() { }\nfunction ProxyClass_tsickle_Closure_declarations() {\n /** @type {?} */\n ProxyClass.prototype.setDelegate;\n}\n/**\n * @record\n */\nexport function CompileIdentifierMetadata() { }\nfunction CompileIdentifierMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileIdentifierMetadata.prototype.reference;\n}\n/** @enum {number} */\nvar CompileSummaryKind = {\n Pipe: 0,\n Directive: 1,\n NgModule: 2,\n Injectable: 3,\n};\nexport { CompileSummaryKind };\nCompileSummaryKind[CompileSummaryKind.Pipe] = \"Pipe\";\nCompileSummaryKind[CompileSummaryKind.Directive] = \"Directive\";\nCompileSummaryKind[CompileSummaryKind.NgModule] = \"NgModule\";\nCompileSummaryKind[CompileSummaryKind.Injectable] = \"Injectable\";\n/**\n * A CompileSummary is the data needed to use a directive / pipe / module\n * in other modules / components. However, this data is not enough to compile\n * the directive / module itself.\n * @record\n */\nexport function CompileTypeSummary() { }\nfunction CompileTypeSummary_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileTypeSummary.prototype.summaryKind;\n /** @type {?} */\n CompileTypeSummary.prototype.type;\n}\n/**\n * @record\n */\nexport function CompileDiDependencyMetadata() { }\nfunction CompileDiDependencyMetadata_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isAttribute;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isSelf;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isHost;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isSkipSelf;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isOptional;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.isValue;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.token;\n /** @type {?|undefined} */\n CompileDiDependencyMetadata.prototype.value;\n}\n/**\n * @record\n */\nexport function CompileProviderMetadata() { }\nfunction CompileProviderMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileProviderMetadata.prototype.token;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.useClass;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.useValue;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.useExisting;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.useFactory;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.deps;\n /** @type {?|undefined} */\n CompileProviderMetadata.prototype.multi;\n}\n/**\n * @record\n */\nexport function CompileFactoryMetadata() { }\nfunction CompileFactoryMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileFactoryMetadata.prototype.diDeps;\n /** @type {?} */\n CompileFactoryMetadata.prototype.reference;\n}\n/**\n * @param {?} token\n * @return {?}\n */\nexport function tokenName(token) {\n return token.value != null ? _sanitizeIdentifier(token.value) : identifierName(token.identifier);\n}\n/**\n * @param {?} token\n * @return {?}\n */\nexport function tokenReference(token) {\n if (token.identifier != null) {\n return token.identifier.reference;\n }\n else {\n return token.value;\n }\n}\n/**\n * @record\n */\nexport function CompileTokenMetadata() { }\nfunction CompileTokenMetadata_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n CompileTokenMetadata.prototype.value;\n /** @type {?|undefined} */\n CompileTokenMetadata.prototype.identifier;\n}\n/**\n * Metadata regarding compilation of a type.\n * @record\n */\nexport function CompileTypeMetadata() { }\nfunction CompileTypeMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileTypeMetadata.prototype.diDeps;\n /** @type {?} */\n CompileTypeMetadata.prototype.lifecycleHooks;\n /** @type {?} */\n CompileTypeMetadata.prototype.reference;\n}\n/**\n * @record\n */\nexport function CompileQueryMetadata() { }\nfunction CompileQueryMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileQueryMetadata.prototype.selectors;\n /** @type {?} */\n CompileQueryMetadata.prototype.descendants;\n /** @type {?} */\n CompileQueryMetadata.prototype.first;\n /** @type {?} */\n CompileQueryMetadata.prototype.propertyName;\n /** @type {?} */\n CompileQueryMetadata.prototype.read;\n}\n/**\n * Metadata about a stylesheet\n */\nvar /**\n * Metadata about a stylesheet\n */\nCompileStylesheetMetadata = /** @class */ (function () {\n function CompileStylesheetMetadata(_a) {\n var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls;\n this.moduleUrl = moduleUrl || null;\n this.styles = _normalizeArray(styles);\n this.styleUrls = _normalizeArray(styleUrls);\n }\n return CompileStylesheetMetadata;\n}());\n/**\n * Metadata about a stylesheet\n */\nexport { CompileStylesheetMetadata };\nfunction CompileStylesheetMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileStylesheetMetadata.prototype.moduleUrl;\n /** @type {?} */\n CompileStylesheetMetadata.prototype.styles;\n /** @type {?} */\n CompileStylesheetMetadata.prototype.styleUrls;\n}\n/**\n * Summary Metadata regarding compilation of a template.\n * @record\n */\nexport function CompileTemplateSummary() { }\nfunction CompileTemplateSummary_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileTemplateSummary.prototype.ngContentSelectors;\n /** @type {?} */\n CompileTemplateSummary.prototype.encapsulation;\n}\n/**\n * Metadata regarding compilation of a template.\n */\nvar /**\n * Metadata regarding compilation of a template.\n */\nCompileTemplateMetadata = /** @class */ (function () {\n function CompileTemplateMetadata(_a) {\n var encapsulation = _a.encapsulation, template = _a.template, templateUrl = _a.templateUrl, htmlAst = _a.htmlAst, styles = _a.styles, styleUrls = _a.styleUrls, externalStylesheets = _a.externalStylesheets, animations = _a.animations, ngContentSelectors = _a.ngContentSelectors, interpolation = _a.interpolation, isInline = _a.isInline, preserveWhitespaces = _a.preserveWhitespaces;\n this.encapsulation = encapsulation;\n this.template = template;\n this.templateUrl = templateUrl;\n this.htmlAst = htmlAst;\n this.styles = _normalizeArray(styles);\n this.styleUrls = _normalizeArray(styleUrls);\n this.externalStylesheets = _normalizeArray(externalStylesheets);\n this.animations = animations ? flatten(animations) : [];\n this.ngContentSelectors = ngContentSelectors || [];\n if (interpolation && interpolation.length != 2) {\n throw new Error(\"'interpolation' should have a start and an end symbol.\");\n }\n this.interpolation = interpolation;\n this.isInline = isInline;\n this.preserveWhitespaces = preserveWhitespaces;\n }\n /**\n * @return {?}\n */\n CompileTemplateMetadata.prototype.toSummary = /**\n * @return {?}\n */\n function () {\n return {\n ngContentSelectors: this.ngContentSelectors,\n encapsulation: this.encapsulation,\n };\n };\n return CompileTemplateMetadata;\n}());\n/**\n * Metadata regarding compilation of a template.\n */\nexport { CompileTemplateMetadata };\nfunction CompileTemplateMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileTemplateMetadata.prototype.encapsulation;\n /** @type {?} */\n CompileTemplateMetadata.prototype.template;\n /** @type {?} */\n CompileTemplateMetadata.prototype.templateUrl;\n /** @type {?} */\n CompileTemplateMetadata.prototype.htmlAst;\n /** @type {?} */\n CompileTemplateMetadata.prototype.isInline;\n /** @type {?} */\n CompileTemplateMetadata.prototype.styles;\n /** @type {?} */\n CompileTemplateMetadata.prototype.styleUrls;\n /** @type {?} */\n CompileTemplateMetadata.prototype.externalStylesheets;\n /** @type {?} */\n CompileTemplateMetadata.prototype.animations;\n /** @type {?} */\n CompileTemplateMetadata.prototype.ngContentSelectors;\n /** @type {?} */\n CompileTemplateMetadata.prototype.interpolation;\n /** @type {?} */\n CompileTemplateMetadata.prototype.preserveWhitespaces;\n}\n/**\n * @record\n */\nexport function CompileEntryComponentMetadata() { }\nfunction CompileEntryComponentMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileEntryComponentMetadata.prototype.componentType;\n /** @type {?} */\n CompileEntryComponentMetadata.prototype.componentFactory;\n}\n/**\n * @record\n */\nexport function CompileDirectiveSummary() { }\nfunction CompileDirectiveSummary_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileDirectiveSummary.prototype.type;\n /** @type {?} */\n CompileDirectiveSummary.prototype.isComponent;\n /** @type {?} */\n CompileDirectiveSummary.prototype.selector;\n /** @type {?} */\n CompileDirectiveSummary.prototype.exportAs;\n /** @type {?} */\n CompileDirectiveSummary.prototype.inputs;\n /** @type {?} */\n CompileDirectiveSummary.prototype.outputs;\n /** @type {?} */\n CompileDirectiveSummary.prototype.hostListeners;\n /** @type {?} */\n CompileDirectiveSummary.prototype.hostProperties;\n /** @type {?} */\n CompileDirectiveSummary.prototype.hostAttributes;\n /** @type {?} */\n CompileDirectiveSummary.prototype.providers;\n /** @type {?} */\n CompileDirectiveSummary.prototype.viewProviders;\n /** @type {?} */\n CompileDirectiveSummary.prototype.queries;\n /** @type {?} */\n CompileDirectiveSummary.prototype.guards;\n /** @type {?} */\n CompileDirectiveSummary.prototype.viewQueries;\n /** @type {?} */\n CompileDirectiveSummary.prototype.entryComponents;\n /** @type {?} */\n CompileDirectiveSummary.prototype.changeDetection;\n /** @type {?} */\n CompileDirectiveSummary.prototype.template;\n /** @type {?} */\n CompileDirectiveSummary.prototype.componentViewType;\n /** @type {?} */\n CompileDirectiveSummary.prototype.rendererType;\n /** @type {?} */\n CompileDirectiveSummary.prototype.componentFactory;\n}\n/**\n * Metadata regarding compilation of a directive.\n */\nvar /**\n * Metadata regarding compilation of a directive.\n */\nCompileDirectiveMetadata = /** @class */ (function () {\n function CompileDirectiveMetadata(_a) {\n var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;\n this.isHost = !!isHost;\n this.type = type;\n this.isComponent = isComponent;\n this.selector = selector;\n this.exportAs = exportAs;\n this.changeDetection = changeDetection;\n this.inputs = inputs;\n this.outputs = outputs;\n this.hostListeners = hostListeners;\n this.hostProperties = hostProperties;\n this.hostAttributes = hostAttributes;\n this.providers = _normalizeArray(providers);\n this.viewProviders = _normalizeArray(viewProviders);\n this.queries = _normalizeArray(queries);\n this.guards = guards;\n this.viewQueries = _normalizeArray(viewQueries);\n this.entryComponents = _normalizeArray(entryComponents);\n this.template = template;\n this.componentViewType = componentViewType;\n this.rendererType = rendererType;\n this.componentFactory = componentFactory;\n }\n /**\n * @param {?} __0\n * @return {?}\n */\n CompileDirectiveMetadata.create = /**\n * @param {?} __0\n * @return {?}\n */\n function (_a) {\n var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;\n var /** @type {?} */ hostListeners = {};\n var /** @type {?} */ hostProperties = {};\n var /** @type {?} */ hostAttributes = {};\n if (host != null) {\n Object.keys(host).forEach(function (key) {\n var /** @type {?} */ value = host[key];\n var /** @type {?} */ matches = key.match(HOST_REG_EXP);\n if (matches === null) {\n hostAttributes[key] = value;\n }\n else if (matches[1] != null) {\n hostProperties[matches[1]] = value;\n }\n else if (matches[2] != null) {\n hostListeners[matches[2]] = value;\n }\n });\n }\n var /** @type {?} */ inputsMap = {};\n if (inputs != null) {\n inputs.forEach(function (bindConfig) {\n // canonical syntax: `dirProp: elProp`\n // if there is no `:`, use dirProp = elProp\n var /** @type {?} */ parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n inputsMap[parts[0]] = parts[1];\n });\n }\n var /** @type {?} */ outputsMap = {};\n if (outputs != null) {\n outputs.forEach(function (bindConfig) {\n // canonical syntax: `dirProp: elProp`\n // if there is no `:`, use dirProp = elProp\n var /** @type {?} */ parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n outputsMap[parts[0]] = parts[1];\n });\n }\n return new CompileDirectiveMetadata({\n isHost: isHost,\n type: type,\n isComponent: !!isComponent, selector: selector, exportAs: exportAs, changeDetection: changeDetection,\n inputs: inputsMap,\n outputs: outputsMap,\n hostListeners: hostListeners,\n hostProperties: hostProperties,\n hostAttributes: hostAttributes,\n providers: providers,\n viewProviders: viewProviders,\n queries: queries,\n guards: guards,\n viewQueries: viewQueries,\n entryComponents: entryComponents,\n template: template,\n componentViewType: componentViewType,\n rendererType: rendererType,\n componentFactory: componentFactory,\n });\n };\n /**\n * @return {?}\n */\n CompileDirectiveMetadata.prototype.toSummary = /**\n * @return {?}\n */\n function () {\n return {\n summaryKind: CompileSummaryKind.Directive,\n type: this.type,\n isComponent: this.isComponent,\n selector: this.selector,\n exportAs: this.exportAs,\n inputs: this.inputs,\n outputs: this.outputs,\n hostListeners: this.hostListeners,\n hostProperties: this.hostProperties,\n hostAttributes: this.hostAttributes,\n providers: this.providers,\n viewProviders: this.viewProviders,\n queries: this.queries,\n guards: this.guards,\n viewQueries: this.viewQueries,\n entryComponents: this.entryComponents,\n changeDetection: this.changeDetection,\n template: this.template && this.template.toSummary(),\n componentViewType: this.componentViewType,\n rendererType: this.rendererType,\n componentFactory: this.componentFactory\n };\n };\n return CompileDirectiveMetadata;\n}());\n/**\n * Metadata regarding compilation of a directive.\n */\nexport { CompileDirectiveMetadata };\nfunction CompileDirectiveMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileDirectiveMetadata.prototype.isHost;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.type;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.isComponent;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.selector;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.exportAs;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.changeDetection;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.inputs;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.outputs;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.hostListeners;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.hostProperties;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.hostAttributes;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.providers;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.viewProviders;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.queries;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.guards;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.viewQueries;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.entryComponents;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.template;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.componentViewType;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.rendererType;\n /** @type {?} */\n CompileDirectiveMetadata.prototype.componentFactory;\n}\n/**\n * @record\n */\nexport function CompilePipeSummary() { }\nfunction CompilePipeSummary_tsickle_Closure_declarations() {\n /** @type {?} */\n CompilePipeSummary.prototype.type;\n /** @type {?} */\n CompilePipeSummary.prototype.name;\n /** @type {?} */\n CompilePipeSummary.prototype.pure;\n}\nvar CompilePipeMetadata = /** @class */ (function () {\n function CompilePipeMetadata(_a) {\n var type = _a.type, name = _a.name, pure = _a.pure;\n this.type = type;\n this.name = name;\n this.pure = !!pure;\n }\n /**\n * @return {?}\n */\n CompilePipeMetadata.prototype.toSummary = /**\n * @return {?}\n */\n function () {\n return {\n summaryKind: CompileSummaryKind.Pipe,\n type: this.type,\n name: this.name,\n pure: this.pure\n };\n };\n return CompilePipeMetadata;\n}());\nexport { CompilePipeMetadata };\nfunction CompilePipeMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompilePipeMetadata.prototype.type;\n /** @type {?} */\n CompilePipeMetadata.prototype.name;\n /** @type {?} */\n CompilePipeMetadata.prototype.pure;\n}\n/**\n * @record\n */\nexport function CompileNgModuleSummary() { }\nfunction CompileNgModuleSummary_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileNgModuleSummary.prototype.type;\n /** @type {?} */\n CompileNgModuleSummary.prototype.exportedDirectives;\n /** @type {?} */\n CompileNgModuleSummary.prototype.exportedPipes;\n /** @type {?} */\n CompileNgModuleSummary.prototype.entryComponents;\n /** @type {?} */\n CompileNgModuleSummary.prototype.providers;\n /** @type {?} */\n CompileNgModuleSummary.prototype.modules;\n}\n/**\n * Metadata regarding compilation of a module.\n */\nvar /**\n * Metadata regarding compilation of a module.\n */\nCompileNgModuleMetadata = /** @class */ (function () {\n function CompileNgModuleMetadata(_a) {\n var type = _a.type, providers = _a.providers, declaredDirectives = _a.declaredDirectives, exportedDirectives = _a.exportedDirectives, declaredPipes = _a.declaredPipes, exportedPipes = _a.exportedPipes, entryComponents = _a.entryComponents, bootstrapComponents = _a.bootstrapComponents, importedModules = _a.importedModules, exportedModules = _a.exportedModules, schemas = _a.schemas, transitiveModule = _a.transitiveModule, id = _a.id;\n this.type = type || null;\n this.declaredDirectives = _normalizeArray(declaredDirectives);\n this.exportedDirectives = _normalizeArray(exportedDirectives);\n this.declaredPipes = _normalizeArray(declaredPipes);\n this.exportedPipes = _normalizeArray(exportedPipes);\n this.providers = _normalizeArray(providers);\n this.entryComponents = _normalizeArray(entryComponents);\n this.bootstrapComponents = _normalizeArray(bootstrapComponents);\n this.importedModules = _normalizeArray(importedModules);\n this.exportedModules = _normalizeArray(exportedModules);\n this.schemas = _normalizeArray(schemas);\n this.id = id || null;\n this.transitiveModule = transitiveModule || null;\n }\n /**\n * @return {?}\n */\n CompileNgModuleMetadata.prototype.toSummary = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ module = /** @type {?} */ ((this.transitiveModule));\n return {\n summaryKind: CompileSummaryKind.NgModule,\n type: this.type,\n entryComponents: module.entryComponents,\n providers: module.providers,\n modules: module.modules,\n exportedDirectives: module.exportedDirectives,\n exportedPipes: module.exportedPipes\n };\n };\n return CompileNgModuleMetadata;\n}());\n/**\n * Metadata regarding compilation of a module.\n */\nexport { CompileNgModuleMetadata };\nfunction CompileNgModuleMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileNgModuleMetadata.prototype.type;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.declaredDirectives;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.exportedDirectives;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.declaredPipes;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.exportedPipes;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.entryComponents;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.bootstrapComponents;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.providers;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.importedModules;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.exportedModules;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.schemas;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.id;\n /** @type {?} */\n CompileNgModuleMetadata.prototype.transitiveModule;\n}\nvar TransitiveCompileNgModuleMetadata = /** @class */ (function () {\n function TransitiveCompileNgModuleMetadata() {\n this.directivesSet = new Set();\n this.directives = [];\n this.exportedDirectivesSet = new Set();\n this.exportedDirectives = [];\n this.pipesSet = new Set();\n this.pipes = [];\n this.exportedPipesSet = new Set();\n this.exportedPipes = [];\n this.modulesSet = new Set();\n this.modules = [];\n this.entryComponentsSet = new Set();\n this.entryComponents = [];\n this.providers = [];\n }\n /**\n * @param {?} provider\n * @param {?} module\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addProvider = /**\n * @param {?} provider\n * @param {?} module\n * @return {?}\n */\n function (provider, module) {\n this.providers.push({ provider: provider, module: module });\n };\n /**\n * @param {?} id\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addDirective = /**\n * @param {?} id\n * @return {?}\n */\n function (id) {\n if (!this.directivesSet.has(id.reference)) {\n this.directivesSet.add(id.reference);\n this.directives.push(id);\n }\n };\n /**\n * @param {?} id\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addExportedDirective = /**\n * @param {?} id\n * @return {?}\n */\n function (id) {\n if (!this.exportedDirectivesSet.has(id.reference)) {\n this.exportedDirectivesSet.add(id.reference);\n this.exportedDirectives.push(id);\n }\n };\n /**\n * @param {?} id\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addPipe = /**\n * @param {?} id\n * @return {?}\n */\n function (id) {\n if (!this.pipesSet.has(id.reference)) {\n this.pipesSet.add(id.reference);\n this.pipes.push(id);\n }\n };\n /**\n * @param {?} id\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addExportedPipe = /**\n * @param {?} id\n * @return {?}\n */\n function (id) {\n if (!this.exportedPipesSet.has(id.reference)) {\n this.exportedPipesSet.add(id.reference);\n this.exportedPipes.push(id);\n }\n };\n /**\n * @param {?} id\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addModule = /**\n * @param {?} id\n * @return {?}\n */\n function (id) {\n if (!this.modulesSet.has(id.reference)) {\n this.modulesSet.add(id.reference);\n this.modules.push(id);\n }\n };\n /**\n * @param {?} ec\n * @return {?}\n */\n TransitiveCompileNgModuleMetadata.prototype.addEntryComponent = /**\n * @param {?} ec\n * @return {?}\n */\n function (ec) {\n if (!this.entryComponentsSet.has(ec.componentType)) {\n this.entryComponentsSet.add(ec.componentType);\n this.entryComponents.push(ec);\n }\n };\n return TransitiveCompileNgModuleMetadata;\n}());\nexport { TransitiveCompileNgModuleMetadata };\nfunction TransitiveCompileNgModuleMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.directivesSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.directives;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.exportedDirectivesSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.exportedDirectives;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.pipesSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.pipes;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.exportedPipesSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.exportedPipes;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.modulesSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.modules;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.entryComponentsSet;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.entryComponents;\n /** @type {?} */\n TransitiveCompileNgModuleMetadata.prototype.providers;\n}\n/**\n * @param {?} obj\n * @return {?}\n */\nfunction _normalizeArray(obj) {\n return obj || [];\n}\nvar ProviderMeta = /** @class */ (function () {\n function ProviderMeta(token, _a) {\n var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;\n this.token = token;\n this.useClass = useClass || null;\n this.useValue = useValue;\n this.useExisting = useExisting;\n this.useFactory = useFactory || null;\n this.dependencies = deps || null;\n this.multi = !!multi;\n }\n return ProviderMeta;\n}());\nexport { ProviderMeta };\nfunction ProviderMeta_tsickle_Closure_declarations() {\n /** @type {?} */\n ProviderMeta.prototype.token;\n /** @type {?} */\n ProviderMeta.prototype.useClass;\n /** @type {?} */\n ProviderMeta.prototype.useValue;\n /** @type {?} */\n ProviderMeta.prototype.useExisting;\n /** @type {?} */\n ProviderMeta.prototype.useFactory;\n /** @type {?} */\n ProviderMeta.prototype.dependencies;\n /** @type {?} */\n ProviderMeta.prototype.multi;\n}\n/**\n * @template T\n * @param {?} list\n * @return {?}\n */\nexport function flatten(list) {\n return list.reduce(function (flat, item) {\n var /** @type {?} */ flatItem = Array.isArray(item) ? flatten(item) : item;\n return (/** @type {?} */ (flat)).concat(flatItem);\n }, []);\n}\n/**\n * @param {?} url\n * @return {?}\n */\nfunction jitSourceUrl(url) {\n // Note: We need 3 \"/\" so that ng shows up as a separate domain\n // in the chrome dev tools.\n return url.replace(/(\\w+:\\/\\/[\\w:-]+)?(\\/+)?/, 'ng:///');\n}\n/**\n * @param {?} ngModuleType\n * @param {?} compMeta\n * @param {?} templateMeta\n * @return {?}\n */\nexport function templateSourceUrl(ngModuleType, compMeta, templateMeta) {\n var /** @type {?} */ url;\n if (templateMeta.isInline) {\n if (compMeta.type.reference instanceof StaticSymbol) {\n // Note: a .ts file might contain multiple components with inline templates,\n // so we need to give them unique urls, as these will be used for sourcemaps.\n url = compMeta.type.reference.filePath + \".\" + compMeta.type.reference.name + \".html\";\n }\n else {\n url = identifierName(ngModuleType) + \"/\" + identifierName(compMeta.type) + \".html\";\n }\n }\n else {\n url = /** @type {?} */ ((templateMeta.templateUrl));\n }\n return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);\n}\n/**\n * @param {?} meta\n * @param {?} id\n * @return {?}\n */\nexport function sharedStylesheetJitUrl(meta, id) {\n var /** @type {?} */ pathParts = /** @type {?} */ ((meta.moduleUrl)).split(/\\/\\\\/g);\n var /** @type {?} */ baseName = pathParts[pathParts.length - 1];\n return jitSourceUrl(\"css/\" + id + baseName + \".ngstyle.js\");\n}\n/**\n * @param {?} moduleMeta\n * @return {?}\n */\nexport function ngModuleJitUrl(moduleMeta) {\n return jitSourceUrl(identifierName(moduleMeta.type) + \"/module.ngfactory.js\");\n}\n/**\n * @param {?} ngModuleType\n * @param {?} compMeta\n * @return {?}\n */\nexport function templateJitUrl(ngModuleType, compMeta) {\n return jitSourceUrl(identifierName(ngModuleType) + \"/\" + identifierName(compMeta.type) + \".ngfactory.js\");\n}\n//# sourceMappingURL=compile_metadata.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A path is an ordered set of elements. Typically a path is to a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expresion `a + b + c` might have an ast that looks\n * like:\n * +\n * / \\\n * a +\n * / \\\n * b c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n * @template T\n */\nvar /**\n * A path is an ordered set of elements. Typically a path is to a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expresion `a + b + c` might have an ast that looks\n * like:\n * +\n * / \\\n * a +\n * / \\\n * b c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n * @template T\n */\nAstPath = /** @class */ (function () {\n function AstPath(path, position) {\n if (position === void 0) { position = -1; }\n this.path = path;\n this.position = position;\n }\n Object.defineProperty(AstPath.prototype, \"empty\", {\n get: /**\n * @return {?}\n */\n function () { return !this.path || !this.path.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"head\", {\n get: /**\n * @return {?}\n */\n function () { return this.path[0]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"tail\", {\n get: /**\n * @return {?}\n */\n function () { return this.path[this.path.length - 1]; },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {?} node\n * @return {?}\n */\n AstPath.prototype.parentOf = /**\n * @param {?} node\n * @return {?}\n */\n function (node) {\n return node && this.path[this.path.indexOf(node) - 1];\n };\n /**\n * @param {?} node\n * @return {?}\n */\n AstPath.prototype.childOf = /**\n * @param {?} node\n * @return {?}\n */\n function (node) { return this.path[this.path.indexOf(node) + 1]; };\n /**\n * @template N\n * @param {?} ctor\n * @return {?}\n */\n AstPath.prototype.first = /**\n * @template N\n * @param {?} ctor\n * @return {?}\n */\n function (ctor) {\n for (var /** @type {?} */ i = this.path.length - 1; i >= 0; i--) {\n var /** @type {?} */ item = this.path[i];\n if (item instanceof ctor)\n return /** @type {?} */ (item);\n }\n };\n /**\n * @param {?} node\n * @return {?}\n */\n AstPath.prototype.push = /**\n * @param {?} node\n * @return {?}\n */\n function (node) { this.path.push(node); };\n /**\n * @return {?}\n */\n AstPath.prototype.pop = /**\n * @return {?}\n */\n function () { return /** @type {?} */ ((this.path.pop())); };\n return AstPath;\n}());\n/**\n * A path is an ordered set of elements. Typically a path is to a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expresion `a + b + c` might have an ast that looks\n * like:\n * +\n * / \\\n * a +\n * / \\\n * b c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n * @template T\n */\nexport { AstPath };\nfunction AstPath_tsickle_Closure_declarations() {\n /** @type {?} */\n AstPath.prototype.path;\n /** @type {?} */\n AstPath.prototype.position;\n}\n//# sourceMappingURL=ast_path.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { AstPath } from '../ast_path';\n/**\n * @record\n */\nexport function Node() { }\nfunction Node_tsickle_Closure_declarations() {\n /** @type {?} */\n Node.prototype.sourceSpan;\n /** @type {?} */\n Node.prototype.visit;\n}\nvar Text = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Text.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitText(this, context); };\n return Text;\n}());\nexport { Text };\nfunction Text_tsickle_Closure_declarations() {\n /** @type {?} */\n Text.prototype.value;\n /** @type {?} */\n Text.prototype.sourceSpan;\n}\nvar Expansion = /** @class */ (function () {\n function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan) {\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n this.switchValueSourceSpan = switchValueSourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Expansion.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitExpansion(this, context); };\n return Expansion;\n}());\nexport { Expansion };\nfunction Expansion_tsickle_Closure_declarations() {\n /** @type {?} */\n Expansion.prototype.switchValue;\n /** @type {?} */\n Expansion.prototype.type;\n /** @type {?} */\n Expansion.prototype.cases;\n /** @type {?} */\n Expansion.prototype.sourceSpan;\n /** @type {?} */\n Expansion.prototype.switchValueSourceSpan;\n}\nvar ExpansionCase = /** @class */ (function () {\n function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {\n this.value = value;\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n this.valueSourceSpan = valueSourceSpan;\n this.expSourceSpan = expSourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ExpansionCase.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitExpansionCase(this, context); };\n return ExpansionCase;\n}());\nexport { ExpansionCase };\nfunction ExpansionCase_tsickle_Closure_declarations() {\n /** @type {?} */\n ExpansionCase.prototype.value;\n /** @type {?} */\n ExpansionCase.prototype.expression;\n /** @type {?} */\n ExpansionCase.prototype.sourceSpan;\n /** @type {?} */\n ExpansionCase.prototype.valueSourceSpan;\n /** @type {?} */\n ExpansionCase.prototype.expSourceSpan;\n}\nvar Attribute = /** @class */ (function () {\n function Attribute(name, value, sourceSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.valueSpan = valueSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Attribute.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitAttribute(this, context); };\n return Attribute;\n}());\nexport { Attribute };\nfunction Attribute_tsickle_Closure_declarations() {\n /** @type {?} */\n Attribute.prototype.name;\n /** @type {?} */\n Attribute.prototype.value;\n /** @type {?} */\n Attribute.prototype.sourceSpan;\n /** @type {?} */\n Attribute.prototype.valueSpan;\n}\nvar Element = /** @class */ (function () {\n function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan) {\n if (startSourceSpan === void 0) { startSourceSpan = null; }\n if (endSourceSpan === void 0) { endSourceSpan = null; }\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Element.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitElement(this, context); };\n return Element;\n}());\nexport { Element };\nfunction Element_tsickle_Closure_declarations() {\n /** @type {?} */\n Element.prototype.name;\n /** @type {?} */\n Element.prototype.attrs;\n /** @type {?} */\n Element.prototype.children;\n /** @type {?} */\n Element.prototype.sourceSpan;\n /** @type {?} */\n Element.prototype.startSourceSpan;\n /** @type {?} */\n Element.prototype.endSourceSpan;\n}\nvar Comment = /** @class */ (function () {\n function Comment(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Comment.prototype.visit = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitComment(this, context); };\n return Comment;\n}());\nexport { Comment };\nfunction Comment_tsickle_Closure_declarations() {\n /** @type {?} */\n Comment.prototype.value;\n /** @type {?} */\n Comment.prototype.sourceSpan;\n}\n/**\n * @record\n */\nexport function Visitor() { }\nfunction Visitor_tsickle_Closure_declarations() {\n /** @type {?|undefined} */\n Visitor.prototype.visit;\n /** @type {?} */\n Visitor.prototype.visitElement;\n /** @type {?} */\n Visitor.prototype.visitAttribute;\n /** @type {?} */\n Visitor.prototype.visitText;\n /** @type {?} */\n Visitor.prototype.visitComment;\n /** @type {?} */\n Visitor.prototype.visitExpansion;\n /** @type {?} */\n Visitor.prototype.visitExpansionCase;\n}\n/**\n * @param {?} visitor\n * @param {?} nodes\n * @param {?=} context\n * @return {?}\n */\nexport function visitAll(visitor, nodes, context) {\n if (context === void 0) { context = null; }\n var /** @type {?} */ result = [];\n var /** @type {?} */ visit = visitor.visit ?\n function (ast) { return ((visitor.visit))(ast, context) || ast.visit(visitor, context); } :\n function (ast) { return ast.visit(visitor, context); };\n nodes.forEach(function (ast) {\n var /** @type {?} */ astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nvar RecursiveVisitor = /** @class */ (function () {\n function RecursiveVisitor() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitElement = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.children);\n });\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitAttribute = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitText = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitComment = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitExpansion = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitChildren(context, function (visit) { visit(ast.cases); });\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveVisitor.prototype.visitExpansionCase = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @template T\n * @param {?} context\n * @param {?} cb\n * @return {?}\n */\n RecursiveVisitor.prototype.visitChildren = /**\n * @template T\n * @param {?} context\n * @param {?} cb\n * @return {?}\n */\n function (context, cb) {\n var /** @type {?} */ results = [];\n var /** @type {?} */ t = this;\n /**\n * @template T\n * @param {?} children\n * @return {?}\n */\n function visit(children) {\n if (children)\n results.push(visitAll(t, children, context));\n }\n cb(visit);\n return [].concat.apply([], results);\n };\n return RecursiveVisitor;\n}());\nexport { RecursiveVisitor };\n/**\n * @param {?} ast\n * @return {?}\n */\nfunction spanOf(ast) {\n var /** @type {?} */ start = ast.sourceSpan.start.offset;\n var /** @type {?} */ end = ast.sourceSpan.end.offset;\n if (ast instanceof Element) {\n if (ast.endSourceSpan) {\n end = ast.endSourceSpan.end.offset;\n }\n else if (ast.children && ast.children.length) {\n end = spanOf(ast.children[ast.children.length - 1]).end;\n }\n }\n return { start: start, end: end };\n}\n/**\n * @param {?} nodes\n * @param {?} position\n * @return {?}\n */\nexport function findNode(nodes, position) {\n var /** @type {?} */ path = [];\n var /** @type {?} */ visitor = new /** @class */ (function (_super) {\n tslib_1.__extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n class_1.prototype.visit = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var /** @type {?} */ span = spanOf(ast);\n if (span.start <= position && position < span.end) {\n path.push(ast);\n }\n else {\n // Returning a value here will result in the children being skipped.\n return true;\n }\n };\n return class_1;\n }(RecursiveVisitor));\n visitAll(visitor, nodes);\n return new AstPath(path, position);\n}\n//# sourceMappingURL=ast.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @param {?} identifier\n * @param {?} value\n * @return {?}\n */\nexport function assertArrayOfStrings(identifier, value) {\n if (value == null) {\n return;\n }\n if (!Array.isArray(value)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n for (var /** @type {?} */ i = 0; i < value.length; i += 1) {\n if (typeof value[i] !== 'string') {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n }\n}\nvar /** @type {?} */ INTERPOLATION_BLACKLIST_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//,\n];\n/**\n * @param {?} identifier\n * @param {?} value\n * @return {?}\n */\nexport function assertInterpolationSymbols(identifier, value) {\n if (value != null && !(Array.isArray(value) && value.length == 2)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array, [start, end].\");\n }\n else if (value != null) {\n var /** @type {?} */ start_1 = /** @type {?} */ (value[0]);\n var /** @type {?} */ end_1 = /** @type {?} */ (value[1]);\n // black list checking\n INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {\n if (regexp.test(start_1) || regexp.test(end_1)) {\n throw new Error(\"['\" + start_1 + \"', '\" + end_1 + \"'] contains unusable interpolation symbol.\");\n }\n });\n }\n}\n//# sourceMappingURL=assertions.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { assertInterpolationSymbols } from '../assertions';\nvar InterpolationConfig = /** @class */ (function () {\n function InterpolationConfig(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * @param {?} markers\n * @return {?}\n */\n InterpolationConfig.fromArray = /**\n * @param {?} markers\n * @return {?}\n */\n function (markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n };\n return InterpolationConfig;\n}());\nexport { InterpolationConfig };\nfunction InterpolationConfig_tsickle_Closure_declarations() {\n /** @type {?} */\n InterpolationConfig.prototype.start;\n /** @type {?} */\n InterpolationConfig.prototype.end;\n}\nexport var /** @type {?} */ DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\n//# sourceMappingURL=interpolation_config.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar StyleWithImports = /** @class */ (function () {\n function StyleWithImports(style, styleUrls) {\n this.style = style;\n this.styleUrls = styleUrls;\n }\n return StyleWithImports;\n}());\nexport { StyleWithImports };\nfunction StyleWithImports_tsickle_Closure_declarations() {\n /** @type {?} */\n StyleWithImports.prototype.style;\n /** @type {?} */\n StyleWithImports.prototype.styleUrls;\n}\n/**\n * @param {?} url\n * @return {?}\n */\nexport function isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/')\n return false;\n var /** @type {?} */ schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\n/**\n * Rewrites stylesheets by resolving and removing the \\@import urls that\n * are either relative or don't have a `package:` scheme\n * @param {?} resolver\n * @param {?} baseUrl\n * @param {?} cssText\n * @return {?}\n */\nexport function extractStyleUrls(resolver, baseUrl, cssText) {\n var /** @type {?} */ foundUrls = [];\n var /** @type {?} */ modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '')\n .replace(CSS_IMPORT_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var /** @type {?} */ url = m[1] || m[2];\n if (!isStyleUrlResolvable(url)) {\n // Do not attempt to resolve non-package absolute URLs with URI\n // scheme\n return m[0];\n }\n foundUrls.push(resolver.resolve(baseUrl, url));\n return '';\n });\n return new StyleWithImports(modifiedCssText, foundUrls);\n}\nvar /** @type {?} */ CSS_IMPORT_REGEXP = /@import\\s+(?:url\\()?\\s*(?:(?:['\"]([^'\"]*))|([^;\\)\\s]*))[^;]*;?/g;\nvar /** @type {?} */ CSS_STRIPPABLE_COMMENT_REGEXP = /\\/\\*(?!#\\s*(?:sourceURL|sourceMappingURL)=)[\\s\\S]+?\\*\\//g;\nvar /** @type {?} */ URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n//# sourceMappingURL=style_url_resolver.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @enum {number} */\nvar TagContentType = {\n RAW_TEXT: 0,\n ESCAPABLE_RAW_TEXT: 1,\n PARSABLE_DATA: 2,\n};\nexport { TagContentType };\nTagContentType[TagContentType.RAW_TEXT] = \"RAW_TEXT\";\nTagContentType[TagContentType.ESCAPABLE_RAW_TEXT] = \"ESCAPABLE_RAW_TEXT\";\nTagContentType[TagContentType.PARSABLE_DATA] = \"PARSABLE_DATA\";\n/**\n * @record\n */\nexport function TagDefinition() { }\nfunction TagDefinition_tsickle_Closure_declarations() {\n /** @type {?} */\n TagDefinition.prototype.closedByParent;\n /** @type {?} */\n TagDefinition.prototype.requiredParents;\n /** @type {?} */\n TagDefinition.prototype.parentToAdd;\n /** @type {?} */\n TagDefinition.prototype.implicitNamespacePrefix;\n /** @type {?} */\n TagDefinition.prototype.contentType;\n /** @type {?} */\n TagDefinition.prototype.isVoid;\n /** @type {?} */\n TagDefinition.prototype.ignoreFirstLf;\n /** @type {?} */\n TagDefinition.prototype.canSelfClose;\n /** @type {?} */\n TagDefinition.prototype.requireExtraParent;\n /** @type {?} */\n TagDefinition.prototype.isClosedByChild;\n}\n/**\n * @param {?} elementName\n * @return {?}\n */\nexport function splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n var /** @type {?} */ colonIndex = elementName.indexOf(':', 1);\n if (colonIndex == -1) {\n throw new Error(\"Unsupported format \\\"\" + elementName + \"\\\" expecting \\\":namespace:name\\\"\");\n }\n return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n/**\n * @param {?} tagName\n * @return {?}\n */\nexport function isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n/**\n * @param {?} tagName\n * @return {?}\n */\nexport function isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n/**\n * @param {?} tagName\n * @return {?}\n */\nexport function isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\n/**\n * @param {?} fullName\n * @return {?}\n */\nexport function getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\n/**\n * @param {?} prefix\n * @param {?} localName\n * @return {?}\n */\nexport function mergeNsAndName(prefix, localName) {\n return prefix ? \":\" + prefix + \":\" + localName : localName;\n}\n// see http://www.w3.org/TR/html51/syntax.html#named-character-references\n// see https://html.spec.whatwg.org/multipage/entities.json\n// This list is not exhaustive to keep the compiler footprint low.\n// The `{` / `ƫ` syntax should be used when the named character reference does not\n// exist.\nexport var /** @type {?} */ NAMED_ENTITIES = {\n 'Aacute': '\\u00C1',\n 'aacute': '\\u00E1',\n 'Acirc': '\\u00C2',\n 'acirc': '\\u00E2',\n 'acute': '\\u00B4',\n 'AElig': '\\u00C6',\n 'aelig': '\\u00E6',\n 'Agrave': '\\u00C0',\n 'agrave': '\\u00E0',\n 'alefsym': '\\u2135',\n 'Alpha': '\\u0391',\n 'alpha': '\\u03B1',\n 'amp': '&',\n 'and': '\\u2227',\n 'ang': '\\u2220',\n 'apos': '\\u0027',\n 'Aring': '\\u00C5',\n 'aring': '\\u00E5',\n 'asymp': '\\u2248',\n 'Atilde': '\\u00C3',\n 'atilde': '\\u00E3',\n 'Auml': '\\u00C4',\n 'auml': '\\u00E4',\n 'bdquo': '\\u201E',\n 'Beta': '\\u0392',\n 'beta': '\\u03B2',\n 'brvbar': '\\u00A6',\n 'bull': '\\u2022',\n 'cap': '\\u2229',\n 'Ccedil': '\\u00C7',\n 'ccedil': '\\u00E7',\n 'cedil': '\\u00B8',\n 'cent': '\\u00A2',\n 'Chi': '\\u03A7',\n 'chi': '\\u03C7',\n 'circ': '\\u02C6',\n 'clubs': '\\u2663',\n 'cong': '\\u2245',\n 'copy': '\\u00A9',\n 'crarr': '\\u21B5',\n 'cup': '\\u222A',\n 'curren': '\\u00A4',\n 'dagger': '\\u2020',\n 'Dagger': '\\u2021',\n 'darr': '\\u2193',\n 'dArr': '\\u21D3',\n 'deg': '\\u00B0',\n 'Delta': '\\u0394',\n 'delta': '\\u03B4',\n 'diams': '\\u2666',\n 'divide': '\\u00F7',\n 'Eacute': '\\u00C9',\n 'eacute': '\\u00E9',\n 'Ecirc': '\\u00CA',\n 'ecirc': '\\u00EA',\n 'Egrave': '\\u00C8',\n 'egrave': '\\u00E8',\n 'empty': '\\u2205',\n 'emsp': '\\u2003',\n 'ensp': '\\u2002',\n 'Epsilon': '\\u0395',\n 'epsilon': '\\u03B5',\n 'equiv': '\\u2261',\n 'Eta': '\\u0397',\n 'eta': '\\u03B7',\n 'ETH': '\\u00D0',\n 'eth': '\\u00F0',\n 'Euml': '\\u00CB',\n 'euml': '\\u00EB',\n 'euro': '\\u20AC',\n 'exist': '\\u2203',\n 'fnof': '\\u0192',\n 'forall': '\\u2200',\n 'frac12': '\\u00BD',\n 'frac14': '\\u00BC',\n 'frac34': '\\u00BE',\n 'frasl': '\\u2044',\n 'Gamma': '\\u0393',\n 'gamma': '\\u03B3',\n 'ge': '\\u2265',\n 'gt': '>',\n 'harr': '\\u2194',\n 'hArr': '\\u21D4',\n 'hearts': '\\u2665',\n 'hellip': '\\u2026',\n 'Iacute': '\\u00CD',\n 'iacute': '\\u00ED',\n 'Icirc': '\\u00CE',\n 'icirc': '\\u00EE',\n 'iexcl': '\\u00A1',\n 'Igrave': '\\u00CC',\n 'igrave': '\\u00EC',\n 'image': '\\u2111',\n 'infin': '\\u221E',\n 'int': '\\u222B',\n 'Iota': '\\u0399',\n 'iota': '\\u03B9',\n 'iquest': '\\u00BF',\n 'isin': '\\u2208',\n 'Iuml': '\\u00CF',\n 'iuml': '\\u00EF',\n 'Kappa': '\\u039A',\n 'kappa': '\\u03BA',\n 'Lambda': '\\u039B',\n 'lambda': '\\u03BB',\n 'lang': '\\u27E8',\n 'laquo': '\\u00AB',\n 'larr': '\\u2190',\n 'lArr': '\\u21D0',\n 'lceil': '\\u2308',\n 'ldquo': '\\u201C',\n 'le': '\\u2264',\n 'lfloor': '\\u230A',\n 'lowast': '\\u2217',\n 'loz': '\\u25CA',\n 'lrm': '\\u200E',\n 'lsaquo': '\\u2039',\n 'lsquo': '\\u2018',\n 'lt': '<',\n 'macr': '\\u00AF',\n 'mdash': '\\u2014',\n 'micro': '\\u00B5',\n 'middot': '\\u00B7',\n 'minus': '\\u2212',\n 'Mu': '\\u039C',\n 'mu': '\\u03BC',\n 'nabla': '\\u2207',\n 'nbsp': '\\u00A0',\n 'ndash': '\\u2013',\n 'ne': '\\u2260',\n 'ni': '\\u220B',\n 'not': '\\u00AC',\n 'notin': '\\u2209',\n 'nsub': '\\u2284',\n 'Ntilde': '\\u00D1',\n 'ntilde': '\\u00F1',\n 'Nu': '\\u039D',\n 'nu': '\\u03BD',\n 'Oacute': '\\u00D3',\n 'oacute': '\\u00F3',\n 'Ocirc': '\\u00D4',\n 'ocirc': '\\u00F4',\n 'OElig': '\\u0152',\n 'oelig': '\\u0153',\n 'Ograve': '\\u00D2',\n 'ograve': '\\u00F2',\n 'oline': '\\u203E',\n 'Omega': '\\u03A9',\n 'omega': '\\u03C9',\n 'Omicron': '\\u039F',\n 'omicron': '\\u03BF',\n 'oplus': '\\u2295',\n 'or': '\\u2228',\n 'ordf': '\\u00AA',\n 'ordm': '\\u00BA',\n 'Oslash': '\\u00D8',\n 'oslash': '\\u00F8',\n 'Otilde': '\\u00D5',\n 'otilde': '\\u00F5',\n 'otimes': '\\u2297',\n 'Ouml': '\\u00D6',\n 'ouml': '\\u00F6',\n 'para': '\\u00B6',\n 'permil': '\\u2030',\n 'perp': '\\u22A5',\n 'Phi': '\\u03A6',\n 'phi': '\\u03C6',\n 'Pi': '\\u03A0',\n 'pi': '\\u03C0',\n 'piv': '\\u03D6',\n 'plusmn': '\\u00B1',\n 'pound': '\\u00A3',\n 'prime': '\\u2032',\n 'Prime': '\\u2033',\n 'prod': '\\u220F',\n 'prop': '\\u221D',\n 'Psi': '\\u03A8',\n 'psi': '\\u03C8',\n 'quot': '\\u0022',\n 'radic': '\\u221A',\n 'rang': '\\u27E9',\n 'raquo': '\\u00BB',\n 'rarr': '\\u2192',\n 'rArr': '\\u21D2',\n 'rceil': '\\u2309',\n 'rdquo': '\\u201D',\n 'real': '\\u211C',\n 'reg': '\\u00AE',\n 'rfloor': '\\u230B',\n 'Rho': '\\u03A1',\n 'rho': '\\u03C1',\n 'rlm': '\\u200F',\n 'rsaquo': '\\u203A',\n 'rsquo': '\\u2019',\n 'sbquo': '\\u201A',\n 'Scaron': '\\u0160',\n 'scaron': '\\u0161',\n 'sdot': '\\u22C5',\n 'sect': '\\u00A7',\n 'shy': '\\u00AD',\n 'Sigma': '\\u03A3',\n 'sigma': '\\u03C3',\n 'sigmaf': '\\u03C2',\n 'sim': '\\u223C',\n 'spades': '\\u2660',\n 'sub': '\\u2282',\n 'sube': '\\u2286',\n 'sum': '\\u2211',\n 'sup': '\\u2283',\n 'sup1': '\\u00B9',\n 'sup2': '\\u00B2',\n 'sup3': '\\u00B3',\n 'supe': '\\u2287',\n 'szlig': '\\u00DF',\n 'Tau': '\\u03A4',\n 'tau': '\\u03C4',\n 'there4': '\\u2234',\n 'Theta': '\\u0398',\n 'theta': '\\u03B8',\n 'thetasym': '\\u03D1',\n 'thinsp': '\\u2009',\n 'THORN': '\\u00DE',\n 'thorn': '\\u00FE',\n 'tilde': '\\u02DC',\n 'times': '\\u00D7',\n 'trade': '\\u2122',\n 'Uacute': '\\u00DA',\n 'uacute': '\\u00FA',\n 'uarr': '\\u2191',\n 'uArr': '\\u21D1',\n 'Ucirc': '\\u00DB',\n 'ucirc': '\\u00FB',\n 'Ugrave': '\\u00D9',\n 'ugrave': '\\u00F9',\n 'uml': '\\u00A8',\n 'upsih': '\\u03D2',\n 'Upsilon': '\\u03A5',\n 'upsilon': '\\u03C5',\n 'Uuml': '\\u00DC',\n 'uuml': '\\u00FC',\n 'weierp': '\\u2118',\n 'Xi': '\\u039E',\n 'xi': '\\u03BE',\n 'Yacute': '\\u00DD',\n 'yacute': '\\u00FD',\n 'yen': '\\u00A5',\n 'yuml': '\\u00FF',\n 'Yuml': '\\u0178',\n 'Zeta': '\\u0396',\n 'zeta': '\\u03B6',\n 'zwj': '\\u200D',\n 'zwnj': '\\u200C',\n};\n// The &ngsp; pseudo-entity is denoting a space. see:\n// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart\nexport var /** @type {?} */ NGSP_UNICODE = '\\uE500';\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n//# sourceMappingURL=tags.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { isNgContent } from '../ml_parser/tags';\nvar /** @type {?} */ NG_CONTENT_SELECT_ATTR = 'select';\nvar /** @type {?} */ LINK_ELEMENT = 'link';\nvar /** @type {?} */ LINK_STYLE_REL_ATTR = 'rel';\nvar /** @type {?} */ LINK_STYLE_HREF_ATTR = 'href';\nvar /** @type {?} */ LINK_STYLE_REL_VALUE = 'stylesheet';\nvar /** @type {?} */ STYLE_ELEMENT = 'style';\nvar /** @type {?} */ SCRIPT_ELEMENT = 'script';\nvar /** @type {?} */ NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nvar /** @type {?} */ NG_PROJECT_AS = 'ngProjectAs';\n/**\n * @param {?} ast\n * @return {?}\n */\nexport function preparseElement(ast) {\n var /** @type {?} */ selectAttr = /** @type {?} */ ((null));\n var /** @type {?} */ hrefAttr = /** @type {?} */ ((null));\n var /** @type {?} */ relAttr = /** @type {?} */ ((null));\n var /** @type {?} */ nonBindable = false;\n var /** @type {?} */ projectAs = /** @type {?} */ ((null));\n ast.attrs.forEach(function (attr) {\n var /** @type {?} */ lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR) {\n selectAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n hrefAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n relAttr = attr.value;\n }\n else if (attr.name == NG_NON_BINDABLE_ATTR) {\n nonBindable = true;\n }\n else if (attr.name == NG_PROJECT_AS) {\n if (attr.value.length > 0) {\n projectAs = attr.value;\n }\n }\n });\n selectAttr = normalizeNgContentSelect(selectAttr);\n var /** @type {?} */ nodeName = ast.name.toLowerCase();\n var /** @type {?} */ type = PreparsedElementType.OTHER;\n if (isNgContent(nodeName)) {\n type = PreparsedElementType.NG_CONTENT;\n }\n else if (nodeName == STYLE_ELEMENT) {\n type = PreparsedElementType.STYLE;\n }\n else if (nodeName == SCRIPT_ELEMENT) {\n type = PreparsedElementType.SCRIPT;\n }\n else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n type = PreparsedElementType.STYLESHEET;\n }\n return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\n/** @enum {number} */\nvar PreparsedElementType = {\n NG_CONTENT: 0,\n STYLE: 1,\n STYLESHEET: 2,\n SCRIPT: 3,\n OTHER: 4,\n};\nexport { PreparsedElementType };\nPreparsedElementType[PreparsedElementType.NG_CONTENT] = \"NG_CONTENT\";\nPreparsedElementType[PreparsedElementType.STYLE] = \"STYLE\";\nPreparsedElementType[PreparsedElementType.STYLESHEET] = \"STYLESHEET\";\nPreparsedElementType[PreparsedElementType.SCRIPT] = \"SCRIPT\";\nPreparsedElementType[PreparsedElementType.OTHER] = \"OTHER\";\nvar PreparsedElement = /** @class */ (function () {\n function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {\n this.type = type;\n this.selectAttr = selectAttr;\n this.hrefAttr = hrefAttr;\n this.nonBindable = nonBindable;\n this.projectAs = projectAs;\n }\n return PreparsedElement;\n}());\nexport { PreparsedElement };\nfunction PreparsedElement_tsickle_Closure_declarations() {\n /** @type {?} */\n PreparsedElement.prototype.type;\n /** @type {?} */\n PreparsedElement.prototype.selectAttr;\n /** @type {?} */\n PreparsedElement.prototype.hrefAttr;\n /** @type {?} */\n PreparsedElement.prototype.nonBindable;\n /** @type {?} */\n PreparsedElement.prototype.projectAs;\n}\n/**\n * @param {?} selectAttr\n * @return {?}\n */\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\n}\n//# sourceMappingURL=template_preparser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { CompileStylesheetMetadata, CompileTemplateMetadata, templateSourceUrl } from './compile_metadata';\nimport { preserveWhitespacesDefault } from './config';\nimport { ViewEncapsulation } from './core';\nimport * as html from './ml_parser/ast';\nimport { InterpolationConfig } from './ml_parser/interpolation_config';\nimport { extractStyleUrls, isStyleUrlResolvable } from './style_url_resolver';\nimport { PreparsedElementType, preparseElement } from './template_parser/template_preparser';\nimport { SyncAsync, isDefined, stringify, syntaxError } from './util';\n/**\n * @record\n */\nexport function PrenormalizedTemplateMetadata() { }\nfunction PrenormalizedTemplateMetadata_tsickle_Closure_declarations() {\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.ngModuleType;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.componentType;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.moduleUrl;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.template;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.templateUrl;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.styles;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.styleUrls;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.interpolation;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.encapsulation;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.animations;\n /** @type {?} */\n PrenormalizedTemplateMetadata.prototype.preserveWhitespaces;\n}\nvar DirectiveNormalizer = /** @class */ (function () {\n function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {\n this._resourceLoader = _resourceLoader;\n this._urlResolver = _urlResolver;\n this._htmlParser = _htmlParser;\n this._config = _config;\n this._resourceLoaderCache = new Map();\n }\n /**\n * @return {?}\n */\n DirectiveNormalizer.prototype.clearCache = /**\n * @return {?}\n */\n function () { this._resourceLoaderCache.clear(); };\n /**\n * @param {?} normalizedDirective\n * @return {?}\n */\n DirectiveNormalizer.prototype.clearCacheFor = /**\n * @param {?} normalizedDirective\n * @return {?}\n */\n function (normalizedDirective) {\n var _this = this;\n if (!normalizedDirective.isComponent) {\n return;\n }\n var /** @type {?} */ template = /** @type {?} */ ((normalizedDirective.template));\n this._resourceLoaderCache.delete(/** @type {?} */ ((template.templateUrl)));\n template.externalStylesheets.forEach(function (stylesheet) { _this._resourceLoaderCache.delete(/** @type {?} */ ((stylesheet.moduleUrl))); });\n };\n /**\n * @param {?} url\n * @return {?}\n */\n DirectiveNormalizer.prototype._fetch = /**\n * @param {?} url\n * @return {?}\n */\n function (url) {\n var /** @type {?} */ result = this._resourceLoaderCache.get(url);\n if (!result) {\n result = this._resourceLoader.get(url);\n this._resourceLoaderCache.set(url, result);\n }\n return result;\n };\n /**\n * @param {?} prenormData\n * @return {?}\n */\n DirectiveNormalizer.prototype.normalizeTemplate = /**\n * @param {?} prenormData\n * @return {?}\n */\n function (prenormData) {\n var _this = this;\n if (isDefined(prenormData.template)) {\n if (isDefined(prenormData.templateUrl)) {\n throw syntaxError(\"'\" + stringify(prenormData.componentType) + \"' component cannot define both template and templateUrl\");\n }\n if (typeof prenormData.template !== 'string') {\n throw syntaxError(\"The template specified for component \" + stringify(prenormData.componentType) + \" is not a string\");\n }\n }\n else if (isDefined(prenormData.templateUrl)) {\n if (typeof prenormData.templateUrl !== 'string') {\n throw syntaxError(\"The templateUrl specified for component \" + stringify(prenormData.componentType) + \" is not a string\");\n }\n }\n else {\n throw syntaxError(\"No template specified for component \" + stringify(prenormData.componentType));\n }\n if (isDefined(prenormData.preserveWhitespaces) &&\n typeof prenormData.preserveWhitespaces !== 'boolean') {\n throw syntaxError(\"The preserveWhitespaces option for component \" + stringify(prenormData.componentType) + \" must be a boolean\");\n }\n return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) { return _this._normalizeTemplateMetadata(prenormData, preparsedTemplate); });\n };\n /**\n * @param {?} prenomData\n * @return {?}\n */\n DirectiveNormalizer.prototype._preParseTemplate = /**\n * @param {?} prenomData\n * @return {?}\n */\n function (prenomData) {\n var _this = this;\n var /** @type {?} */ template;\n var /** @type {?} */ templateUrl;\n if (prenomData.template != null) {\n template = prenomData.template;\n templateUrl = prenomData.moduleUrl;\n }\n else {\n templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, /** @type {?} */ ((prenomData.templateUrl)));\n template = this._fetch(templateUrl);\n }\n return SyncAsync.then(template, function (template) { return _this._preparseLoadedTemplate(prenomData, template, templateUrl); });\n };\n /**\n * @param {?} prenormData\n * @param {?} template\n * @param {?} templateAbsUrl\n * @return {?}\n */\n DirectiveNormalizer.prototype._preparseLoadedTemplate = /**\n * @param {?} prenormData\n * @param {?} template\n * @param {?} templateAbsUrl\n * @return {?}\n */\n function (prenormData, template, templateAbsUrl) {\n var /** @type {?} */ isInline = !!prenormData.template;\n var /** @type {?} */ interpolationConfig = InterpolationConfig.fromArray(/** @type {?} */ ((prenormData.interpolation)));\n var /** @type {?} */ rootNodesAndErrors = this._htmlParser.parse(template, templateSourceUrl({ reference: prenormData.ngModuleType }, { type: { reference: prenormData.componentType } }, { isInline: isInline, templateUrl: templateAbsUrl }), true, interpolationConfig);\n if (rootNodesAndErrors.errors.length > 0) {\n var /** @type {?} */ errorString = rootNodesAndErrors.errors.join('\\n');\n throw syntaxError(\"Template parse errors:\\n\" + errorString);\n }\n var /** @type {?} */ templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: prenormData.styles, moduleUrl: prenormData.moduleUrl }));\n var /** @type {?} */ visitor = new TemplatePreparseVisitor();\n html.visitAll(visitor, rootNodesAndErrors.rootNodes);\n var /** @type {?} */ templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: visitor.styles, styleUrls: visitor.styleUrls, moduleUrl: templateAbsUrl }));\n var /** @type {?} */ styles = templateMetadataStyles.styles.concat(templateStyles.styles);\n var /** @type {?} */ inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);\n var /** @type {?} */ styleUrls = this\n ._normalizeStylesheet(new CompileStylesheetMetadata({ styleUrls: prenormData.styleUrls, moduleUrl: prenormData.moduleUrl }))\n .styleUrls;\n return {\n template: template,\n templateUrl: templateAbsUrl, isInline: isInline,\n htmlAst: rootNodesAndErrors, styles: styles, inlineStyleUrls: inlineStyleUrls, styleUrls: styleUrls,\n ngContentSelectors: visitor.ngContentSelectors,\n };\n };\n /**\n * @param {?} prenormData\n * @param {?} preparsedTemplate\n * @return {?}\n */\n DirectiveNormalizer.prototype._normalizeTemplateMetadata = /**\n * @param {?} prenormData\n * @param {?} preparsedTemplate\n * @return {?}\n */\n function (prenormData, preparsedTemplate) {\n var _this = this;\n return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) {\n return _this._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets);\n });\n };\n /**\n * @param {?} prenormData\n * @param {?} preparsedTemplate\n * @param {?} stylesheets\n * @return {?}\n */\n DirectiveNormalizer.prototype._normalizeLoadedTemplateMetadata = /**\n * @param {?} prenormData\n * @param {?} preparsedTemplate\n * @param {?} stylesheets\n * @return {?}\n */\n function (prenormData, preparsedTemplate, stylesheets) {\n var _this = this;\n // Algorithm:\n // - produce exactly 1 entry per original styleUrl in\n // CompileTemplateMetadata.externalStylesheets whith all styles inlined\n // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.\n // Reason: be able to determine how many stylesheets there are even without loading\n // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously\n // (as resouce loading may be async)\n var /** @type {?} */ styles = preparsedTemplate.styles.slice();\n this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);\n var /** @type {?} */ styleUrls = preparsedTemplate.styleUrls;\n var /** @type {?} */ externalStylesheets = styleUrls.map(function (styleUrl) {\n var /** @type {?} */ stylesheet = /** @type {?} */ ((stylesheets.get(styleUrl)));\n var /** @type {?} */ styles = stylesheet.styles.slice();\n _this._inlineStyles(stylesheet.styleUrls, stylesheets, styles);\n return new CompileStylesheetMetadata({ moduleUrl: styleUrl, styles: styles });\n });\n var /** @type {?} */ encapsulation = prenormData.encapsulation;\n if (encapsulation == null) {\n encapsulation = this._config.defaultEncapsulation;\n }\n if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 &&\n styleUrls.length === 0) {\n encapsulation = ViewEncapsulation.None;\n }\n return new CompileTemplateMetadata({\n encapsulation: encapsulation,\n template: preparsedTemplate.template,\n templateUrl: preparsedTemplate.templateUrl,\n htmlAst: preparsedTemplate.htmlAst, styles: styles, styleUrls: styleUrls,\n ngContentSelectors: preparsedTemplate.ngContentSelectors,\n animations: prenormData.animations,\n interpolation: prenormData.interpolation,\n isInline: preparsedTemplate.isInline, externalStylesheets: externalStylesheets,\n preserveWhitespaces: preserveWhitespacesDefault(prenormData.preserveWhitespaces, this._config.preserveWhitespaces),\n });\n };\n /**\n * @param {?} styleUrls\n * @param {?} stylesheets\n * @param {?} targetStyles\n * @return {?}\n */\n DirectiveNormalizer.prototype._inlineStyles = /**\n * @param {?} styleUrls\n * @param {?} stylesheets\n * @param {?} targetStyles\n * @return {?}\n */\n function (styleUrls, stylesheets, targetStyles) {\n var _this = this;\n styleUrls.forEach(function (styleUrl) {\n var /** @type {?} */ stylesheet = /** @type {?} */ ((stylesheets.get(styleUrl)));\n stylesheet.styles.forEach(function (style) { return targetStyles.push(style); });\n _this._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);\n });\n };\n /**\n * @param {?} styleUrls\n * @param {?=} loadedStylesheets\n * @return {?}\n */\n DirectiveNormalizer.prototype._loadMissingExternalStylesheets = /**\n * @param {?} styleUrls\n * @param {?=} loadedStylesheets\n * @return {?}\n */\n function (styleUrls, loadedStylesheets) {\n var _this = this;\n if (loadedStylesheets === void 0) { loadedStylesheets = new Map(); }\n return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) { return !loadedStylesheets.has(styleUrl); })\n .map(function (styleUrl) {\n return SyncAsync.then(_this._fetch(styleUrl), function (loadedStyle) {\n var /** @type {?} */ stylesheet = _this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: [loadedStyle], moduleUrl: styleUrl }));\n loadedStylesheets.set(styleUrl, stylesheet);\n return _this._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);\n });\n })), function (_) { return loadedStylesheets; });\n };\n /**\n * @param {?} stylesheet\n * @return {?}\n */\n DirectiveNormalizer.prototype._normalizeStylesheet = /**\n * @param {?} stylesheet\n * @return {?}\n */\n function (stylesheet) {\n var _this = this;\n var /** @type {?} */ moduleUrl = /** @type {?} */ ((stylesheet.moduleUrl));\n var /** @type {?} */ allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable)\n .map(function (url) { return _this._urlResolver.resolve(moduleUrl, url); });\n var /** @type {?} */ allStyles = stylesheet.styles.map(function (style) {\n var /** @type {?} */ styleWithImports = extractStyleUrls(_this._urlResolver, moduleUrl, style);\n allStyleUrls.push.apply(allStyleUrls, styleWithImports.styleUrls);\n return styleWithImports.style;\n });\n return new CompileStylesheetMetadata({ styles: allStyles, styleUrls: allStyleUrls, moduleUrl: moduleUrl });\n };\n return DirectiveNormalizer;\n}());\nexport { DirectiveNormalizer };\nfunction DirectiveNormalizer_tsickle_Closure_declarations() {\n /** @type {?} */\n DirectiveNormalizer.prototype._resourceLoaderCache;\n /** @type {?} */\n DirectiveNormalizer.prototype._resourceLoader;\n /** @type {?} */\n DirectiveNormalizer.prototype._urlResolver;\n /** @type {?} */\n DirectiveNormalizer.prototype._htmlParser;\n /** @type {?} */\n DirectiveNormalizer.prototype._config;\n}\n/**\n * @record\n */\nfunction PreparsedTemplate() { }\nfunction PreparsedTemplate_tsickle_Closure_declarations() {\n /** @type {?} */\n PreparsedTemplate.prototype.template;\n /** @type {?} */\n PreparsedTemplate.prototype.templateUrl;\n /** @type {?} */\n PreparsedTemplate.prototype.isInline;\n /** @type {?} */\n PreparsedTemplate.prototype.htmlAst;\n /** @type {?} */\n PreparsedTemplate.prototype.styles;\n /** @type {?} */\n PreparsedTemplate.prototype.inlineStyleUrls;\n /** @type {?} */\n PreparsedTemplate.prototype.styleUrls;\n /** @type {?} */\n PreparsedTemplate.prototype.ngContentSelectors;\n}\nvar TemplatePreparseVisitor = /** @class */ (function () {\n function TemplatePreparseVisitor() {\n this.ngContentSelectors = [];\n this.styles = [];\n this.styleUrls = [];\n this.ngNonBindableStackCount = 0;\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitElement = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var /** @type {?} */ preparsedElement = preparseElement(ast);\n switch (preparsedElement.type) {\n case PreparsedElementType.NG_CONTENT:\n if (this.ngNonBindableStackCount === 0) {\n this.ngContentSelectors.push(preparsedElement.selectAttr);\n }\n break;\n case PreparsedElementType.STYLE:\n var /** @type {?} */ textContent_1 = '';\n ast.children.forEach(function (child) {\n if (child instanceof html.Text) {\n textContent_1 += child.value;\n }\n });\n this.styles.push(textContent_1);\n break;\n case PreparsedElementType.STYLESHEET:\n this.styleUrls.push(preparsedElement.hrefAttr);\n break;\n default:\n break;\n }\n if (preparsedElement.nonBindable) {\n this.ngNonBindableStackCount++;\n }\n html.visitAll(this, ast.children);\n if (preparsedElement.nonBindable) {\n this.ngNonBindableStackCount--;\n }\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitExpansion = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { html.visitAll(this, ast.cases); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitExpansionCase = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n html.visitAll(this, ast.expression);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitComment = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitAttribute = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n TemplatePreparseVisitor.prototype.visitText = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n return TemplatePreparseVisitor;\n}());\nfunction TemplatePreparseVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n TemplatePreparseVisitor.prototype.ngContentSelectors;\n /** @type {?} */\n TemplatePreparseVisitor.prototype.styles;\n /** @type {?} */\n TemplatePreparseVisitor.prototype.styleUrls;\n /** @type {?} */\n TemplatePreparseVisitor.prototype.ngNonBindableStackCount;\n}\n//# sourceMappingURL=directive_normalizer.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { createComponent, createContentChild, createContentChildren, createDirective, createHostBinding, createHostListener, createInput, createOutput, createViewChild, createViewChildren } from './core';\nimport { resolveForwardRef, splitAtColon, stringify } from './util';\nvar /** @type {?} */ QUERY_METADATA_IDENTIFIERS = [\n createViewChild,\n createViewChildren,\n createContentChild,\n createContentChildren,\n];\nvar DirectiveResolver = /** @class */ (function () {\n function DirectiveResolver(_reflector) {\n this._reflector = _reflector;\n }\n /**\n * @param {?} type\n * @return {?}\n */\n DirectiveResolver.prototype.isDirective = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n var /** @type {?} */ typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n return typeMetadata && typeMetadata.some(isDirectiveMetadata);\n };\n /**\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n DirectiveResolver.prototype.resolve = /**\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var /** @type {?} */ typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n if (typeMetadata) {\n var /** @type {?} */ metadata = findLast(typeMetadata, isDirectiveMetadata);\n if (metadata) {\n var /** @type {?} */ propertyMetadata = this._reflector.propMetadata(type);\n var /** @type {?} */ guards = this._reflector.guards(type);\n return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);\n }\n }\n if (throwIfNotFound) {\n throw new Error(\"No Directive annotation found on \" + stringify(type));\n }\n return null;\n };\n /**\n * @param {?} dm\n * @param {?} propertyMetadata\n * @param {?} guards\n * @param {?} directiveType\n * @return {?}\n */\n DirectiveResolver.prototype._mergeWithPropertyMetadata = /**\n * @param {?} dm\n * @param {?} propertyMetadata\n * @param {?} guards\n * @param {?} directiveType\n * @return {?}\n */\n function (dm, propertyMetadata, guards, directiveType) {\n var /** @type {?} */ inputs = [];\n var /** @type {?} */ outputs = [];\n var /** @type {?} */ host = {};\n var /** @type {?} */ queries = {};\n Object.keys(propertyMetadata).forEach(function (propName) {\n var /** @type {?} */ input = findLast(propertyMetadata[propName], function (a) { return createInput.isTypeOf(a); });\n if (input) {\n if (input.bindingPropertyName) {\n inputs.push(propName + \": \" + input.bindingPropertyName);\n }\n else {\n inputs.push(propName);\n }\n }\n var /** @type {?} */ output = findLast(propertyMetadata[propName], function (a) { return createOutput.isTypeOf(a); });\n if (output) {\n if (output.bindingPropertyName) {\n outputs.push(propName + \": \" + output.bindingPropertyName);\n }\n else {\n outputs.push(propName);\n }\n }\n var /** @type {?} */ hostBindings = propertyMetadata[propName].filter(function (a) { return createHostBinding.isTypeOf(a); });\n hostBindings.forEach(function (hostBinding) {\n if (hostBinding.hostPropertyName) {\n var /** @type {?} */ startWith = hostBinding.hostPropertyName[0];\n if (startWith === '(') {\n throw new Error(\"@HostBinding can not bind to events. Use @HostListener instead.\");\n }\n else if (startWith === '[') {\n throw new Error(\"@HostBinding parameter should be a property name, 'class.', or 'attr.'.\");\n }\n host[\"[\" + hostBinding.hostPropertyName + \"]\"] = propName;\n }\n else {\n host[\"[\" + propName + \"]\"] = propName;\n }\n });\n var /** @type {?} */ hostListeners = propertyMetadata[propName].filter(function (a) { return createHostListener.isTypeOf(a); });\n hostListeners.forEach(function (hostListener) {\n var /** @type {?} */ args = hostListener.args || [];\n host[\"(\" + hostListener.eventName + \")\"] = propName + \"(\" + args.join(',') + \")\";\n });\n var /** @type {?} */ query = findLast(propertyMetadata[propName], function (a) { return QUERY_METADATA_IDENTIFIERS.some(function (i) { return i.isTypeOf(a); }); });\n if (query) {\n queries[propName] = query;\n }\n });\n return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);\n };\n /**\n * @param {?} def\n * @return {?}\n */\n DirectiveResolver.prototype._extractPublicName = /**\n * @param {?} def\n * @return {?}\n */\n function (def) { return splitAtColon(def, [/** @type {?} */ ((null)), def])[1].trim(); };\n /**\n * @param {?} bindings\n * @return {?}\n */\n DirectiveResolver.prototype._dedupeBindings = /**\n * @param {?} bindings\n * @return {?}\n */\n function (bindings) {\n var /** @type {?} */ names = new Set();\n var /** @type {?} */ publicNames = new Set();\n var /** @type {?} */ reversedResult = [];\n // go last to first to allow later entries to overwrite previous entries\n for (var /** @type {?} */ i = bindings.length - 1; i >= 0; i--) {\n var /** @type {?} */ binding = bindings[i];\n var /** @type {?} */ name_1 = this._extractPublicName(binding);\n publicNames.add(name_1);\n if (!names.has(name_1)) {\n names.add(name_1);\n reversedResult.push(binding);\n }\n }\n return reversedResult.reverse();\n };\n /**\n * @param {?} directive\n * @param {?} inputs\n * @param {?} outputs\n * @param {?} host\n * @param {?} queries\n * @param {?} guards\n * @param {?} directiveType\n * @return {?}\n */\n DirectiveResolver.prototype._merge = /**\n * @param {?} directive\n * @param {?} inputs\n * @param {?} outputs\n * @param {?} host\n * @param {?} queries\n * @param {?} guards\n * @param {?} directiveType\n * @return {?}\n */\n function (directive, inputs, outputs, host, queries, guards, directiveType) {\n var /** @type {?} */ mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);\n var /** @type {?} */ mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);\n var /** @type {?} */ mergedHost = directive.host ? tslib_1.__assign({}, directive.host, host) : host;\n var /** @type {?} */ mergedQueries = directive.queries ? tslib_1.__assign({}, directive.queries, queries) : queries;\n if (createComponent.isTypeOf(directive)) {\n var /** @type {?} */ comp = /** @type {?} */ (directive);\n return createComponent({\n selector: comp.selector,\n inputs: mergedInputs,\n outputs: mergedOutputs,\n host: mergedHost,\n exportAs: comp.exportAs,\n moduleId: comp.moduleId,\n queries: mergedQueries,\n changeDetection: comp.changeDetection,\n providers: comp.providers,\n viewProviders: comp.viewProviders,\n entryComponents: comp.entryComponents,\n template: comp.template,\n templateUrl: comp.templateUrl,\n styles: comp.styles,\n styleUrls: comp.styleUrls,\n encapsulation: comp.encapsulation,\n animations: comp.animations,\n interpolation: comp.interpolation,\n preserveWhitespaces: directive.preserveWhitespaces,\n });\n }\n else {\n return createDirective({\n selector: directive.selector,\n inputs: mergedInputs,\n outputs: mergedOutputs,\n host: mergedHost,\n exportAs: directive.exportAs,\n queries: mergedQueries,\n providers: directive.providers, guards: guards\n });\n }\n };\n return DirectiveResolver;\n}());\nexport { DirectiveResolver };\nfunction DirectiveResolver_tsickle_Closure_declarations() {\n /** @type {?} */\n DirectiveResolver.prototype._reflector;\n}\n/**\n * @param {?} type\n * @return {?}\n */\nfunction isDirectiveMetadata(type) {\n return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);\n}\n/**\n * @template T\n * @param {?} arr\n * @param {?} condition\n * @return {?}\n */\nexport function findLast(arr, condition) {\n for (var /** @type {?} */ i = arr.length - 1; i >= 0; i--) {\n if (condition(arr[i])) {\n return arr[i];\n }\n }\n return null;\n}\n//# sourceMappingURL=directive_resolver.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var /** @type {?} */ $EOF = 0;\nexport var /** @type {?} */ $TAB = 9;\nexport var /** @type {?} */ $LF = 10;\nexport var /** @type {?} */ $VTAB = 11;\nexport var /** @type {?} */ $FF = 12;\nexport var /** @type {?} */ $CR = 13;\nexport var /** @type {?} */ $SPACE = 32;\nexport var /** @type {?} */ $BANG = 33;\nexport var /** @type {?} */ $DQ = 34;\nexport var /** @type {?} */ $HASH = 35;\nexport var /** @type {?} */ $$ = 36;\nexport var /** @type {?} */ $PERCENT = 37;\nexport var /** @type {?} */ $AMPERSAND = 38;\nexport var /** @type {?} */ $SQ = 39;\nexport var /** @type {?} */ $LPAREN = 40;\nexport var /** @type {?} */ $RPAREN = 41;\nexport var /** @type {?} */ $STAR = 42;\nexport var /** @type {?} */ $PLUS = 43;\nexport var /** @type {?} */ $COMMA = 44;\nexport var /** @type {?} */ $MINUS = 45;\nexport var /** @type {?} */ $PERIOD = 46;\nexport var /** @type {?} */ $SLASH = 47;\nexport var /** @type {?} */ $COLON = 58;\nexport var /** @type {?} */ $SEMICOLON = 59;\nexport var /** @type {?} */ $LT = 60;\nexport var /** @type {?} */ $EQ = 61;\nexport var /** @type {?} */ $GT = 62;\nexport var /** @type {?} */ $QUESTION = 63;\nexport var /** @type {?} */ $0 = 48;\nexport var /** @type {?} */ $9 = 57;\nexport var /** @type {?} */ $A = 65;\nexport var /** @type {?} */ $E = 69;\nexport var /** @type {?} */ $F = 70;\nexport var /** @type {?} */ $X = 88;\nexport var /** @type {?} */ $Z = 90;\nexport var /** @type {?} */ $LBRACKET = 91;\nexport var /** @type {?} */ $BACKSLASH = 92;\nexport var /** @type {?} */ $RBRACKET = 93;\nexport var /** @type {?} */ $CARET = 94;\nexport var /** @type {?} */ $_ = 95;\nexport var /** @type {?} */ $a = 97;\nexport var /** @type {?} */ $e = 101;\nexport var /** @type {?} */ $f = 102;\nexport var /** @type {?} */ $n = 110;\nexport var /** @type {?} */ $r = 114;\nexport var /** @type {?} */ $t = 116;\nexport var /** @type {?} */ $u = 117;\nexport var /** @type {?} */ $v = 118;\nexport var /** @type {?} */ $x = 120;\nexport var /** @type {?} */ $z = 122;\nexport var /** @type {?} */ $LBRACE = 123;\nexport var /** @type {?} */ $BAR = 124;\nexport var /** @type {?} */ $RBRACE = 125;\nexport var /** @type {?} */ $NBSP = 160;\nexport var /** @type {?} */ $PIPE = 124;\nexport var /** @type {?} */ $TILDA = 126;\nexport var /** @type {?} */ $AT = 64;\nexport var /** @type {?} */ $BT = 96;\n/**\n * @param {?} code\n * @return {?}\n */\nexport function isWhitespace(code) {\n return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\n/**\n * @param {?} code\n * @return {?}\n */\nexport function isDigit(code) {\n return $0 <= code && code <= $9;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nexport function isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nexport function isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\n//# sourceMappingURL=chars.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as chars from '../chars';\n/** @enum {number} */\nvar TokenType = {\n Character: 0,\n Identifier: 1,\n Keyword: 2,\n String: 3,\n Operator: 4,\n Number: 5,\n Error: 6,\n};\nexport { TokenType };\nTokenType[TokenType.Character] = \"Character\";\nTokenType[TokenType.Identifier] = \"Identifier\";\nTokenType[TokenType.Keyword] = \"Keyword\";\nTokenType[TokenType.String] = \"String\";\nTokenType[TokenType.Operator] = \"Operator\";\nTokenType[TokenType.Number] = \"Number\";\nTokenType[TokenType.Error] = \"Error\";\nvar /** @type {?} */ KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nvar Lexer = /** @class */ (function () {\n function Lexer() {\n }\n /**\n * @param {?} text\n * @return {?}\n */\n Lexer.prototype.tokenize = /**\n * @param {?} text\n * @return {?}\n */\n function (text) {\n var /** @type {?} */ scanner = new _Scanner(text);\n var /** @type {?} */ tokens = [];\n var /** @type {?} */ token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n };\n return Lexer;\n}());\nexport { Lexer };\nvar Token = /** @class */ (function () {\n function Token(index, type, numValue, strValue) {\n this.index = index;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n /**\n * @param {?} code\n * @return {?}\n */\n Token.prototype.isCharacter = /**\n * @param {?} code\n * @return {?}\n */\n function (code) {\n return this.type == TokenType.Character && this.numValue == code;\n };\n /**\n * @return {?}\n */\n Token.prototype.isNumber = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Number; };\n /**\n * @return {?}\n */\n Token.prototype.isString = /**\n * @return {?}\n */\n function () { return this.type == TokenType.String; };\n /**\n * @param {?} operater\n * @return {?}\n */\n Token.prototype.isOperator = /**\n * @param {?} operater\n * @return {?}\n */\n function (operater) {\n return this.type == TokenType.Operator && this.strValue == operater;\n };\n /**\n * @return {?}\n */\n Token.prototype.isIdentifier = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Identifier; };\n /**\n * @return {?}\n */\n Token.prototype.isKeyword = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordLet = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordAs = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'as'; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordNull = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordUndefined = /**\n * @return {?}\n */\n function () {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordTrue = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordFalse = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };\n /**\n * @return {?}\n */\n Token.prototype.isKeywordThis = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };\n /**\n * @return {?}\n */\n Token.prototype.isError = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Error; };\n /**\n * @return {?}\n */\n Token.prototype.toNumber = /**\n * @return {?}\n */\n function () { return this.type == TokenType.Number ? this.numValue : -1; };\n /**\n * @return {?}\n */\n Token.prototype.toString = /**\n * @return {?}\n */\n function () {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.String:\n case TokenType.Error:\n return this.strValue;\n case TokenType.Number:\n return this.numValue.toString();\n default:\n return null;\n }\n };\n return Token;\n}());\nexport { Token };\nfunction Token_tsickle_Closure_declarations() {\n /** @type {?} */\n Token.prototype.index;\n /** @type {?} */\n Token.prototype.type;\n /** @type {?} */\n Token.prototype.numValue;\n /** @type {?} */\n Token.prototype.strValue;\n}\n/**\n * @param {?} index\n * @param {?} code\n * @return {?}\n */\nfunction newCharacterToken(index, code) {\n return new Token(index, TokenType.Character, code, String.fromCharCode(code));\n}\n/**\n * @param {?} index\n * @param {?} text\n * @return {?}\n */\nfunction newIdentifierToken(index, text) {\n return new Token(index, TokenType.Identifier, 0, text);\n}\n/**\n * @param {?} index\n * @param {?} text\n * @return {?}\n */\nfunction newKeywordToken(index, text) {\n return new Token(index, TokenType.Keyword, 0, text);\n}\n/**\n * @param {?} index\n * @param {?} text\n * @return {?}\n */\nfunction newOperatorToken(index, text) {\n return new Token(index, TokenType.Operator, 0, text);\n}\n/**\n * @param {?} index\n * @param {?} text\n * @return {?}\n */\nfunction newStringToken(index, text) {\n return new Token(index, TokenType.String, 0, text);\n}\n/**\n * @param {?} index\n * @param {?} n\n * @return {?}\n */\nfunction newNumberToken(index, n) {\n return new Token(index, TokenType.Number, n, '');\n}\n/**\n * @param {?} index\n * @param {?} message\n * @return {?}\n */\nfunction newErrorToken(index, message) {\n return new Token(index, TokenType.Error, 0, message);\n}\nexport var /** @type {?} */ EOF = new Token(-1, TokenType.Character, 0, '');\nvar _Scanner = /** @class */ (function () {\n function _Scanner(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n /**\n * @return {?}\n */\n _Scanner.prototype.advance = /**\n * @return {?}\n */\n function () {\n this.peek = ++this.index >= this.length ? chars.$EOF : this.input.charCodeAt(this.index);\n };\n /**\n * @return {?}\n */\n _Scanner.prototype.scanToken = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ input = this.input, /** @type {?} */ length = this.length;\n var /** @type {?} */ peek = this.peek, /** @type {?} */ index = this.index;\n // Skip whitespace.\n while (peek <= chars.$SPACE) {\n if (++index >= length) {\n peek = chars.$EOF;\n break;\n }\n else {\n peek = input.charCodeAt(index);\n }\n }\n this.peek = peek;\n this.index = index;\n if (index >= length) {\n return null;\n }\n // Handle identifiers and numbers.\n if (isIdentifierStart(peek))\n return this.scanIdentifier();\n if (chars.isDigit(peek))\n return this.scanNumber(index);\n var /** @type {?} */ start = index;\n switch (peek) {\n case chars.$PERIOD:\n this.advance();\n return chars.isDigit(this.peek) ? this.scanNumber(start) :\n newCharacterToken(start, chars.$PERIOD);\n case chars.$LPAREN:\n case chars.$RPAREN:\n case chars.$LBRACE:\n case chars.$RBRACE:\n case chars.$LBRACKET:\n case chars.$RBRACKET:\n case chars.$COMMA:\n case chars.$COLON:\n case chars.$SEMICOLON:\n return this.scanCharacter(start, peek);\n case chars.$SQ:\n case chars.$DQ:\n return this.scanString();\n case chars.$HASH:\n case chars.$PLUS:\n case chars.$MINUS:\n case chars.$STAR:\n case chars.$SLASH:\n case chars.$PERCENT:\n case chars.$CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case chars.$QUESTION:\n return this.scanComplexOperator(start, '?', chars.$PERIOD, '.');\n case chars.$LT:\n case chars.$GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), chars.$EQ, '=');\n case chars.$BANG:\n case chars.$EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), chars.$EQ, '=', chars.$EQ, '=');\n case chars.$AMPERSAND:\n return this.scanComplexOperator(start, '&', chars.$AMPERSAND, '&');\n case chars.$BAR:\n return this.scanComplexOperator(start, '|', chars.$BAR, '|');\n case chars.$NBSP:\n while (chars.isWhitespace(this.peek))\n this.advance();\n return this.scanToken();\n }\n this.advance();\n return this.error(\"Unexpected character [\" + String.fromCharCode(peek) + \"]\", 0);\n };\n /**\n * @param {?} start\n * @param {?} code\n * @return {?}\n */\n _Scanner.prototype.scanCharacter = /**\n * @param {?} start\n * @param {?} code\n * @return {?}\n */\n function (start, code) {\n this.advance();\n return newCharacterToken(start, code);\n };\n /**\n * @param {?} start\n * @param {?} str\n * @return {?}\n */\n _Scanner.prototype.scanOperator = /**\n * @param {?} start\n * @param {?} str\n * @return {?}\n */\n function (start, str) {\n this.advance();\n return newOperatorToken(start, str);\n };\n /**\n * Tokenize a 2/3 char long operator\n *\n * @param start start index in the expression\n * @param one first symbol (always part of the operator)\n * @param twoCode code point for the second symbol\n * @param two second symbol (part of the operator when the second code point matches)\n * @param threeCode code point for the third symbol\n * @param three third symbol (part of the operator when provided and matches source expression)\n */\n /**\n * Tokenize a 2/3 char long operator\n *\n * @param {?} start start index in the expression\n * @param {?} one first symbol (always part of the operator)\n * @param {?} twoCode code point for the second symbol\n * @param {?} two second symbol (part of the operator when the second code point matches)\n * @param {?=} threeCode code point for the third symbol\n * @param {?=} three third symbol (part of the operator when provided and matches source expression)\n * @return {?}\n */\n _Scanner.prototype.scanComplexOperator = /**\n * Tokenize a 2/3 char long operator\n *\n * @param {?} start start index in the expression\n * @param {?} one first symbol (always part of the operator)\n * @param {?} twoCode code point for the second symbol\n * @param {?} two second symbol (part of the operator when the second code point matches)\n * @param {?=} threeCode code point for the third symbol\n * @param {?=} three third symbol (part of the operator when provided and matches source expression)\n * @return {?}\n */\n function (start, one, twoCode, two, threeCode, three) {\n this.advance();\n var /** @type {?} */ str = one;\n if (this.peek == twoCode) {\n this.advance();\n str += two;\n }\n if (threeCode != null && this.peek == threeCode) {\n this.advance();\n str += three;\n }\n return newOperatorToken(start, str);\n };\n /**\n * @return {?}\n */\n _Scanner.prototype.scanIdentifier = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek))\n this.advance();\n var /** @type {?} */ str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :\n newIdentifierToken(start, str);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Scanner.prototype.scanNumber = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n var /** @type {?} */ simple = (this.index === start);\n this.advance(); // Skip initial digit.\n while (true) {\n if (chars.isDigit(this.peek)) {\n // Do nothing.\n }\n else if (this.peek == chars.$PERIOD) {\n simple = false;\n }\n else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek))\n this.advance();\n if (!chars.isDigit(this.peek))\n return this.error('Invalid exponent', -1);\n simple = false;\n }\n else {\n break;\n }\n this.advance();\n }\n var /** @type {?} */ str = this.input.substring(start, this.index);\n var /** @type {?} */ value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, value);\n };\n /**\n * @return {?}\n */\n _Scanner.prototype.scanString = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this.index;\n var /** @type {?} */ quote = this.peek;\n this.advance(); // Skip initial quote.\n var /** @type {?} */ buffer = '';\n var /** @type {?} */ marker = this.index;\n var /** @type {?} */ input = this.input;\n while (this.peek != quote) {\n if (this.peek == chars.$BACKSLASH) {\n buffer += input.substring(marker, this.index);\n this.advance();\n var /** @type {?} */ unescapedCode = void 0;\n // Workaround for TS2.1-introduced type strictness\n this.peek = this.peek;\n if (this.peek == chars.$u) {\n // 4 character hex code for unicode character.\n var /** @type {?} */ hex = input.substring(this.index + 1, this.index + 5);\n if (/^[0-9a-f]+$/i.test(hex)) {\n unescapedCode = parseInt(hex, 16);\n }\n else {\n return this.error(\"Invalid unicode escape [\\\\u\" + hex + \"]\", 0);\n }\n for (var /** @type {?} */ i = 0; i < 5; i++) {\n this.advance();\n }\n }\n else {\n unescapedCode = unescape(this.peek);\n this.advance();\n }\n buffer += String.fromCharCode(unescapedCode);\n marker = this.index;\n }\n else if (this.peek == chars.$EOF) {\n return this.error('Unterminated quote', 0);\n }\n else {\n this.advance();\n }\n }\n var /** @type {?} */ last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, buffer + last);\n };\n /**\n * @param {?} message\n * @param {?} offset\n * @return {?}\n */\n _Scanner.prototype.error = /**\n * @param {?} message\n * @param {?} offset\n * @return {?}\n */\n function (message, offset) {\n var /** @type {?} */ position = this.index + offset;\n return newErrorToken(position, \"Lexer Error: \" + message + \" at column \" + position + \" in expression [\" + this.input + \"]\");\n };\n return _Scanner;\n}());\nfunction _Scanner_tsickle_Closure_declarations() {\n /** @type {?} */\n _Scanner.prototype.length;\n /** @type {?} */\n _Scanner.prototype.peek;\n /** @type {?} */\n _Scanner.prototype.index;\n /** @type {?} */\n _Scanner.prototype.input;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isIdentifierStart(code) {\n return (chars.$a <= code && code <= chars.$z) || (chars.$A <= code && code <= chars.$Z) ||\n (code == chars.$_) || (code == chars.$$);\n}\n/**\n * @param {?} input\n * @return {?}\n */\nexport function isIdentifier(input) {\n if (input.length == 0)\n return false;\n var /** @type {?} */ scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek))\n return false;\n scanner.advance();\n while (scanner.peek !== chars.$EOF) {\n if (!isIdentifierPart(scanner.peek))\n return false;\n scanner.advance();\n }\n return true;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isIdentifierPart(code) {\n return chars.isAsciiLetter(code) || chars.isDigit(code) || (code == chars.$_) ||\n (code == chars.$$);\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isExponentStart(code) {\n return code == chars.$e || code == chars.$E;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isExponentSign(code) {\n return code == chars.$MINUS || code == chars.$PLUS;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nexport function isQuote(code) {\n return code === chars.$SQ || code === chars.$DQ || code === chars.$BT;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction unescape(code) {\n switch (code) {\n case chars.$n:\n return chars.$LF;\n case chars.$f:\n return chars.$FF;\n case chars.$r:\n return chars.$CR;\n case chars.$t:\n return chars.$TAB;\n case chars.$v:\n return chars.$VTAB;\n default:\n return code;\n }\n}\n/**\n * @param {?} text\n * @return {?}\n */\nfunction parseIntAutoRadix(text) {\n var /** @type {?} */ result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n//# sourceMappingURL=lexer.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nvar ParserError = /** @class */ (function () {\n function ParserError(message, input, errLocation, ctxLocation) {\n this.input = input;\n this.errLocation = errLocation;\n this.ctxLocation = ctxLocation;\n this.message = \"Parser Error: \" + message + \" \" + errLocation + \" [\" + input + \"] in \" + ctxLocation;\n }\n return ParserError;\n}());\nexport { ParserError };\nfunction ParserError_tsickle_Closure_declarations() {\n /** @type {?} */\n ParserError.prototype.message;\n /** @type {?} */\n ParserError.prototype.input;\n /** @type {?} */\n ParserError.prototype.errLocation;\n /** @type {?} */\n ParserError.prototype.ctxLocation;\n}\nvar ParseSpan = /** @class */ (function () {\n function ParseSpan(start, end) {\n this.start = start;\n this.end = end;\n }\n return ParseSpan;\n}());\nexport { ParseSpan };\nfunction ParseSpan_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseSpan.prototype.start;\n /** @type {?} */\n ParseSpan.prototype.end;\n}\nvar AST = /** @class */ (function () {\n function AST(span) {\n this.span = span;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n AST.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return null;\n };\n /**\n * @return {?}\n */\n AST.prototype.toString = /**\n * @return {?}\n */\n function () { return 'AST'; };\n return AST;\n}());\nexport { AST };\nfunction AST_tsickle_Closure_declarations() {\n /** @type {?} */\n AST.prototype.span;\n}\n/**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\nvar /**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\nQuote = /** @class */ (function (_super) {\n tslib_1.__extends(Quote, _super);\n function Quote(span, prefix, uninterpretedExpression, location) {\n var _this = _super.call(this, span) || this;\n _this.prefix = prefix;\n _this.uninterpretedExpression = uninterpretedExpression;\n _this.location = location;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Quote.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitQuote(this, context);\n };\n /**\n * @return {?}\n */\n Quote.prototype.toString = /**\n * @return {?}\n */\n function () { return 'Quote'; };\n return Quote;\n}(AST));\n/**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\nexport { Quote };\nfunction Quote_tsickle_Closure_declarations() {\n /** @type {?} */\n Quote.prototype.prefix;\n /** @type {?} */\n Quote.prototype.uninterpretedExpression;\n /** @type {?} */\n Quote.prototype.location;\n}\nvar EmptyExpr = /** @class */ (function (_super) {\n tslib_1.__extends(EmptyExpr, _super);\n function EmptyExpr() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n EmptyExpr.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n // do nothing\n };\n return EmptyExpr;\n}(AST));\nexport { EmptyExpr };\nvar ImplicitReceiver = /** @class */ (function (_super) {\n tslib_1.__extends(ImplicitReceiver, _super);\n function ImplicitReceiver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n ImplicitReceiver.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitImplicitReceiver(this, context);\n };\n return ImplicitReceiver;\n}(AST));\nexport { ImplicitReceiver };\n/**\n * Multiple expressions separated by a semicolon.\n */\nvar /**\n * Multiple expressions separated by a semicolon.\n */\nChain = /** @class */ (function (_super) {\n tslib_1.__extends(Chain, _super);\n function Chain(span, expressions) {\n var _this = _super.call(this, span) || this;\n _this.expressions = expressions;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Chain.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitChain(this, context);\n };\n return Chain;\n}(AST));\n/**\n * Multiple expressions separated by a semicolon.\n */\nexport { Chain };\nfunction Chain_tsickle_Closure_declarations() {\n /** @type {?} */\n Chain.prototype.expressions;\n}\nvar Conditional = /** @class */ (function (_super) {\n tslib_1.__extends(Conditional, _super);\n function Conditional(span, condition, trueExp, falseExp) {\n var _this = _super.call(this, span) || this;\n _this.condition = condition;\n _this.trueExp = trueExp;\n _this.falseExp = falseExp;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Conditional.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitConditional(this, context);\n };\n return Conditional;\n}(AST));\nexport { Conditional };\nfunction Conditional_tsickle_Closure_declarations() {\n /** @type {?} */\n Conditional.prototype.condition;\n /** @type {?} */\n Conditional.prototype.trueExp;\n /** @type {?} */\n Conditional.prototype.falseExp;\n}\nvar PropertyRead = /** @class */ (function (_super) {\n tslib_1.__extends(PropertyRead, _super);\n function PropertyRead(span, receiver, name) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n PropertyRead.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPropertyRead(this, context);\n };\n return PropertyRead;\n}(AST));\nexport { PropertyRead };\nfunction PropertyRead_tsickle_Closure_declarations() {\n /** @type {?} */\n PropertyRead.prototype.receiver;\n /** @type {?} */\n PropertyRead.prototype.name;\n}\nvar PropertyWrite = /** @class */ (function (_super) {\n tslib_1.__extends(PropertyWrite, _super);\n function PropertyWrite(span, receiver, name, value) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n PropertyWrite.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPropertyWrite(this, context);\n };\n return PropertyWrite;\n}(AST));\nexport { PropertyWrite };\nfunction PropertyWrite_tsickle_Closure_declarations() {\n /** @type {?} */\n PropertyWrite.prototype.receiver;\n /** @type {?} */\n PropertyWrite.prototype.name;\n /** @type {?} */\n PropertyWrite.prototype.value;\n}\nvar SafePropertyRead = /** @class */ (function (_super) {\n tslib_1.__extends(SafePropertyRead, _super);\n function SafePropertyRead(span, receiver, name) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n SafePropertyRead.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitSafePropertyRead(this, context);\n };\n return SafePropertyRead;\n}(AST));\nexport { SafePropertyRead };\nfunction SafePropertyRead_tsickle_Closure_declarations() {\n /** @type {?} */\n SafePropertyRead.prototype.receiver;\n /** @type {?} */\n SafePropertyRead.prototype.name;\n}\nvar KeyedRead = /** @class */ (function (_super) {\n tslib_1.__extends(KeyedRead, _super);\n function KeyedRead(span, obj, key) {\n var _this = _super.call(this, span) || this;\n _this.obj = obj;\n _this.key = key;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n KeyedRead.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitKeyedRead(this, context);\n };\n return KeyedRead;\n}(AST));\nexport { KeyedRead };\nfunction KeyedRead_tsickle_Closure_declarations() {\n /** @type {?} */\n KeyedRead.prototype.obj;\n /** @type {?} */\n KeyedRead.prototype.key;\n}\nvar KeyedWrite = /** @class */ (function (_super) {\n tslib_1.__extends(KeyedWrite, _super);\n function KeyedWrite(span, obj, key, value) {\n var _this = _super.call(this, span) || this;\n _this.obj = obj;\n _this.key = key;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n KeyedWrite.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitKeyedWrite(this, context);\n };\n return KeyedWrite;\n}(AST));\nexport { KeyedWrite };\nfunction KeyedWrite_tsickle_Closure_declarations() {\n /** @type {?} */\n KeyedWrite.prototype.obj;\n /** @type {?} */\n KeyedWrite.prototype.key;\n /** @type {?} */\n KeyedWrite.prototype.value;\n}\nvar BindingPipe = /** @class */ (function (_super) {\n tslib_1.__extends(BindingPipe, _super);\n function BindingPipe(span, exp, name, args) {\n var _this = _super.call(this, span) || this;\n _this.exp = exp;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n BindingPipe.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPipe(this, context);\n };\n return BindingPipe;\n}(AST));\nexport { BindingPipe };\nfunction BindingPipe_tsickle_Closure_declarations() {\n /** @type {?} */\n BindingPipe.prototype.exp;\n /** @type {?} */\n BindingPipe.prototype.name;\n /** @type {?} */\n BindingPipe.prototype.args;\n}\nvar LiteralPrimitive = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralPrimitive, _super);\n function LiteralPrimitive(span, value) {\n var _this = _super.call(this, span) || this;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n LiteralPrimitive.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralPrimitive(this, context);\n };\n return LiteralPrimitive;\n}(AST));\nexport { LiteralPrimitive };\nfunction LiteralPrimitive_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralPrimitive.prototype.value;\n}\nvar LiteralArray = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralArray, _super);\n function LiteralArray(span, expressions) {\n var _this = _super.call(this, span) || this;\n _this.expressions = expressions;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n LiteralArray.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralArray(this, context);\n };\n return LiteralArray;\n}(AST));\nexport { LiteralArray };\nfunction LiteralArray_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralArray.prototype.expressions;\n}\nvar LiteralMap = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralMap, _super);\n function LiteralMap(span, keys, values) {\n var _this = _super.call(this, span) || this;\n _this.keys = keys;\n _this.values = values;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n LiteralMap.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralMap(this, context);\n };\n return LiteralMap;\n}(AST));\nexport { LiteralMap };\nfunction LiteralMap_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralMap.prototype.keys;\n /** @type {?} */\n LiteralMap.prototype.values;\n}\nvar Interpolation = /** @class */ (function (_super) {\n tslib_1.__extends(Interpolation, _super);\n function Interpolation(span, strings, expressions) {\n var _this = _super.call(this, span) || this;\n _this.strings = strings;\n _this.expressions = expressions;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Interpolation.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitInterpolation(this, context);\n };\n return Interpolation;\n}(AST));\nexport { Interpolation };\nfunction Interpolation_tsickle_Closure_declarations() {\n /** @type {?} */\n Interpolation.prototype.strings;\n /** @type {?} */\n Interpolation.prototype.expressions;\n}\nvar Binary = /** @class */ (function (_super) {\n tslib_1.__extends(Binary, _super);\n function Binary(span, operation, left, right) {\n var _this = _super.call(this, span) || this;\n _this.operation = operation;\n _this.left = left;\n _this.right = right;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Binary.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitBinary(this, context);\n };\n return Binary;\n}(AST));\nexport { Binary };\nfunction Binary_tsickle_Closure_declarations() {\n /** @type {?} */\n Binary.prototype.operation;\n /** @type {?} */\n Binary.prototype.left;\n /** @type {?} */\n Binary.prototype.right;\n}\nvar PrefixNot = /** @class */ (function (_super) {\n tslib_1.__extends(PrefixNot, _super);\n function PrefixNot(span, expression) {\n var _this = _super.call(this, span) || this;\n _this.expression = expression;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n PrefixNot.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPrefixNot(this, context);\n };\n return PrefixNot;\n}(AST));\nexport { PrefixNot };\nfunction PrefixNot_tsickle_Closure_declarations() {\n /** @type {?} */\n PrefixNot.prototype.expression;\n}\nvar NonNullAssert = /** @class */ (function (_super) {\n tslib_1.__extends(NonNullAssert, _super);\n function NonNullAssert(span, expression) {\n var _this = _super.call(this, span) || this;\n _this.expression = expression;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n NonNullAssert.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitNonNullAssert(this, context);\n };\n return NonNullAssert;\n}(AST));\nexport { NonNullAssert };\nfunction NonNullAssert_tsickle_Closure_declarations() {\n /** @type {?} */\n NonNullAssert.prototype.expression;\n}\nvar MethodCall = /** @class */ (function (_super) {\n tslib_1.__extends(MethodCall, _super);\n function MethodCall(span, receiver, name, args) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n MethodCall.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitMethodCall(this, context);\n };\n return MethodCall;\n}(AST));\nexport { MethodCall };\nfunction MethodCall_tsickle_Closure_declarations() {\n /** @type {?} */\n MethodCall.prototype.receiver;\n /** @type {?} */\n MethodCall.prototype.name;\n /** @type {?} */\n MethodCall.prototype.args;\n}\nvar SafeMethodCall = /** @class */ (function (_super) {\n tslib_1.__extends(SafeMethodCall, _super);\n function SafeMethodCall(span, receiver, name, args) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n SafeMethodCall.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitSafeMethodCall(this, context);\n };\n return SafeMethodCall;\n}(AST));\nexport { SafeMethodCall };\nfunction SafeMethodCall_tsickle_Closure_declarations() {\n /** @type {?} */\n SafeMethodCall.prototype.receiver;\n /** @type {?} */\n SafeMethodCall.prototype.name;\n /** @type {?} */\n SafeMethodCall.prototype.args;\n}\nvar FunctionCall = /** @class */ (function (_super) {\n tslib_1.__extends(FunctionCall, _super);\n function FunctionCall(span, target, args) {\n var _this = _super.call(this, span) || this;\n _this.target = target;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n FunctionCall.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitFunctionCall(this, context);\n };\n return FunctionCall;\n}(AST));\nexport { FunctionCall };\nfunction FunctionCall_tsickle_Closure_declarations() {\n /** @type {?} */\n FunctionCall.prototype.target;\n /** @type {?} */\n FunctionCall.prototype.args;\n}\nvar ASTWithSource = /** @class */ (function (_super) {\n tslib_1.__extends(ASTWithSource, _super);\n function ASTWithSource(ast, source, location, errors) {\n var _this = _super.call(this, new ParseSpan(0, source == null ? 0 : source.length)) || this;\n _this.ast = ast;\n _this.source = source;\n _this.location = location;\n _this.errors = errors;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n ASTWithSource.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) {\n if (context === void 0) { context = null; }\n return this.ast.visit(visitor, context);\n };\n /**\n * @return {?}\n */\n ASTWithSource.prototype.toString = /**\n * @return {?}\n */\n function () { return this.source + \" in \" + this.location; };\n return ASTWithSource;\n}(AST));\nexport { ASTWithSource };\nfunction ASTWithSource_tsickle_Closure_declarations() {\n /** @type {?} */\n ASTWithSource.prototype.ast;\n /** @type {?} */\n ASTWithSource.prototype.source;\n /** @type {?} */\n ASTWithSource.prototype.location;\n /** @type {?} */\n ASTWithSource.prototype.errors;\n}\nvar TemplateBinding = /** @class */ (function () {\n function TemplateBinding(span, key, keyIsVar, name, expression) {\n this.span = span;\n this.key = key;\n this.keyIsVar = keyIsVar;\n this.name = name;\n this.expression = expression;\n }\n return TemplateBinding;\n}());\nexport { TemplateBinding };\nfunction TemplateBinding_tsickle_Closure_declarations() {\n /** @type {?} */\n TemplateBinding.prototype.span;\n /** @type {?} */\n TemplateBinding.prototype.key;\n /** @type {?} */\n TemplateBinding.prototype.keyIsVar;\n /** @type {?} */\n TemplateBinding.prototype.name;\n /** @type {?} */\n TemplateBinding.prototype.expression;\n}\n/**\n * @record\n */\nexport function AstVisitor() { }\nfunction AstVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n AstVisitor.prototype.visitBinary;\n /** @type {?} */\n AstVisitor.prototype.visitChain;\n /** @type {?} */\n AstVisitor.prototype.visitConditional;\n /** @type {?} */\n AstVisitor.prototype.visitFunctionCall;\n /** @type {?} */\n AstVisitor.prototype.visitImplicitReceiver;\n /** @type {?} */\n AstVisitor.prototype.visitInterpolation;\n /** @type {?} */\n AstVisitor.prototype.visitKeyedRead;\n /** @type {?} */\n AstVisitor.prototype.visitKeyedWrite;\n /** @type {?} */\n AstVisitor.prototype.visitLiteralArray;\n /** @type {?} */\n AstVisitor.prototype.visitLiteralMap;\n /** @type {?} */\n AstVisitor.prototype.visitLiteralPrimitive;\n /** @type {?} */\n AstVisitor.prototype.visitMethodCall;\n /** @type {?} */\n AstVisitor.prototype.visitPipe;\n /** @type {?} */\n AstVisitor.prototype.visitPrefixNot;\n /** @type {?} */\n AstVisitor.prototype.visitNonNullAssert;\n /** @type {?} */\n AstVisitor.prototype.visitPropertyRead;\n /** @type {?} */\n AstVisitor.prototype.visitPropertyWrite;\n /** @type {?} */\n AstVisitor.prototype.visitQuote;\n /** @type {?} */\n AstVisitor.prototype.visitSafeMethodCall;\n /** @type {?} */\n AstVisitor.prototype.visitSafePropertyRead;\n /** @type {?|undefined} */\n AstVisitor.prototype.visit;\n}\nvar NullAstVisitor = /** @class */ (function () {\n function NullAstVisitor() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitBinary = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitChain = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitConditional = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitFunctionCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitImplicitReceiver = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitInterpolation = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitKeyedRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitKeyedWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitLiteralArray = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitLiteralMap = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitLiteralPrimitive = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitPipe = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitPrefixNot = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitNonNullAssert = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitPropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitPropertyWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitQuote = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitSafeMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n NullAstVisitor.prototype.visitSafePropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n return NullAstVisitor;\n}());\nexport { NullAstVisitor };\nvar RecursiveAstVisitor = /** @class */ (function () {\n function RecursiveAstVisitor() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitBinary = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.left.visit(this);\n ast.right.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitChain = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return this.visitAll(ast.expressions, context); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitConditional = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.condition.visit(this);\n ast.trueExp.visit(this);\n ast.falseExp.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitPipe = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitFunctionCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n /** @type {?} */ ((ast.target)).visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitImplicitReceiver = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitInterpolation = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitAll(ast.expressions, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitKeyedRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.obj.visit(this);\n ast.key.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitKeyedWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.obj.visit(this);\n ast.key.visit(this);\n ast.value.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralArray = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitAll(ast.expressions, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralMap = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return this.visitAll(ast.values, context); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralPrimitive = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visit(this);\n return this.visitAll(ast.args, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitPrefixNot = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.expression.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitNonNullAssert = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.expression.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitPropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitPropertyWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visit(this);\n ast.value.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitSafePropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visit(this);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitSafeMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visit(this);\n return this.visitAll(ast.args, context);\n };\n /**\n * @param {?} asts\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitAll = /**\n * @param {?} asts\n * @param {?} context\n * @return {?}\n */\n function (asts, context) {\n var _this = this;\n asts.forEach(function (ast) { return ast.visit(_this, context); });\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitQuote = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return null; };\n return RecursiveAstVisitor;\n}());\nexport { RecursiveAstVisitor };\nvar AstTransformer = /** @class */ (function () {\n function AstTransformer() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitImplicitReceiver = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return ast; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitInterpolation = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralPrimitive = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new LiteralPrimitive(ast.span, ast.value);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitPropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitPropertyWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitSafePropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitSafeMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new SafeMethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitFunctionCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new FunctionCall(ast.span, /** @type {?} */ ((ast.target)).visit(this), this.visitAll(ast.args));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralArray = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new LiteralArray(ast.span, this.visitAll(ast.expressions));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralMap = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitBinary = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitPrefixNot = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new PrefixNot(ast.span, ast.expression.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitNonNullAssert = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new NonNullAssert(ast.span, ast.expression.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitConditional = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new Conditional(ast.span, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitPipe = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new BindingPipe(ast.span, ast.exp.visit(this), ast.name, this.visitAll(ast.args));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitKeyedRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitKeyedWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new KeyedWrite(ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));\n };\n /**\n * @param {?} asts\n * @return {?}\n */\n AstTransformer.prototype.visitAll = /**\n * @param {?} asts\n * @return {?}\n */\n function (asts) {\n var /** @type {?} */ res = new Array(asts.length);\n for (var /** @type {?} */ i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitChain = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new Chain(ast.span, this.visitAll(ast.expressions));\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitQuote = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return new Quote(ast.span, ast.prefix, ast.uninterpretedExpression, ast.location);\n };\n return AstTransformer;\n}());\nexport { AstTransformer };\n/**\n * @param {?} ast\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\nexport function visitAstChildren(ast, visitor, context) {\n /**\n * @param {?} ast\n * @return {?}\n */\n function visit(ast) {\n visitor.visit && visitor.visit(ast, context) || ast.visit(visitor, context);\n }\n /**\n * @template T\n * @param {?} asts\n * @return {?}\n */\n function visitAll(asts) { asts.forEach(visit); }\n ast.visit({\n visitBinary: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.left);\n visit(ast.right);\n },\n visitChain: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visitAll(ast.expressions); },\n visitConditional: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.condition);\n visit(ast.trueExp);\n visit(ast.falseExp);\n },\n visitFunctionCall: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n if (ast.target) {\n visit(ast.target);\n }\n visitAll(ast.args);\n },\n visitImplicitReceiver: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { },\n visitInterpolation: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visitAll(ast.expressions); },\n visitKeyedRead: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.obj);\n visit(ast.key);\n },\n visitKeyedWrite: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.obj);\n visit(ast.key);\n visit(ast.obj);\n },\n visitLiteralArray: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visitAll(ast.expressions); },\n visitLiteralMap: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { },\n visitLiteralPrimitive: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { },\n visitMethodCall: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.receiver);\n visitAll(ast.args);\n },\n visitPipe: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.exp);\n visitAll(ast.args);\n },\n visitPrefixNot: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visit(ast.expression); },\n visitNonNullAssert: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visit(ast.expression); },\n visitPropertyRead: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visit(ast.receiver); },\n visitPropertyWrite: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.receiver);\n visit(ast.value);\n },\n visitQuote: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { },\n visitSafeMethodCall: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n visit(ast.receiver);\n visitAll(ast.args);\n },\n visitSafePropertyRead: /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) { visit(ast.receiver); },\n });\n}\n//# sourceMappingURL=ast.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as chars from '../chars';\nimport { DEFAULT_INTERPOLATION_CONFIG } from '../ml_parser/interpolation_config';\nimport { escapeRegExp } from '../util';\nimport { ASTWithSource, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, NonNullAssert, ParseSpan, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead, TemplateBinding } from './ast';\nimport { EOF, TokenType, isIdentifier, isQuote } from './lexer';\nvar SplitInterpolation = /** @class */ (function () {\n function SplitInterpolation(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n return SplitInterpolation;\n}());\nexport { SplitInterpolation };\nfunction SplitInterpolation_tsickle_Closure_declarations() {\n /** @type {?} */\n SplitInterpolation.prototype.strings;\n /** @type {?} */\n SplitInterpolation.prototype.expressions;\n /** @type {?} */\n SplitInterpolation.prototype.offsets;\n}\nvar TemplateBindingParseResult = /** @class */ (function () {\n function TemplateBindingParseResult(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n return TemplateBindingParseResult;\n}());\nexport { TemplateBindingParseResult };\nfunction TemplateBindingParseResult_tsickle_Closure_declarations() {\n /** @type {?} */\n TemplateBindingParseResult.prototype.templateBindings;\n /** @type {?} */\n TemplateBindingParseResult.prototype.warnings;\n /** @type {?} */\n TemplateBindingParseResult.prototype.errors;\n}\n/**\n * @param {?} config\n * @return {?}\n */\nfunction _createInterpolateRegExp(config) {\n var /** @type {?} */ pattern = escapeRegExp(config.start) + '([\\\\s\\\\S]*?)' + escapeRegExp(config.end);\n return new RegExp(pattern, 'g');\n}\nvar Parser = /** @class */ (function () {\n function Parser(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.parseAction = /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var /** @type {?} */ sourceToLex = this._stripComments(input);\n var /** @type {?} */ tokens = this._lexer.tokenize(this._stripComments(input));\n var /** @type {?} */ ast = new _ParseAST(input, location, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)\n .parseChain();\n return new ASTWithSource(ast, input, location, this.errors);\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.parseBinding = /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ ast = this._parseBindingAst(input, location, interpolationConfig);\n return new ASTWithSource(ast, input, location, this.errors);\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.parseSimpleBinding = /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ ast = this._parseBindingAst(input, location, interpolationConfig);\n var /** @type {?} */ errors = SimpleExpressionChecker.check(ast);\n if (errors.length > 0) {\n this._reportError(\"Host binding expression cannot contain \" + errors.join(' '), input, location);\n }\n return new ASTWithSource(ast, input, location, this.errors);\n };\n /**\n * @param {?} message\n * @param {?} input\n * @param {?} errLocation\n * @param {?=} ctxLocation\n * @return {?}\n */\n Parser.prototype._reportError = /**\n * @param {?} message\n * @param {?} input\n * @param {?} errLocation\n * @param {?=} ctxLocation\n * @return {?}\n */\n function (message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?} interpolationConfig\n * @return {?}\n */\n Parser.prototype._parseBindingAst = /**\n * @param {?} input\n * @param {?} location\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n // Quotes expressions use 3rd-party expression language. We don't want to use\n // our lexer or parser for that, so we check for that ahead of time.\n var /** @type {?} */ quote = this._parseQuote(input, location);\n if (quote != null) {\n return quote;\n }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var /** @type {?} */ sourceToLex = this._stripComments(input);\n var /** @type {?} */ tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)\n .parseChain();\n };\n /**\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n Parser.prototype._parseQuote = /**\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n function (input, location) {\n if (input == null)\n return null;\n var /** @type {?} */ prefixSeparatorIndex = input.indexOf(':');\n if (prefixSeparatorIndex == -1)\n return null;\n var /** @type {?} */ prefix = input.substring(0, prefixSeparatorIndex).trim();\n if (!isIdentifier(prefix))\n return null;\n var /** @type {?} */ uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);\n return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);\n };\n /**\n * @param {?} prefixToken\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n Parser.prototype.parseTemplateBindings = /**\n * @param {?} prefixToken\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n function (prefixToken, input, location) {\n var /** @type {?} */ tokens = this._lexer.tokenize(input);\n if (prefixToken) {\n // Prefix the tokens with the tokens from prefixToken but have them take no space (0 index).\n var /** @type {?} */ prefixTokens = this._lexer.tokenize(prefixToken).map(function (t) {\n t.index = 0;\n return t;\n });\n tokens.unshift.apply(tokens, prefixTokens);\n }\n return new _ParseAST(input, location, tokens, input.length, false, this.errors, 0)\n .parseTemplateBindings();\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.parseInterpolation = /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ split = this.splitInterpolation(input, location, interpolationConfig);\n if (split == null)\n return null;\n var /** @type {?} */ expressions = [];\n for (var /** @type {?} */ i = 0; i < split.expressions.length; ++i) {\n var /** @type {?} */ expressionText = split.expressions[i];\n var /** @type {?} */ sourceToLex = this._stripComments(expressionText);\n var /** @type {?} */ tokens = this._lexer.tokenize(sourceToLex);\n var /** @type {?} */ ast = new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))\n .parseChain();\n expressions.push(ast);\n }\n return new ASTWithSource(new Interpolation(new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions), input, location, this.errors);\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.splitInterpolation = /**\n * @param {?} input\n * @param {?} location\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ regexp = _createInterpolateRegExp(interpolationConfig);\n var /** @type {?} */ parts = input.split(regexp);\n if (parts.length <= 1) {\n return null;\n }\n var /** @type {?} */ strings = [];\n var /** @type {?} */ expressions = [];\n var /** @type {?} */ offsets = [];\n var /** @type {?} */ offset = 0;\n for (var /** @type {?} */ i = 0; i < parts.length; i++) {\n var /** @type {?} */ part = parts[i];\n if (i % 2 === 0) {\n // fixed string\n strings.push(part);\n offset += part.length;\n }\n else if (part.trim().length > 0) {\n offset += interpolationConfig.start.length;\n expressions.push(part);\n offsets.push(offset);\n offset += part.length + interpolationConfig.end.length;\n }\n else {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, \"at column \" + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + \" in\", location);\n expressions.push('$implict');\n offsets.push(offset);\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n };\n /**\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n Parser.prototype.wrapLiteralPrimitive = /**\n * @param {?} input\n * @param {?} location\n * @return {?}\n */\n function (input, location) {\n return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input, location, this.errors);\n };\n /**\n * @param {?} input\n * @return {?}\n */\n Parser.prototype._stripComments = /**\n * @param {?} input\n * @return {?}\n */\n function (input) {\n var /** @type {?} */ i = this._commentStart(input);\n return i != null ? input.substring(0, i).trim() : input;\n };\n /**\n * @param {?} input\n * @return {?}\n */\n Parser.prototype._commentStart = /**\n * @param {?} input\n * @return {?}\n */\n function (input) {\n var /** @type {?} */ outerQuote = null;\n for (var /** @type {?} */ i = 0; i < input.length - 1; i++) {\n var /** @type {?} */ char = input.charCodeAt(i);\n var /** @type {?} */ nextChar = input.charCodeAt(i + 1);\n if (char === chars.$SLASH && nextChar == chars.$SLASH && outerQuote == null)\n return i;\n if (outerQuote === char) {\n outerQuote = null;\n }\n else if (outerQuote == null && isQuote(char)) {\n outerQuote = char;\n }\n }\n return null;\n };\n /**\n * @param {?} input\n * @param {?} location\n * @param {?} interpolationConfig\n * @return {?}\n */\n Parser.prototype._checkNoInterpolation = /**\n * @param {?} input\n * @param {?} location\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (input, location, interpolationConfig) {\n var /** @type {?} */ regexp = _createInterpolateRegExp(interpolationConfig);\n var /** @type {?} */ parts = input.split(regexp);\n if (parts.length > 1) {\n this._reportError(\"Got interpolation (\" + interpolationConfig.start + interpolationConfig.end + \") where expression was expected\", input, \"at column \" + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + \" in\", location);\n }\n };\n /**\n * @param {?} parts\n * @param {?} partInErrIdx\n * @param {?} interpolationConfig\n * @return {?}\n */\n Parser.prototype._findInterpolationErrorColumn = /**\n * @param {?} parts\n * @param {?} partInErrIdx\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (parts, partInErrIdx, interpolationConfig) {\n var /** @type {?} */ errLocation = '';\n for (var /** @type {?} */ j = 0; j < partInErrIdx; j++) {\n errLocation += j % 2 === 0 ?\n parts[j] :\n \"\" + interpolationConfig.start + parts[j] + interpolationConfig.end;\n }\n return errLocation.length;\n };\n return Parser;\n}());\nexport { Parser };\nfunction Parser_tsickle_Closure_declarations() {\n /** @type {?} */\n Parser.prototype.errors;\n /** @type {?} */\n Parser.prototype._lexer;\n}\nvar _ParseAST = /** @class */ (function () {\n function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {\n this.input = input;\n this.location = location;\n this.tokens = tokens;\n this.inputLength = inputLength;\n this.parseAction = parseAction;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.index = 0;\n }\n /**\n * @param {?} offset\n * @return {?}\n */\n _ParseAST.prototype.peek = /**\n * @param {?} offset\n * @return {?}\n */\n function (offset) {\n var /** @type {?} */ i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n };\n Object.defineProperty(_ParseAST.prototype, \"next\", {\n get: /**\n * @return {?}\n */\n function () { return this.peek(0); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ParseAST.prototype, \"inputIndex\", {\n get: /**\n * @return {?}\n */\n function () {\n return (this.index < this.tokens.length) ? this.next.index + this.offset :\n this.inputLength + this.offset;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {?} start\n * @return {?}\n */\n _ParseAST.prototype.span = /**\n * @param {?} start\n * @return {?}\n */\n function (start) { return new ParseSpan(start, this.inputIndex); };\n /**\n * @return {?}\n */\n _ParseAST.prototype.advance = /**\n * @return {?}\n */\n function () { this.index++; };\n /**\n * @param {?} code\n * @return {?}\n */\n _ParseAST.prototype.optionalCharacter = /**\n * @param {?} code\n * @return {?}\n */\n function (code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.peekKeywordLet = /**\n * @return {?}\n */\n function () { return this.next.isKeywordLet(); };\n /**\n * @return {?}\n */\n _ParseAST.prototype.peekKeywordAs = /**\n * @return {?}\n */\n function () { return this.next.isKeywordAs(); };\n /**\n * @param {?} code\n * @return {?}\n */\n _ParseAST.prototype.expectCharacter = /**\n * @param {?} code\n * @return {?}\n */\n function (code) {\n if (this.optionalCharacter(code))\n return;\n this.error(\"Missing expected \" + String.fromCharCode(code));\n };\n /**\n * @param {?} op\n * @return {?}\n */\n _ParseAST.prototype.optionalOperator = /**\n * @param {?} op\n * @return {?}\n */\n function (op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * @param {?} operator\n * @return {?}\n */\n _ParseAST.prototype.expectOperator = /**\n * @param {?} operator\n * @return {?}\n */\n function (operator) {\n if (this.optionalOperator(operator))\n return;\n this.error(\"Missing expected operator \" + operator);\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.expectIdentifierOrKeyword = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n this.error(\"Unexpected token \" + n + \", expected identifier or keyword\");\n return '';\n }\n this.advance();\n return /** @type {?} */ (n.toString());\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.expectIdentifierOrKeywordOrString = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n this.error(\"Unexpected token \" + n + \", expected identifier, keyword, or string\");\n return '';\n }\n this.advance();\n return /** @type {?} */ (n.toString());\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseChain = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ exprs = [];\n var /** @type {?} */ start = this.inputIndex;\n while (this.index < this.tokens.length) {\n var /** @type {?} */ expr = this.parsePipe();\n exprs.push(expr);\n if (this.optionalCharacter(chars.$SEMICOLON)) {\n if (!this.parseAction) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.optionalCharacter(chars.$SEMICOLON)) {\n } // read all semicolons\n }\n else if (this.index < this.tokens.length) {\n this.error(\"Unexpected token '\" + this.next + \"'\");\n }\n }\n if (exprs.length == 0)\n return new EmptyExpr(this.span(start));\n if (exprs.length == 1)\n return exprs[0];\n return new Chain(this.span(start), exprs);\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parsePipe = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ result = this.parseExpression();\n if (this.optionalOperator('|')) {\n if (this.parseAction) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n var /** @type {?} */ name_1 = this.expectIdentifierOrKeyword();\n var /** @type {?} */ args = [];\n while (this.optionalCharacter(chars.$COLON)) {\n args.push(this.parseExpression());\n }\n result = new BindingPipe(this.span(result.span.start), result, name_1, args);\n } while (this.optionalOperator('|'));\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseExpression = /**\n * @return {?}\n */\n function () { return this.parseConditional(); };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseConditional = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this.inputIndex;\n var /** @type {?} */ result = this.parseLogicalOr();\n if (this.optionalOperator('?')) {\n var /** @type {?} */ yes = this.parsePipe();\n var /** @type {?} */ no = void 0;\n if (!this.optionalCharacter(chars.$COLON)) {\n var /** @type {?} */ end = this.inputIndex;\n var /** @type {?} */ expression = this.input.substring(start, end);\n this.error(\"Conditional expression \" + expression + \" requires all 3 expressions\");\n no = new EmptyExpr(this.span(start));\n }\n else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), result, yes, no);\n }\n else {\n return result;\n }\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseLogicalOr = /**\n * @return {?}\n */\n function () {\n // '||'\n var /** @type {?} */ result = this.parseLogicalAnd();\n while (this.optionalOperator('||')) {\n var /** @type {?} */ right = this.parseLogicalAnd();\n result = new Binary(this.span(result.span.start), '||', result, right);\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseLogicalAnd = /**\n * @return {?}\n */\n function () {\n // '&&'\n var /** @type {?} */ result = this.parseEquality();\n while (this.optionalOperator('&&')) {\n var /** @type {?} */ right = this.parseEquality();\n result = new Binary(this.span(result.span.start), '&&', result, right);\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseEquality = /**\n * @return {?}\n */\n function () {\n // '==','!=','===','!=='\n var /** @type {?} */ result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n var /** @type {?} */ operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n var /** @type {?} */ right = this.parseRelational();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseRelational = /**\n * @return {?}\n */\n function () {\n // '<', '>', '<=', '>='\n var /** @type {?} */ result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n var /** @type {?} */ operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n var /** @type {?} */ right = this.parseAdditive();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseAdditive = /**\n * @return {?}\n */\n function () {\n // '+', '-'\n var /** @type {?} */ result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n var /** @type {?} */ operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n var /** @type {?} */ right = this.parseMultiplicative();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseMultiplicative = /**\n * @return {?}\n */\n function () {\n // '*', '%', '/'\n var /** @type {?} */ result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n var /** @type {?} */ operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n var /** @type {?} */ right = this.parsePrefix();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parsePrefix = /**\n * @return {?}\n */\n function () {\n if (this.next.type == TokenType.Operator) {\n var /** @type {?} */ start = this.inputIndex;\n var /** @type {?} */ operator = this.next.strValue;\n var /** @type {?} */ result = void 0;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));\n case '-':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), result);\n }\n }\n return this.parseCallChain();\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseCallChain = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ result = this.parsePrimary();\n while (true) {\n if (this.optionalCharacter(chars.$PERIOD)) {\n result = this.parseAccessMemberOrMethodCall(result, false);\n }\n else if (this.optionalOperator('?.')) {\n result = this.parseAccessMemberOrMethodCall(result, true);\n }\n else if (this.optionalCharacter(chars.$LBRACKET)) {\n this.rbracketsExpected++;\n var /** @type {?} */ key = this.parsePipe();\n this.rbracketsExpected--;\n this.expectCharacter(chars.$RBRACKET);\n if (this.optionalOperator('=')) {\n var /** @type {?} */ value = this.parseConditional();\n result = new KeyedWrite(this.span(result.span.start), result, key, value);\n }\n else {\n result = new KeyedRead(this.span(result.span.start), result, key);\n }\n }\n else if (this.optionalCharacter(chars.$LPAREN)) {\n this.rparensExpected++;\n var /** @type {?} */ args = this.parseCallArguments();\n this.rparensExpected--;\n this.expectCharacter(chars.$RPAREN);\n result = new FunctionCall(this.span(result.span.start), result, args);\n }\n else if (this.optionalOperator('!')) {\n result = new NonNullAssert(this.span(result.span.start), result);\n }\n else {\n return result;\n }\n }\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parsePrimary = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this.inputIndex;\n if (this.optionalCharacter(chars.$LPAREN)) {\n this.rparensExpected++;\n var /** @type {?} */ result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter(chars.$RPAREN);\n return result;\n }\n else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), null);\n }\n else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), void 0);\n }\n else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), true);\n }\n else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), false);\n }\n else if (this.next.isKeywordThis()) {\n this.advance();\n return new ImplicitReceiver(this.span(start));\n }\n else if (this.optionalCharacter(chars.$LBRACKET)) {\n this.rbracketsExpected++;\n var /** @type {?} */ elements = this.parseExpressionList(chars.$RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter(chars.$RBRACKET);\n return new LiteralArray(this.span(start), elements);\n }\n else if (this.next.isCharacter(chars.$LBRACE)) {\n return this.parseLiteralMap();\n }\n else if (this.next.isIdentifier()) {\n return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);\n }\n else if (this.next.isNumber()) {\n var /** @type {?} */ value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), value);\n }\n else if (this.next.isString()) {\n var /** @type {?} */ literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), literalValue);\n }\n else if (this.index >= this.tokens.length) {\n this.error(\"Unexpected end of expression: \" + this.input);\n return new EmptyExpr(this.span(start));\n }\n else {\n this.error(\"Unexpected token \" + this.next);\n return new EmptyExpr(this.span(start));\n }\n };\n /**\n * @param {?} terminator\n * @return {?}\n */\n _ParseAST.prototype.parseExpressionList = /**\n * @param {?} terminator\n * @return {?}\n */\n function (terminator) {\n var /** @type {?} */ result = [];\n if (!this.next.isCharacter(terminator)) {\n do {\n result.push(this.parsePipe());\n } while (this.optionalCharacter(chars.$COMMA));\n }\n return result;\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseLiteralMap = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ keys = [];\n var /** @type {?} */ values = [];\n var /** @type {?} */ start = this.inputIndex;\n this.expectCharacter(chars.$LBRACE);\n if (!this.optionalCharacter(chars.$RBRACE)) {\n this.rbracesExpected++;\n do {\n var /** @type {?} */ quoted = this.next.isString();\n var /** @type {?} */ key = this.expectIdentifierOrKeywordOrString();\n keys.push({ key: key, quoted: quoted });\n this.expectCharacter(chars.$COLON);\n values.push(this.parsePipe());\n } while (this.optionalCharacter(chars.$COMMA));\n this.rbracesExpected--;\n this.expectCharacter(chars.$RBRACE);\n }\n return new LiteralMap(this.span(start), keys, values);\n };\n /**\n * @param {?} receiver\n * @param {?=} isSafe\n * @return {?}\n */\n _ParseAST.prototype.parseAccessMemberOrMethodCall = /**\n * @param {?} receiver\n * @param {?=} isSafe\n * @return {?}\n */\n function (receiver, isSafe) {\n if (isSafe === void 0) { isSafe = false; }\n var /** @type {?} */ start = receiver.span.start;\n var /** @type {?} */ id = this.expectIdentifierOrKeyword();\n if (this.optionalCharacter(chars.$LPAREN)) {\n this.rparensExpected++;\n var /** @type {?} */ args = this.parseCallArguments();\n this.expectCharacter(chars.$RPAREN);\n this.rparensExpected--;\n var /** @type {?} */ span = this.span(start);\n return isSafe ? new SafeMethodCall(span, receiver, id, args) :\n new MethodCall(span, receiver, id, args);\n }\n else {\n if (isSafe) {\n if (this.optionalOperator('=')) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n return new EmptyExpr(this.span(start));\n }\n else {\n return new SafePropertyRead(this.span(start), receiver, id);\n }\n }\n else {\n if (this.optionalOperator('=')) {\n if (!this.parseAction) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr(this.span(start));\n }\n var /** @type {?} */ value = this.parseConditional();\n return new PropertyWrite(this.span(start), receiver, id, value);\n }\n else {\n return new PropertyRead(this.span(start), receiver, id);\n }\n }\n }\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseCallArguments = /**\n * @return {?}\n */\n function () {\n if (this.next.isCharacter(chars.$RPAREN))\n return [];\n var /** @type {?} */ positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.optionalCharacter(chars.$COMMA));\n return /** @type {?} */ (positionals);\n };\n /**\n * An identifier, a keyword, a string with an optional `-` inbetween.\n */\n /**\n * An identifier, a keyword, a string with an optional `-` inbetween.\n * @return {?}\n */\n _ParseAST.prototype.expectTemplateBindingKey = /**\n * An identifier, a keyword, a string with an optional `-` inbetween.\n * @return {?}\n */\n function () {\n var /** @type {?} */ result = '';\n var /** @type {?} */ operatorFound = false;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.optionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return result.toString();\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.parseTemplateBindings = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ bindings = [];\n var /** @type {?} */ prefix = /** @type {?} */ ((null));\n var /** @type {?} */ warnings = [];\n while (this.index < this.tokens.length) {\n var /** @type {?} */ start = this.inputIndex;\n var /** @type {?} */ keyIsVar = this.peekKeywordLet();\n if (keyIsVar) {\n this.advance();\n }\n var /** @type {?} */ rawKey = this.expectTemplateBindingKey();\n var /** @type {?} */ key = rawKey;\n if (!keyIsVar) {\n if (prefix == null) {\n prefix = key;\n }\n else {\n key = prefix + key[0].toUpperCase() + key.substring(1);\n }\n }\n this.optionalCharacter(chars.$COLON);\n var /** @type {?} */ name_2 = /** @type {?} */ ((null));\n var /** @type {?} */ expression = /** @type {?} */ ((null));\n if (keyIsVar) {\n if (this.optionalOperator('=')) {\n name_2 = this.expectTemplateBindingKey();\n }\n else {\n name_2 = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n var /** @type {?} */ letStart = this.inputIndex;\n this.advance(); // consume `as`\n name_2 = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n keyIsVar = true;\n }\n else if (this.next !== EOF && !this.peekKeywordLet()) {\n var /** @type {?} */ start_1 = this.inputIndex;\n var /** @type {?} */ ast = this.parsePipe();\n var /** @type {?} */ source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);\n expression = new ASTWithSource(ast, source, this.location, this.errors);\n }\n bindings.push(new TemplateBinding(this.span(start), key, keyIsVar, name_2, expression));\n if (this.peekKeywordAs() && !keyIsVar) {\n var /** @type {?} */ letStart = this.inputIndex;\n this.advance(); // consume `as`\n var /** @type {?} */ letName = this.expectTemplateBindingKey(); // read local var name\n bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, /** @type {?} */ ((null))));\n }\n if (!this.optionalCharacter(chars.$SEMICOLON)) {\n this.optionalCharacter(chars.$COMMA);\n }\n }\n return new TemplateBindingParseResult(bindings, warnings, this.errors);\n };\n /**\n * @param {?} message\n * @param {?=} index\n * @return {?}\n */\n _ParseAST.prototype.error = /**\n * @param {?} message\n * @param {?=} index\n * @return {?}\n */\n function (message, index) {\n if (index === void 0) { index = null; }\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n };\n /**\n * @param {?=} index\n * @return {?}\n */\n _ParseAST.prototype.locationText = /**\n * @param {?=} index\n * @return {?}\n */\n function (index) {\n if (index === void 0) { index = null; }\n if (index == null)\n index = this.index;\n return (index < this.tokens.length) ? \"at column \" + (this.tokens[index].index + 1) + \" in\" :\n \"at the end of the expression\";\n };\n /**\n * @return {?}\n */\n _ParseAST.prototype.skip = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter(chars.$SEMICOLON) &&\n (this.rparensExpected <= 0 || !n.isCharacter(chars.$RPAREN)) &&\n (this.rbracesExpected <= 0 || !n.isCharacter(chars.$RBRACE)) &&\n (this.rbracketsExpected <= 0 || !n.isCharacter(chars.$RBRACKET))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(/** @type {?} */ ((this.next.toString())), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n };\n return _ParseAST;\n}());\nexport { _ParseAST };\nfunction _ParseAST_tsickle_Closure_declarations() {\n /** @type {?} */\n _ParseAST.prototype.rparensExpected;\n /** @type {?} */\n _ParseAST.prototype.rbracketsExpected;\n /** @type {?} */\n _ParseAST.prototype.rbracesExpected;\n /** @type {?} */\n _ParseAST.prototype.index;\n /** @type {?} */\n _ParseAST.prototype.input;\n /** @type {?} */\n _ParseAST.prototype.location;\n /** @type {?} */\n _ParseAST.prototype.tokens;\n /** @type {?} */\n _ParseAST.prototype.inputLength;\n /** @type {?} */\n _ParseAST.prototype.parseAction;\n /** @type {?} */\n _ParseAST.prototype.errors;\n /** @type {?} */\n _ParseAST.prototype.offset;\n}\nvar SimpleExpressionChecker = /** @class */ (function () {\n function SimpleExpressionChecker() {\n this.errors = [];\n }\n /**\n * @param {?} ast\n * @return {?}\n */\n SimpleExpressionChecker.check = /**\n * @param {?} ast\n * @return {?}\n */\n function (ast) {\n var /** @type {?} */ s = new SimpleExpressionChecker();\n ast.visit(s);\n return s.errors;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitImplicitReceiver = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitInterpolation = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitLiteralPrimitive = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitPropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitPropertyWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitSafePropertyRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitSafeMethodCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitFunctionCall = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitLiteralArray = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { this.visitAll(ast.expressions); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitLiteralMap = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { this.visitAll(ast.values); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitBinary = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitPrefixNot = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitNonNullAssert = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitConditional = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitPipe = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { this.errors.push('pipes'); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitKeyedRead = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitKeyedWrite = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} asts\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitAll = /**\n * @param {?} asts\n * @return {?}\n */\n function (asts) {\n var _this = this;\n return asts.map(function (node) { return node.visit(_this); });\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitChain = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n SimpleExpressionChecker.prototype.visitQuote = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { };\n return SimpleExpressionChecker;\n}());\nfunction SimpleExpressionChecker_tsickle_Closure_declarations() {\n /** @type {?} */\n SimpleExpressionChecker.prototype.errors;\n}\n//# sourceMappingURL=parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nimport * as chars from './chars';\nimport { identifierModuleUrl, identifierName } from './compile_metadata';\nvar ParseLocation = /** @class */ (function () {\n function ParseLocation(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n /**\n * @return {?}\n */\n ParseLocation.prototype.toString = /**\n * @return {?}\n */\n function () {\n return this.offset != null ? this.file.url + \"@\" + this.line + \":\" + this.col : this.file.url;\n };\n /**\n * @param {?} delta\n * @return {?}\n */\n ParseLocation.prototype.moveBy = /**\n * @param {?} delta\n * @return {?}\n */\n function (delta) {\n var /** @type {?} */ source = this.file.content;\n var /** @type {?} */ len = source.length;\n var /** @type {?} */ offset = this.offset;\n var /** @type {?} */ line = this.line;\n var /** @type {?} */ col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n var /** @type {?} */ ch = source.charCodeAt(offset);\n if (ch == chars.$LF) {\n line--;\n var /** @type {?} */ priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode(chars.$LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n }\n else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n var /** @type {?} */ ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == chars.$LF) {\n line++;\n col = 0;\n }\n else {\n col++;\n }\n }\n return new ParseLocation(this.file, offset, line, col);\n };\n // Return the source around the location\n // Up to `maxChars` or `maxLines` on each side of the location\n /**\n * @param {?} maxChars\n * @param {?} maxLines\n * @return {?}\n */\n ParseLocation.prototype.getContext = /**\n * @param {?} maxChars\n * @param {?} maxLines\n * @return {?}\n */\n function (maxChars, maxLines) {\n var /** @type {?} */ content = this.file.content;\n var /** @type {?} */ startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n var /** @type {?} */ endOffset = startOffset;\n var /** @type {?} */ ctxChars = 0;\n var /** @type {?} */ ctxLines = 0;\n while (ctxChars < maxChars && startOffset > 0) {\n startOffset--;\n ctxChars++;\n if (content[startOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n ctxChars = 0;\n ctxLines = 0;\n while (ctxChars < maxChars && endOffset < content.length - 1) {\n endOffset++;\n ctxChars++;\n if (content[endOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n return {\n before: content.substring(startOffset, this.offset),\n after: content.substring(this.offset, endOffset + 1),\n };\n }\n return null;\n };\n return ParseLocation;\n}());\nexport { ParseLocation };\nfunction ParseLocation_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseLocation.prototype.file;\n /** @type {?} */\n ParseLocation.prototype.offset;\n /** @type {?} */\n ParseLocation.prototype.line;\n /** @type {?} */\n ParseLocation.prototype.col;\n}\nvar ParseSourceFile = /** @class */ (function () {\n function ParseSourceFile(content, url) {\n this.content = content;\n this.url = url;\n }\n return ParseSourceFile;\n}());\nexport { ParseSourceFile };\nfunction ParseSourceFile_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseSourceFile.prototype.content;\n /** @type {?} */\n ParseSourceFile.prototype.url;\n}\nvar ParseSourceSpan = /** @class */ (function () {\n function ParseSourceSpan(start, end, details) {\n if (details === void 0) { details = null; }\n this.start = start;\n this.end = end;\n this.details = details;\n }\n /**\n * @return {?}\n */\n ParseSourceSpan.prototype.toString = /**\n * @return {?}\n */\n function () {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n };\n return ParseSourceSpan;\n}());\nexport { ParseSourceSpan };\nfunction ParseSourceSpan_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseSourceSpan.prototype.start;\n /** @type {?} */\n ParseSourceSpan.prototype.end;\n /** @type {?} */\n ParseSourceSpan.prototype.details;\n}\n/** @enum {number} */\nvar ParseErrorLevel = {\n WARNING: 0,\n ERROR: 1,\n};\nexport { ParseErrorLevel };\nParseErrorLevel[ParseErrorLevel.WARNING] = \"WARNING\";\nParseErrorLevel[ParseErrorLevel.ERROR] = \"ERROR\";\nvar ParseError = /** @class */ (function () {\n function ParseError(span, msg, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n /**\n * @return {?}\n */\n ParseError.prototype.contextualMessage = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ ctx = this.span.start.getContext(100, 3);\n return ctx ? this.msg + \" (\\\"\" + ctx.before + \"[\" + ParseErrorLevel[this.level] + \" ->]\" + ctx.after + \"\\\")\" :\n this.msg;\n };\n /**\n * @return {?}\n */\n ParseError.prototype.toString = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ details = this.span.details ? \", \" + this.span.details : '';\n return this.contextualMessage() + \": \" + this.span.start + details;\n };\n return ParseError;\n}());\nexport { ParseError };\nfunction ParseError_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseError.prototype.span;\n /** @type {?} */\n ParseError.prototype.msg;\n /** @type {?} */\n ParseError.prototype.level;\n}\n/**\n * @param {?} kind\n * @param {?} type\n * @return {?}\n */\nexport function typeSourceSpan(kind, type) {\n var /** @type {?} */ moduleUrl = identifierModuleUrl(type);\n var /** @type {?} */ sourceFileName = moduleUrl != null ? \"in \" + kind + \" \" + identifierName(type) + \" in \" + moduleUrl :\n \"in \" + kind + \" \" + identifierName(type);\n var /** @type {?} */ sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n//# sourceMappingURL=parse_util.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport * as chars from '../chars';\nimport { ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan } from '../parse_util';\nimport { DEFAULT_INTERPOLATION_CONFIG } from './interpolation_config';\nimport { NAMED_ENTITIES, TagContentType } from './tags';\n/** @enum {number} */\nvar TokenType = {\n TAG_OPEN_START: 0,\n TAG_OPEN_END: 1,\n TAG_OPEN_END_VOID: 2,\n TAG_CLOSE: 3,\n TEXT: 4,\n ESCAPABLE_RAW_TEXT: 5,\n RAW_TEXT: 6,\n COMMENT_START: 7,\n COMMENT_END: 8,\n CDATA_START: 9,\n CDATA_END: 10,\n ATTR_NAME: 11,\n ATTR_VALUE: 12,\n DOC_TYPE: 13,\n EXPANSION_FORM_START: 14,\n EXPANSION_CASE_VALUE: 15,\n EXPANSION_CASE_EXP_START: 16,\n EXPANSION_CASE_EXP_END: 17,\n EXPANSION_FORM_END: 18,\n EOF: 19,\n};\nexport { TokenType };\nTokenType[TokenType.TAG_OPEN_START] = \"TAG_OPEN_START\";\nTokenType[TokenType.TAG_OPEN_END] = \"TAG_OPEN_END\";\nTokenType[TokenType.TAG_OPEN_END_VOID] = \"TAG_OPEN_END_VOID\";\nTokenType[TokenType.TAG_CLOSE] = \"TAG_CLOSE\";\nTokenType[TokenType.TEXT] = \"TEXT\";\nTokenType[TokenType.ESCAPABLE_RAW_TEXT] = \"ESCAPABLE_RAW_TEXT\";\nTokenType[TokenType.RAW_TEXT] = \"RAW_TEXT\";\nTokenType[TokenType.COMMENT_START] = \"COMMENT_START\";\nTokenType[TokenType.COMMENT_END] = \"COMMENT_END\";\nTokenType[TokenType.CDATA_START] = \"CDATA_START\";\nTokenType[TokenType.CDATA_END] = \"CDATA_END\";\nTokenType[TokenType.ATTR_NAME] = \"ATTR_NAME\";\nTokenType[TokenType.ATTR_VALUE] = \"ATTR_VALUE\";\nTokenType[TokenType.DOC_TYPE] = \"DOC_TYPE\";\nTokenType[TokenType.EXPANSION_FORM_START] = \"EXPANSION_FORM_START\";\nTokenType[TokenType.EXPANSION_CASE_VALUE] = \"EXPANSION_CASE_VALUE\";\nTokenType[TokenType.EXPANSION_CASE_EXP_START] = \"EXPANSION_CASE_EXP_START\";\nTokenType[TokenType.EXPANSION_CASE_EXP_END] = \"EXPANSION_CASE_EXP_END\";\nTokenType[TokenType.EXPANSION_FORM_END] = \"EXPANSION_FORM_END\";\nTokenType[TokenType.EOF] = \"EOF\";\nvar Token = /** @class */ (function () {\n function Token(type, parts, sourceSpan) {\n this.type = type;\n this.parts = parts;\n this.sourceSpan = sourceSpan;\n }\n return Token;\n}());\nexport { Token };\nfunction Token_tsickle_Closure_declarations() {\n /** @type {?} */\n Token.prototype.type;\n /** @type {?} */\n Token.prototype.parts;\n /** @type {?} */\n Token.prototype.sourceSpan;\n}\nvar TokenError = /** @class */ (function (_super) {\n tslib_1.__extends(TokenError, _super);\n function TokenError(errorMsg, tokenType, span) {\n var _this = _super.call(this, span, errorMsg) || this;\n _this.tokenType = tokenType;\n return _this;\n }\n return TokenError;\n}(ParseError));\nexport { TokenError };\nfunction TokenError_tsickle_Closure_declarations() {\n /** @type {?} */\n TokenError.prototype.tokenType;\n}\nvar TokenizeResult = /** @class */ (function () {\n function TokenizeResult(tokens, errors) {\n this.tokens = tokens;\n this.errors = errors;\n }\n return TokenizeResult;\n}());\nexport { TokenizeResult };\nfunction TokenizeResult_tsickle_Closure_declarations() {\n /** @type {?} */\n TokenizeResult.prototype.tokens;\n /** @type {?} */\n TokenizeResult.prototype.errors;\n}\n/**\n * @param {?} source\n * @param {?} url\n * @param {?} getTagDefinition\n * @param {?=} tokenizeExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\nexport function tokenize(source, url, getTagDefinition, tokenizeExpansionForms, interpolationConfig) {\n if (tokenizeExpansionForms === void 0) { tokenizeExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, tokenizeExpansionForms, interpolationConfig)\n .tokenize();\n}\nvar /** @type {?} */ _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\n/**\n * @param {?} charCode\n * @return {?}\n */\nfunction _unexpectedCharacterErrorMsg(charCode) {\n var /** @type {?} */ char = charCode === chars.$EOF ? 'EOF' : String.fromCharCode(charCode);\n return \"Unexpected character \\\"\" + char + \"\\\"\";\n}\n/**\n * @param {?} entitySrc\n * @return {?}\n */\nfunction _unknownEntityErrorMsg(entitySrc) {\n return \"Unknown entity \\\"\" + entitySrc + \"\\\" - use the \\\"&#;\\\" or \\\"&#x;\\\" syntax\";\n}\nvar _ControlFlowError = /** @class */ (function () {\n function _ControlFlowError(error) {\n this.error = error;\n }\n return _ControlFlowError;\n}());\nfunction _ControlFlowError_tsickle_Closure_declarations() {\n /** @type {?} */\n _ControlFlowError.prototype.error;\n}\nvar _Tokenizer = /** @class */ (function () {\n /**\n * @param _file The html source\n * @param _getTagDefinition\n * @param _tokenizeIcu Whether to tokenize ICU messages (considered as text nodes when false)\n * @param _interpolationConfig\n */\n function _Tokenizer(_file, _getTagDefinition, _tokenizeIcu, _interpolationConfig) {\n if (_interpolationConfig === void 0) { _interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._file = _file;\n this._getTagDefinition = _getTagDefinition;\n this._tokenizeIcu = _tokenizeIcu;\n this._interpolationConfig = _interpolationConfig;\n this._peek = -1;\n this._nextPeek = -1;\n this._index = -1;\n this._line = 0;\n this._column = -1;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this._input = _file.content;\n this._length = _file.content.length;\n this._advance();\n }\n /**\n * @param {?} content\n * @return {?}\n */\n _Tokenizer.prototype._processCarriageReturns = /**\n * @param {?} content\n * @return {?}\n */\n function (content) {\n // http://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream\n // In order to keep the original position in the source, we can not\n // pre-process it.\n // Instead CRs are processed right before instantiating the tokens.\n return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype.tokenize = /**\n * @return {?}\n */\n function () {\n while (this._peek !== chars.$EOF) {\n var /** @type {?} */ start = this._getLocation();\n try {\n if (this._attemptCharCode(chars.$LT)) {\n if (this._attemptCharCode(chars.$BANG)) {\n if (this._attemptCharCode(chars.$LBRACKET)) {\n this._consumeCdata(start);\n }\n else if (this._attemptCharCode(chars.$MINUS)) {\n this._consumeComment(start);\n }\n else {\n this._consumeDocType(start);\n }\n }\n else if (this._attemptCharCode(chars.$SLASH)) {\n this._consumeTagClose(start);\n }\n else {\n this._consumeTagOpen(start);\n }\n }\n else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n this._consumeText();\n }\n }\n catch (/** @type {?} */ e) {\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n }\n else {\n throw e;\n }\n }\n }\n this._beginToken(TokenType.EOF);\n this._endToken([]);\n return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);\n };\n /**\n * \\@internal\n * @return {?} whether an ICU token has been created\n */\n _Tokenizer.prototype._tokenizeExpansionForm = /**\n * \\@internal\n * @return {?} whether an ICU token has been created\n */\n function () {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._peek) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._peek === chars.$RBRACE) {\n if (this._isInExpansionCase()) {\n this._consumeExpansionCaseEnd();\n return true;\n }\n if (this._isInExpansionForm()) {\n this._consumeExpansionFormEnd();\n return true;\n }\n }\n return false;\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._getLocation = /**\n * @return {?}\n */\n function () {\n return new ParseLocation(this._file, this._index, this._line, this._column);\n };\n /**\n * @param {?=} start\n * @param {?=} end\n * @return {?}\n */\n _Tokenizer.prototype._getSpan = /**\n * @param {?=} start\n * @param {?=} end\n * @return {?}\n */\n function (start, end) {\n if (start === void 0) { start = this._getLocation(); }\n if (end === void 0) { end = this._getLocation(); }\n return new ParseSourceSpan(start, end);\n };\n /**\n * @param {?} type\n * @param {?=} start\n * @return {?}\n */\n _Tokenizer.prototype._beginToken = /**\n * @param {?} type\n * @param {?=} start\n * @return {?}\n */\n function (type, start) {\n if (start === void 0) { start = this._getLocation(); }\n this._currentTokenStart = start;\n this._currentTokenType = type;\n };\n /**\n * @param {?} parts\n * @param {?=} end\n * @return {?}\n */\n _Tokenizer.prototype._endToken = /**\n * @param {?} parts\n * @param {?=} end\n * @return {?}\n */\n function (parts, end) {\n if (end === void 0) { end = this._getLocation(); }\n var /** @type {?} */ token = new Token(this._currentTokenType, parts, new ParseSourceSpan(this._currentTokenStart, end));\n this.tokens.push(token);\n this._currentTokenStart = /** @type {?} */ ((null));\n this._currentTokenType = /** @type {?} */ ((null));\n return token;\n };\n /**\n * @param {?} msg\n * @param {?} span\n * @return {?}\n */\n _Tokenizer.prototype._createError = /**\n * @param {?} msg\n * @param {?} span\n * @return {?}\n */\n function (msg, span) {\n if (this._isInExpansionForm()) {\n msg += \" (Do you have an unescaped \\\"{\\\" in your template? Use \\\"{{ '{' }}\\\") to escape it.)\";\n }\n var /** @type {?} */ error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = /** @type {?} */ ((null));\n this._currentTokenType = /** @type {?} */ ((null));\n return new _ControlFlowError(error);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._advance = /**\n * @return {?}\n */\n function () {\n if (this._index >= this._length) {\n throw this._createError(_unexpectedCharacterErrorMsg(chars.$EOF), this._getSpan());\n }\n if (this._peek === chars.$LF) {\n this._line++;\n this._column = 0;\n }\n else if (this._peek !== chars.$LF && this._peek !== chars.$CR) {\n this._column++;\n }\n this._index++;\n this._peek = this._index >= this._length ? chars.$EOF : this._input.charCodeAt(this._index);\n this._nextPeek =\n this._index + 1 >= this._length ? chars.$EOF : this._input.charCodeAt(this._index + 1);\n };\n /**\n * @param {?} charCode\n * @return {?}\n */\n _Tokenizer.prototype._attemptCharCode = /**\n * @param {?} charCode\n * @return {?}\n */\n function (charCode) {\n if (this._peek === charCode) {\n this._advance();\n return true;\n }\n return false;\n };\n /**\n * @param {?} charCode\n * @return {?}\n */\n _Tokenizer.prototype._attemptCharCodeCaseInsensitive = /**\n * @param {?} charCode\n * @return {?}\n */\n function (charCode) {\n if (compareCharCodeCaseInsensitive(this._peek, charCode)) {\n this._advance();\n return true;\n }\n return false;\n };\n /**\n * @param {?} charCode\n * @return {?}\n */\n _Tokenizer.prototype._requireCharCode = /**\n * @param {?} charCode\n * @return {?}\n */\n function (charCode) {\n var /** @type {?} */ location = this._getLocation();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location, location));\n }\n };\n /**\n * @param {?} chars\n * @return {?}\n */\n _Tokenizer.prototype._attemptStr = /**\n * @param {?} chars\n * @return {?}\n */\n function (chars) {\n var /** @type {?} */ len = chars.length;\n if (this._index + len > this._length) {\n return false;\n }\n var /** @type {?} */ initialPosition = this._savePosition();\n for (var /** @type {?} */ i = 0; i < len; i++) {\n if (!this._attemptCharCode(chars.charCodeAt(i))) {\n // If attempting to parse the string fails, we want to reset the parser\n // to where it was before the attempt\n this._restorePosition(initialPosition);\n return false;\n }\n }\n return true;\n };\n /**\n * @param {?} chars\n * @return {?}\n */\n _Tokenizer.prototype._attemptStrCaseInsensitive = /**\n * @param {?} chars\n * @return {?}\n */\n function (chars) {\n for (var /** @type {?} */ i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n };\n /**\n * @param {?} chars\n * @return {?}\n */\n _Tokenizer.prototype._requireStr = /**\n * @param {?} chars\n * @return {?}\n */\n function (chars) {\n var /** @type {?} */ location = this._getLocation();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location));\n }\n };\n /**\n * @param {?} predicate\n * @return {?}\n */\n _Tokenizer.prototype._attemptCharCodeUntilFn = /**\n * @param {?} predicate\n * @return {?}\n */\n function (predicate) {\n while (!predicate(this._peek)) {\n this._advance();\n }\n };\n /**\n * @param {?} predicate\n * @param {?} len\n * @return {?}\n */\n _Tokenizer.prototype._requireCharCodeUntilFn = /**\n * @param {?} predicate\n * @param {?} len\n * @return {?}\n */\n function (predicate, len) {\n var /** @type {?} */ start = this._getLocation();\n this._attemptCharCodeUntilFn(predicate);\n if (this._index - start.offset < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(start, start));\n }\n };\n /**\n * @param {?} char\n * @return {?}\n */\n _Tokenizer.prototype._attemptUntilChar = /**\n * @param {?} char\n * @return {?}\n */\n function (char) {\n while (this._peek !== char) {\n this._advance();\n }\n };\n /**\n * @param {?} decodeEntities\n * @return {?}\n */\n _Tokenizer.prototype._readChar = /**\n * @param {?} decodeEntities\n * @return {?}\n */\n function (decodeEntities) {\n if (decodeEntities && this._peek === chars.$AMPERSAND) {\n return this._decodeEntity();\n }\n else {\n var /** @type {?} */ index = this._index;\n this._advance();\n return this._input[index];\n }\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._decodeEntity = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this._getLocation();\n this._advance();\n if (this._attemptCharCode(chars.$HASH)) {\n var /** @type {?} */ isHex = this._attemptCharCode(chars.$x) || this._attemptCharCode(chars.$X);\n var /** @type {?} */ numberStart = this._getLocation().offset;\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._peek != chars.$SEMICOLON) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n this._advance();\n var /** @type {?} */ strNum = this._input.substring(numberStart, this._index - 1);\n try {\n var /** @type {?} */ charCode = parseInt(strNum, isHex ? 16 : 10);\n return String.fromCharCode(charCode);\n }\n catch (/** @type {?} */ e) {\n var /** @type {?} */ entity = this._input.substring(start.offset + 1, this._index - 1);\n throw this._createError(_unknownEntityErrorMsg(entity), this._getSpan(start));\n }\n }\n else {\n var /** @type {?} */ startPosition = this._savePosition();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._peek != chars.$SEMICOLON) {\n this._restorePosition(startPosition);\n return '&';\n }\n this._advance();\n var /** @type {?} */ name_1 = this._input.substring(start.offset + 1, this._index - 1);\n var /** @type {?} */ char = NAMED_ENTITIES[name_1];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name_1), this._getSpan(start));\n }\n return char;\n }\n };\n /**\n * @param {?} decodeEntities\n * @param {?} firstCharOfEnd\n * @param {?} attemptEndRest\n * @return {?}\n */\n _Tokenizer.prototype._consumeRawText = /**\n * @param {?} decodeEntities\n * @param {?} firstCharOfEnd\n * @param {?} attemptEndRest\n * @return {?}\n */\n function (decodeEntities, firstCharOfEnd, attemptEndRest) {\n var /** @type {?} */ tagCloseStart;\n var /** @type {?} */ textStart = this._getLocation();\n this._beginToken(decodeEntities ? TokenType.ESCAPABLE_RAW_TEXT : TokenType.RAW_TEXT, textStart);\n var /** @type {?} */ parts = [];\n while (true) {\n tagCloseStart = this._getLocation();\n if (this._attemptCharCode(firstCharOfEnd) && attemptEndRest()) {\n break;\n }\n if (this._index > tagCloseStart.offset) {\n // add the characters consumed by the previous if statement to the output\n parts.push(this._input.substring(tagCloseStart.offset, this._index));\n }\n while (this._peek !== firstCharOfEnd) {\n parts.push(this._readChar(decodeEntities));\n }\n }\n return this._endToken([this._processCarriageReturns(parts.join(''))], tagCloseStart);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeComment = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n var _this = this;\n this._beginToken(TokenType.COMMENT_START, start);\n this._requireCharCode(chars.$MINUS);\n this._endToken([]);\n var /** @type {?} */ textToken = this._consumeRawText(false, chars.$MINUS, function () { return _this._attemptStr('->'); });\n this._beginToken(TokenType.COMMENT_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeCdata = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n var _this = this;\n this._beginToken(TokenType.CDATA_START, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n var /** @type {?} */ textToken = this._consumeRawText(false, chars.$RBRACKET, function () { return _this._attemptStr(']>'); });\n this._beginToken(TokenType.CDATA_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeDocType = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n this._beginToken(TokenType.DOC_TYPE, start);\n this._attemptUntilChar(chars.$GT);\n this._advance();\n this._endToken([this._input.substring(start.offset + 2, this._index - 1)]);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumePrefixAndName = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ nameOrPrefixStart = this._index;\n var /** @type {?} */ prefix = /** @type {?} */ ((null));\n while (this._peek !== chars.$COLON && !isPrefixEnd(this._peek)) {\n this._advance();\n }\n var /** @type {?} */ nameStart;\n if (this._peek === chars.$COLON) {\n this._advance();\n prefix = this._input.substring(nameOrPrefixStart, this._index - 1);\n nameStart = this._index;\n }\n else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, this._index === nameStart ? 1 : 0);\n var /** @type {?} */ name = this._input.substring(nameStart, this._index);\n return [prefix, name];\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeTagOpen = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n var /** @type {?} */ savedPos = this._savePosition();\n var /** @type {?} */ tagName;\n var /** @type {?} */ lowercaseTagName;\n try {\n if (!chars.isAsciiLetter(this._peek)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n var /** @type {?} */ nameStart = this._index;\n this._consumeTagOpenStart(start);\n tagName = this._input.substring(nameStart, this._index);\n lowercaseTagName = tagName.toLowerCase();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._peek !== chars.$SLASH && this._peek !== chars.$GT) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode(chars.$EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n }\n catch (/** @type {?} */ e) {\n if (e instanceof _ControlFlowError) {\n // When the start tag is invalid, assume we want a \"<\"\n this._restorePosition(savedPos);\n // Back to back text tokens are merged at the end\n this._beginToken(TokenType.TEXT, start);\n this._endToken(['<']);\n return;\n }\n throw e;\n }\n var /** @type {?} */ contentTokenType = this._getTagDefinition(tagName).contentType;\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, false);\n }\n else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, true);\n }\n };\n /**\n * @param {?} lowercaseTagName\n * @param {?} decodeEntities\n * @return {?}\n */\n _Tokenizer.prototype._consumeRawTextWithTagClose = /**\n * @param {?} lowercaseTagName\n * @param {?} decodeEntities\n * @return {?}\n */\n function (lowercaseTagName, decodeEntities) {\n var _this = this;\n var /** @type {?} */ textToken = this._consumeRawText(decodeEntities, chars.$LT, function () {\n if (!_this._attemptCharCode(chars.$SLASH))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!_this._attemptStrCaseInsensitive(lowercaseTagName))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n return _this._attemptCharCode(chars.$GT);\n });\n this._beginToken(TokenType.TAG_CLOSE, textToken.sourceSpan.end);\n this._endToken([/** @type {?} */ ((null)), lowercaseTagName]);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeTagOpenStart = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n this._beginToken(TokenType.TAG_OPEN_START, start);\n var /** @type {?} */ parts = this._consumePrefixAndName();\n this._endToken(parts);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeAttributeName = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.ATTR_NAME);\n var /** @type {?} */ prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeAttributeValue = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.ATTR_VALUE);\n var /** @type {?} */ value;\n if (this._peek === chars.$SQ || this._peek === chars.$DQ) {\n var /** @type {?} */ quoteChar = this._peek;\n this._advance();\n var /** @type {?} */ parts = [];\n while (this._peek !== quoteChar) {\n parts.push(this._readChar(true));\n }\n value = parts.join('');\n this._advance();\n }\n else {\n var /** @type {?} */ valueStart = this._index;\n this._requireCharCodeUntilFn(isNameEnd, 1);\n value = this._input.substring(valueStart, this._index);\n }\n this._endToken([this._processCarriageReturns(value)]);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeTagOpenEnd = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ tokenType = this._attemptCharCode(chars.$SLASH) ? TokenType.TAG_OPEN_END_VOID : TokenType.TAG_OPEN_END;\n this._beginToken(tokenType);\n this._requireCharCode(chars.$GT);\n this._endToken([]);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _Tokenizer.prototype._consumeTagClose = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n this._beginToken(TokenType.TAG_CLOSE, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n var /** @type {?} */ prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode(chars.$GT);\n this._endToken(prefixAndName);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeExpansionFormStart = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.EXPANSION_FORM_START, this._getLocation());\n this._requireCharCode(chars.$LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(TokenType.EXPANSION_FORM_START);\n this._beginToken(TokenType.RAW_TEXT, this._getLocation());\n var /** @type {?} */ condition = this._readUntil(chars.$COMMA);\n this._endToken([condition], this._getLocation());\n this._requireCharCode(chars.$COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType.RAW_TEXT, this._getLocation());\n var /** @type {?} */ type = this._readUntil(chars.$COMMA);\n this._endToken([type], this._getLocation());\n this._requireCharCode(chars.$COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeExpansionCaseStart = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.EXPANSION_CASE_VALUE, this._getLocation());\n var /** @type {?} */ value = this._readUntil(chars.$LBRACE).trim();\n this._endToken([value], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType.EXPANSION_CASE_EXP_START, this._getLocation());\n this._requireCharCode(chars.$LBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(TokenType.EXPANSION_CASE_EXP_START);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeExpansionCaseEnd = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.EXPANSION_CASE_EXP_END, this._getLocation());\n this._requireCharCode(chars.$RBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeExpansionFormEnd = /**\n * @return {?}\n */\n function () {\n this._beginToken(TokenType.EXPANSION_FORM_END, this._getLocation());\n this._requireCharCode(chars.$RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._consumeText = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ start = this._getLocation();\n this._beginToken(TokenType.TEXT, start);\n var /** @type {?} */ parts = [];\n do {\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n parts.push(this._interpolationConfig.start);\n this._inInterpolation = true;\n }\n else if (this._interpolationConfig && this._inInterpolation &&\n this._attemptStr(this._interpolationConfig.end)) {\n parts.push(this._interpolationConfig.end);\n this._inInterpolation = false;\n }\n else {\n parts.push(this._readChar(true));\n }\n } while (!this._isTextEnd());\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._isTextEnd = /**\n * @return {?}\n */\n function () {\n if (this._peek === chars.$LT || this._peek === chars.$EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n // start of an expansion form\n return true;\n }\n if (this._peek === chars.$RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._savePosition = /**\n * @return {?}\n */\n function () {\n return [this._peek, this._index, this._column, this._line, this.tokens.length];\n };\n /**\n * @param {?} char\n * @return {?}\n */\n _Tokenizer.prototype._readUntil = /**\n * @param {?} char\n * @return {?}\n */\n function (char) {\n var /** @type {?} */ start = this._index;\n this._attemptUntilChar(char);\n return this._input.substring(start, this._index);\n };\n /**\n * @param {?} position\n * @return {?}\n */\n _Tokenizer.prototype._restorePosition = /**\n * @param {?} position\n * @return {?}\n */\n function (position) {\n this._peek = position[0];\n this._index = position[1];\n this._column = position[2];\n this._line = position[3];\n var /** @type {?} */ nbTokens = position[4];\n if (nbTokens < this.tokens.length) {\n // remove any extra tokens\n this.tokens = this.tokens.slice(0, nbTokens);\n }\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._isInExpansionCase = /**\n * @return {?}\n */\n function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType.EXPANSION_CASE_EXP_START;\n };\n /**\n * @return {?}\n */\n _Tokenizer.prototype._isInExpansionForm = /**\n * @return {?}\n */\n function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType.EXPANSION_FORM_START;\n };\n return _Tokenizer;\n}());\nfunction _Tokenizer_tsickle_Closure_declarations() {\n /** @type {?} */\n _Tokenizer.prototype._input;\n /** @type {?} */\n _Tokenizer.prototype._length;\n /** @type {?} */\n _Tokenizer.prototype._peek;\n /** @type {?} */\n _Tokenizer.prototype._nextPeek;\n /** @type {?} */\n _Tokenizer.prototype._index;\n /** @type {?} */\n _Tokenizer.prototype._line;\n /** @type {?} */\n _Tokenizer.prototype._column;\n /** @type {?} */\n _Tokenizer.prototype._currentTokenStart;\n /** @type {?} */\n _Tokenizer.prototype._currentTokenType;\n /** @type {?} */\n _Tokenizer.prototype._expansionCaseStack;\n /** @type {?} */\n _Tokenizer.prototype._inInterpolation;\n /** @type {?} */\n _Tokenizer.prototype.tokens;\n /** @type {?} */\n _Tokenizer.prototype.errors;\n /** @type {?} */\n _Tokenizer.prototype._file;\n /** @type {?} */\n _Tokenizer.prototype._getTagDefinition;\n /** @type {?} */\n _Tokenizer.prototype._tokenizeIcu;\n /** @type {?} */\n _Tokenizer.prototype._interpolationConfig;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isNotWhitespace(code) {\n return !chars.isWhitespace(code) || code === chars.$EOF;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isNameEnd(code) {\n return chars.isWhitespace(code) || code === chars.$GT || code === chars.$SLASH ||\n code === chars.$SQ || code === chars.$DQ || code === chars.$EQ;\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isPrefixEnd(code) {\n return (code < chars.$a || chars.$z < code) && (code < chars.$A || chars.$Z < code) &&\n (code < chars.$0 || code > chars.$9);\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isDigitEntityEnd(code) {\n return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiHexDigit(code);\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction isNamedEntityEnd(code) {\n return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiLetter(code);\n}\n/**\n * @param {?} input\n * @param {?} offset\n * @param {?} interpolationConfig\n * @return {?}\n */\nfunction isExpansionFormStart(input, offset, interpolationConfig) {\n var /** @type {?} */ isInterpolationStart = interpolationConfig ? input.indexOf(interpolationConfig.start, offset) == offset : false;\n return input.charCodeAt(offset) == chars.$LBRACE && !isInterpolationStart;\n}\n/**\n * @param {?} peek\n * @return {?}\n */\nfunction isExpansionCaseStart(peek) {\n return peek === chars.$EQ || chars.isAsciiLetter(peek) || chars.isDigit(peek);\n}\n/**\n * @param {?} code1\n * @param {?} code2\n * @return {?}\n */\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);\n}\n/**\n * @param {?} code\n * @return {?}\n */\nfunction toUpperCaseCharCode(code) {\n return code >= chars.$a && code <= chars.$z ? code - chars.$a + chars.$A : code;\n}\n/**\n * @param {?} srcTokens\n * @return {?}\n */\nfunction mergeTextTokens(srcTokens) {\n var /** @type {?} */ dstTokens = [];\n var /** @type {?} */ lastDstToken = undefined;\n for (var /** @type {?} */ i = 0; i < srcTokens.length; i++) {\n var /** @type {?} */ token = srcTokens[i];\n if (lastDstToken && lastDstToken.type == TokenType.TEXT && token.type == TokenType.TEXT) {\n lastDstToken.parts[0] += token.parts[0];\n lastDstToken.sourceSpan.end = token.sourceSpan.end;\n }\n else {\n lastDstToken = token;\n dstTokens.push(lastDstToken);\n }\n }\n return dstTokens;\n}\n//# sourceMappingURL=lexer.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { ParseError, ParseSourceSpan } from '../parse_util';\nimport * as html from './ast';\nimport { DEFAULT_INTERPOLATION_CONFIG } from './interpolation_config';\nimport * as lex from './lexer';\nimport { getNsPrefix, isNgContainer, mergeNsAndName } from './tags';\nvar TreeError = /** @class */ (function (_super) {\n tslib_1.__extends(TreeError, _super);\n function TreeError(elementName, span, msg) {\n var _this = _super.call(this, span, msg) || this;\n _this.elementName = elementName;\n return _this;\n }\n /**\n * @param {?} elementName\n * @param {?} span\n * @param {?} msg\n * @return {?}\n */\n TreeError.create = /**\n * @param {?} elementName\n * @param {?} span\n * @param {?} msg\n * @return {?}\n */\n function (elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n };\n return TreeError;\n}(ParseError));\nexport { TreeError };\nfunction TreeError_tsickle_Closure_declarations() {\n /** @type {?} */\n TreeError.prototype.elementName;\n}\nvar ParseTreeResult = /** @class */ (function () {\n function ParseTreeResult(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n return ParseTreeResult;\n}());\nexport { ParseTreeResult };\nfunction ParseTreeResult_tsickle_Closure_declarations() {\n /** @type {?} */\n ParseTreeResult.prototype.rootNodes;\n /** @type {?} */\n ParseTreeResult.prototype.errors;\n}\nvar Parser = /** @class */ (function () {\n function Parser(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n Parser.prototype.parse = /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ tokensAndErrors = lex.tokenize(source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);\n var /** @type {?} */ treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();\n return new ParseTreeResult(treeAndErrors.rootNodes, (/** @type {?} */ (tokensAndErrors.errors)).concat(treeAndErrors.errors));\n };\n return Parser;\n}());\nexport { Parser };\nfunction Parser_tsickle_Closure_declarations() {\n /** @type {?} */\n Parser.prototype.getTagDefinition;\n}\nvar _TreeBuilder = /** @class */ (function () {\n function _TreeBuilder(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._rootNodes = [];\n this._errors = [];\n this._elementStack = [];\n this._advance();\n }\n /**\n * @return {?}\n */\n _TreeBuilder.prototype.build = /**\n * @return {?}\n */\n function () {\n while (this._peek.type !== lex.TokenType.EOF) {\n if (this._peek.type === lex.TokenType.TAG_OPEN_START) {\n this._consumeStartTag(this._advance());\n }\n else if (this._peek.type === lex.TokenType.TAG_CLOSE) {\n this._consumeEndTag(this._advance());\n }\n else if (this._peek.type === lex.TokenType.CDATA_START) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n }\n else if (this._peek.type === lex.TokenType.COMMENT_START) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n }\n else if (this._peek.type === lex.TokenType.TEXT || this._peek.type === lex.TokenType.RAW_TEXT ||\n this._peek.type === lex.TokenType.ESCAPABLE_RAW_TEXT) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n }\n else if (this._peek.type === lex.TokenType.EXPANSION_FORM_START) {\n this._consumeExpansion(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n return new ParseTreeResult(this._rootNodes, this._errors);\n };\n /**\n * @return {?}\n */\n _TreeBuilder.prototype._advance = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ prev = this._peek;\n if (this._index < this.tokens.length - 1) {\n // Note: there is always an EOF token at the end\n this._index++;\n }\n this._peek = this.tokens[this._index];\n return prev;\n };\n /**\n * @param {?} type\n * @return {?}\n */\n _TreeBuilder.prototype._advanceIf = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n };\n /**\n * @param {?} startToken\n * @return {?}\n */\n _TreeBuilder.prototype._consumeCdata = /**\n * @param {?} startToken\n * @return {?}\n */\n function (startToken) {\n this._consumeText(this._advance());\n this._advanceIf(lex.TokenType.CDATA_END);\n };\n /**\n * @param {?} token\n * @return {?}\n */\n _TreeBuilder.prototype._consumeComment = /**\n * @param {?} token\n * @return {?}\n */\n function (token) {\n var /** @type {?} */ text = this._advanceIf(lex.TokenType.RAW_TEXT);\n this._advanceIf(lex.TokenType.COMMENT_END);\n var /** @type {?} */ value = text != null ? text.parts[0].trim() : null;\n this._addToParent(new html.Comment(value, token.sourceSpan));\n };\n /**\n * @param {?} token\n * @return {?}\n */\n _TreeBuilder.prototype._consumeExpansion = /**\n * @param {?} token\n * @return {?}\n */\n function (token) {\n var /** @type {?} */ switchValue = this._advance();\n var /** @type {?} */ type = this._advance();\n var /** @type {?} */ cases = [];\n // read =\n while (this._peek.type === lex.TokenType.EXPANSION_CASE_VALUE) {\n var /** @type {?} */ expCase = this._parseExpansionCase();\n if (!expCase)\n return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== lex.TokenType.EXPANSION_FORM_END) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return;\n }\n var /** @type {?} */ sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end);\n this._addToParent(new html.Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n };\n /**\n * @return {?}\n */\n _TreeBuilder.prototype._parseExpansionCase = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ value = this._advance();\n // read {\n if (this._peek.type !== lex.TokenType.EXPANSION_CASE_EXP_START) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '{'.\"));\n return null;\n }\n // read until }\n var /** @type {?} */ start = this._advance();\n var /** @type {?} */ exp = this._collectExpansionExpTokens(start);\n if (!exp)\n return null;\n var /** @type {?} */ end = this._advance();\n exp.push(new lex.Token(lex.TokenType.EOF, [], end.sourceSpan));\n // parse everything in between { and }\n var /** @type {?} */ parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();\n if (parsedExp.errors.length > 0) {\n this._errors = this._errors.concat(/** @type {?} */ (parsedExp.errors));\n return null;\n }\n var /** @type {?} */ sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);\n var /** @type {?} */ expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);\n return new html.ExpansionCase(value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n };\n /**\n * @param {?} start\n * @return {?}\n */\n _TreeBuilder.prototype._collectExpansionExpTokens = /**\n * @param {?} start\n * @return {?}\n */\n function (start) {\n var /** @type {?} */ exp = [];\n var /** @type {?} */ expansionFormStack = [lex.TokenType.EXPANSION_CASE_EXP_START];\n while (true) {\n if (this._peek.type === lex.TokenType.EXPANSION_FORM_START ||\n this._peek.type === lex.TokenType.EXPANSION_CASE_EXP_START) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === lex.TokenType.EXPANSION_CASE_EXP_END) {\n if (lastOnStack(expansionFormStack, lex.TokenType.EXPANSION_CASE_EXP_START)) {\n expansionFormStack.pop();\n if (expansionFormStack.length == 0)\n return exp;\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === lex.TokenType.EXPANSION_FORM_END) {\n if (lastOnStack(expansionFormStack, lex.TokenType.EXPANSION_FORM_START)) {\n expansionFormStack.pop();\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === lex.TokenType.EOF) {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n exp.push(this._advance());\n }\n };\n /**\n * @param {?} token\n * @return {?}\n */\n _TreeBuilder.prototype._consumeText = /**\n * @param {?} token\n * @return {?}\n */\n function (token) {\n var /** @type {?} */ text = token.parts[0];\n if (text.length > 0 && text[0] == '\\n') {\n var /** @type {?} */ parent_1 = this._getParentElement();\n if (parent_1 != null && parent_1.children.length == 0 &&\n this.getTagDefinition(parent_1.name).ignoreFirstLf) {\n text = text.substring(1);\n }\n }\n if (text.length > 0) {\n this._addToParent(new html.Text(text, token.sourceSpan));\n }\n };\n /**\n * @return {?}\n */\n _TreeBuilder.prototype._closeVoidElement = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ el = this._getParentElement();\n if (el && this.getTagDefinition(el.name).isVoid) {\n this._elementStack.pop();\n }\n };\n /**\n * @param {?} startTagToken\n * @return {?}\n */\n _TreeBuilder.prototype._consumeStartTag = /**\n * @param {?} startTagToken\n * @return {?}\n */\n function (startTagToken) {\n var /** @type {?} */ prefix = startTagToken.parts[0];\n var /** @type {?} */ name = startTagToken.parts[1];\n var /** @type {?} */ attrs = [];\n while (this._peek.type === lex.TokenType.ATTR_NAME) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n var /** @type {?} */ fullName = this._getElementFullName(prefix, name, this._getParentElement());\n var /** @type {?} */ selfClosing = false;\n // Note: There could have been a tokenizer error\n // so that we don't get a token for the end tag...\n if (this._peek.type === lex.TokenType.TAG_OPEN_END_VOID) {\n this._advance();\n selfClosing = true;\n var /** @type {?} */ tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this._errors.push(TreeError.create(fullName, startTagToken.sourceSpan, \"Only void and foreign elements can be self closed \\\"\" + startTagToken.parts[1] + \"\\\"\"));\n }\n }\n else if (this._peek.type === lex.TokenType.TAG_OPEN_END) {\n this._advance();\n selfClosing = false;\n }\n var /** @type {?} */ end = this._peek.sourceSpan.start;\n var /** @type {?} */ span = new ParseSourceSpan(startTagToken.sourceSpan.start, end);\n var /** @type {?} */ el = new html.Element(fullName, attrs, [], span, span, undefined);\n this._pushElement(el);\n if (selfClosing) {\n this._popElement(fullName);\n el.endSourceSpan = span;\n }\n };\n /**\n * @param {?} el\n * @return {?}\n */\n _TreeBuilder.prototype._pushElement = /**\n * @param {?} el\n * @return {?}\n */\n function (el) {\n var /** @type {?} */ parentEl = this._getParentElement();\n if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n this._elementStack.pop();\n }\n var /** @type {?} */ tagDef = this.getTagDefinition(el.name);\n var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;\n if (parent && tagDef.requireExtraParent(parent.name)) {\n var /** @type {?} */ newParent = new html.Element(tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n this._insertBeforeContainer(parent, container, newParent);\n }\n this._addToParent(el);\n this._elementStack.push(el);\n };\n /**\n * @param {?} endTagToken\n * @return {?}\n */\n _TreeBuilder.prototype._consumeEndTag = /**\n * @param {?} endTagToken\n * @return {?}\n */\n function (endTagToken) {\n var /** @type {?} */ fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n if (this._getParentElement()) {\n /** @type {?} */ ((this._getParentElement())).endSourceSpan = endTagToken.sourceSpan;\n }\n if (this.getTagDefinition(fullName).isVoid) {\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, \"Void elements do not have end tags \\\"\" + endTagToken.parts[1] + \"\\\"\"));\n }\n else if (!this._popElement(fullName)) {\n var /** @type {?} */ errMsg = \"Unexpected closing tag \\\"\" + fullName + \"\\\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags\";\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n }\n };\n /**\n * @param {?} fullName\n * @return {?}\n */\n _TreeBuilder.prototype._popElement = /**\n * @param {?} fullName\n * @return {?}\n */\n function (fullName) {\n for (var /** @type {?} */ stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n var /** @type {?} */ el = this._elementStack[stackIndex];\n if (el.name == fullName) {\n this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n return true;\n }\n if (!this.getTagDefinition(el.name).closedByParent) {\n return false;\n }\n }\n return false;\n };\n /**\n * @param {?} attrName\n * @return {?}\n */\n _TreeBuilder.prototype._consumeAttr = /**\n * @param {?} attrName\n * @return {?}\n */\n function (attrName) {\n var /** @type {?} */ fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n var /** @type {?} */ end = attrName.sourceSpan.end;\n var /** @type {?} */ value = '';\n var /** @type {?} */ valueSpan = /** @type {?} */ ((undefined));\n if (this._peek.type === lex.TokenType.ATTR_VALUE) {\n var /** @type {?} */ valueToken = this._advance();\n value = valueToken.parts[0];\n end = valueToken.sourceSpan.end;\n valueSpan = valueToken.sourceSpan;\n }\n return new html.Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);\n };\n /**\n * @return {?}\n */\n _TreeBuilder.prototype._getParentElement = /**\n * @return {?}\n */\n function () {\n return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n };\n /**\n * Returns the parent in the DOM and the container.\n *\n * `` elements are skipped as they are not rendered as DOM element.\n * @return {?}\n */\n _TreeBuilder.prototype._getParentElementSkippingContainers = /**\n * Returns the parent in the DOM and the container.\n *\n * `` elements are skipped as they are not rendered as DOM element.\n * @return {?}\n */\n function () {\n var /** @type {?} */ container = null;\n for (var /** @type {?} */ i = this._elementStack.length - 1; i >= 0; i--) {\n if (!isNgContainer(this._elementStack[i].name)) {\n return { parent: this._elementStack[i], container: container };\n }\n container = this._elementStack[i];\n }\n return { parent: null, container: container };\n };\n /**\n * @param {?} node\n * @return {?}\n */\n _TreeBuilder.prototype._addToParent = /**\n * @param {?} node\n * @return {?}\n */\n function (node) {\n var /** @type {?} */ parent = this._getParentElement();\n if (parent != null) {\n parent.children.push(node);\n }\n else {\n this._rootNodes.push(node);\n }\n };\n /**\n * Insert a node between the parent and the container.\n * When no container is given, the node is appended as a child of the parent.\n * Also updates the element stack accordingly.\n *\n * \\@internal\n * @param {?} parent\n * @param {?} container\n * @param {?} node\n * @return {?}\n */\n _TreeBuilder.prototype._insertBeforeContainer = /**\n * Insert a node between the parent and the container.\n * When no container is given, the node is appended as a child of the parent.\n * Also updates the element stack accordingly.\n *\n * \\@internal\n * @param {?} parent\n * @param {?} container\n * @param {?} node\n * @return {?}\n */\n function (parent, container, node) {\n if (!container) {\n this._addToParent(node);\n this._elementStack.push(node);\n }\n else {\n if (parent) {\n // replace the container with the new node in the children\n var /** @type {?} */ index = parent.children.indexOf(container);\n parent.children[index] = node;\n }\n else {\n this._rootNodes.push(node);\n }\n node.children.push(container);\n this._elementStack.splice(this._elementStack.indexOf(container), 0, node);\n }\n };\n /**\n * @param {?} prefix\n * @param {?} localName\n * @param {?} parentElement\n * @return {?}\n */\n _TreeBuilder.prototype._getElementFullName = /**\n * @param {?} prefix\n * @param {?} localName\n * @param {?} parentElement\n * @return {?}\n */\n function (prefix, localName, parentElement) {\n if (prefix == null) {\n prefix = /** @type {?} */ ((this.getTagDefinition(localName).implicitNamespacePrefix));\n if (prefix == null && parentElement != null) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n return mergeNsAndName(prefix, localName);\n };\n return _TreeBuilder;\n}());\nfunction _TreeBuilder_tsickle_Closure_declarations() {\n /** @type {?} */\n _TreeBuilder.prototype._index;\n /** @type {?} */\n _TreeBuilder.prototype._peek;\n /** @type {?} */\n _TreeBuilder.prototype._rootNodes;\n /** @type {?} */\n _TreeBuilder.prototype._errors;\n /** @type {?} */\n _TreeBuilder.prototype._elementStack;\n /** @type {?} */\n _TreeBuilder.prototype.tokens;\n /** @type {?} */\n _TreeBuilder.prototype.getTagDefinition;\n}\n/**\n * @param {?} stack\n * @param {?} element\n * @return {?}\n */\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\n}\n//# sourceMappingURL=parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { utf8Encode } from '../util';\n/**\n * @param {?} message\n * @return {?}\n */\nexport function digest(message) {\n return message.id || sha1(serializeNodes(message.nodes).join('') + (\"[\" + message.meaning + \"]\"));\n}\n/**\n * @param {?} message\n * @return {?}\n */\nexport function decimalDigest(message) {\n if (message.id) {\n return message.id;\n }\n var /** @type {?} */ visitor = new _SerializerIgnoreIcuExpVisitor();\n var /** @type {?} */ parts = message.nodes.map(function (a) { return a.visit(visitor, null); });\n return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * \\@internal\n */\nvar /**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * \\@internal\n */\n_SerializerVisitor = /** @class */ (function () {\n function _SerializerVisitor() {\n }\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { return text.value; };\n /**\n * @param {?} container\n * @param {?} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n return \"[\" + container.children.map(function (child) { return child.visit(_this); }).join(', ') + \"]\";\n };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ strCases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n return \"{\" + icu.expression + \", \" + icu.type + \", \" + strCases.join(', ') + \"}\";\n };\n /**\n * @param {?} ph\n * @param {?} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?} context\n * @return {?}\n */\n function (ph, context) {\n var _this = this;\n return ph.isVoid ?\n \"\" :\n \"\" + ph.children.map(function (child) { return child.visit(_this); }).join(', ') + \"\";\n };\n /**\n * @param {?} ph\n * @param {?} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?} context\n * @return {?}\n */\n function (ph, context) {\n return ph.value ? \"\" + ph.value + \"\" : \"\";\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _SerializerVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n return \"\" + ph.value.visit(this) + \"\";\n };\n return _SerializerVisitor;\n}());\nvar /** @type {?} */ serializerVisitor = new _SerializerVisitor();\n/**\n * @param {?} nodes\n * @return {?}\n */\nexport function serializeNodes(nodes) {\n return nodes.map(function (a) { return a.visit(serializerVisitor, null); });\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * \\@internal\n */\nvar /**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * \\@internal\n */\n_SerializerIgnoreIcuExpVisitor = /** @class */ (function (_super) {\n tslib_1.__extends(_SerializerIgnoreIcuExpVisitor, _super);\n function _SerializerIgnoreIcuExpVisitor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n _SerializerIgnoreIcuExpVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ strCases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n // Do not take the expression into account\n return \"{\" + icu.type + \", \" + strCases.join(', ') + \"}\";\n };\n return _SerializerIgnoreIcuExpVisitor;\n}(_SerializerVisitor));\n/**\n * Compute the SHA1 of the given string\n *\n * see http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n * @param {?} str\n * @return {?}\n */\nexport function sha1(str) {\n var /** @type {?} */ utf8 = utf8Encode(str);\n var /** @type {?} */ words32 = stringToWords32(utf8, Endian.Big);\n var /** @type {?} */ len = utf8.length * 8;\n var /** @type {?} */ w = new Array(80);\n var _a = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0], a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4];\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (var /** @type {?} */ i = 0; i < words32.length; i += 16) {\n var _b = [a, b, c, d, e], h0 = _b[0], h1 = _b[1], h2 = _b[2], h3 = _b[3], h4 = _b[4];\n for (var /** @type {?} */ j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n }\n else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n var _c = fk(j, b, c, d), f = _c[0], k = _c[1];\n var /** @type {?} */ temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n _d = [d, c, rol32(b, 30), a, temp], e = _d[0], d = _d[1], c = _d[2], b = _d[3], a = _d[4];\n }\n _e = [add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)], a = _e[0], b = _e[1], c = _e[2], d = _e[3], e = _e[4];\n }\n return byteStringToHexString(words32ToByteString([a, b, c, d, e]));\n var _d, _e;\n}\n/**\n * @param {?} index\n * @param {?} b\n * @param {?} c\n * @param {?} d\n * @return {?}\n */\nfunction fk(index, b, c, d) {\n if (index < 20) {\n return [(b & c) | (~b & d), 0x5a827999];\n }\n if (index < 40) {\n return [b ^ c ^ d, 0x6ed9eba1];\n }\n if (index < 60) {\n return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n }\n return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n * @param {?} str\n * @return {?}\n */\nexport function fingerprint(str) {\n var /** @type {?} */ utf8 = utf8Encode(str);\n var _a = [hash32(utf8, 0), hash32(utf8, 102072)], hi = _a[0], lo = _a[1];\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\n/**\n * @param {?} msg\n * @param {?} meaning\n * @return {?}\n */\nexport function computeMsgId(msg, meaning) {\n var _a = fingerprint(msg), hi = _a[0], lo = _a[1];\n if (meaning) {\n var _b = fingerprint(meaning), him = _b[0], lom = _b[1];\n _c = add64(rol64([hi, lo], 1), [him, lom]), hi = _c[0], lo = _c[1];\n }\n return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));\n var _c;\n}\n/**\n * @param {?} str\n * @param {?} c\n * @return {?}\n */\nfunction hash32(str, c) {\n var _a = [0x9e3779b9, 0x9e3779b9], a = _a[0], b = _a[1];\n var /** @type {?} */ i;\n var /** @type {?} */ len = str.length;\n for (i = 0; i + 12 <= len; i += 12) {\n a = add32(a, wordAt(str, i, Endian.Little));\n b = add32(b, wordAt(str, i + 4, Endian.Little));\n c = add32(c, wordAt(str, i + 8, Endian.Little));\n _b = mix([a, b, c]), a = _b[0], b = _b[1], c = _b[2];\n }\n a = add32(a, wordAt(str, i, Endian.Little));\n b = add32(b, wordAt(str, i + 4, Endian.Little));\n // the first byte of c is reserved for the length\n c = add32(c, len);\n c = add32(c, wordAt(str, i + 8, Endian.Little) << 8);\n return mix([a, b, c])[2];\n var _b;\n}\n/**\n * @param {?} __0\n * @return {?}\n */\nfunction mix(_a) {\n var a = _a[0], b = _a[1], c = _a[2];\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 13;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 8;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 13;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 12;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 16;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 5;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 3;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 10;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 15;\n return [a, b, c];\n}\n/** @enum {number} */\nvar Endian = {\n Little: 0,\n Big: 1,\n};\nEndian[Endian.Little] = \"Little\";\nEndian[Endian.Big] = \"Big\";\n/**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\n/**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\nfunction add32to64(a, b) {\n var /** @type {?} */ low = (a & 0xffff) + (b & 0xffff);\n var /** @type {?} */ high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\n/**\n * @param {?} __0\n * @param {?} __1\n * @return {?}\n */\nfunction add64(_a, _b) {\n var ah = _a[0], al = _a[1];\n var bh = _b[0], bl = _b[1];\n var _c = add32to64(al, bl), carry = _c[0], l = _c[1];\n var /** @type {?} */ h = add32(add32(ah, bh), carry);\n return [h, l];\n}\n/**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\nfunction sub32(a, b) {\n var /** @type {?} */ low = (a & 0xffff) - (b & 0xffff);\n var /** @type {?} */ high = (a >> 16) - (b >> 16) + (low >> 16);\n return (high << 16) | (low & 0xffff);\n}\n/**\n * @param {?} a\n * @param {?} count\n * @return {?}\n */\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\n/**\n * @param {?} __0\n * @param {?} count\n * @return {?}\n */\nfunction rol64(_a, count) {\n var hi = _a[0], lo = _a[1];\n var /** @type {?} */ h = (hi << count) | (lo >>> (32 - count));\n var /** @type {?} */ l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}\n/**\n * @param {?} str\n * @param {?} endian\n * @return {?}\n */\nfunction stringToWords32(str, endian) {\n var /** @type {?} */ words32 = Array((str.length + 3) >>> 2);\n for (var /** @type {?} */ i = 0; i < words32.length; i++) {\n words32[i] = wordAt(str, i * 4, endian);\n }\n return words32;\n}\n/**\n * @param {?} str\n * @param {?} index\n * @return {?}\n */\nfunction byteAt(str, index) {\n return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;\n}\n/**\n * @param {?} str\n * @param {?} index\n * @param {?} endian\n * @return {?}\n */\nfunction wordAt(str, index, endian) {\n var /** @type {?} */ word = 0;\n if (endian === Endian.Big) {\n for (var /** @type {?} */ i = 0; i < 4; i++) {\n word += byteAt(str, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (var /** @type {?} */ i = 0; i < 4; i++) {\n word += byteAt(str, index + i) << 8 * i;\n }\n }\n return word;\n}\n/**\n * @param {?} words32\n * @return {?}\n */\nfunction words32ToByteString(words32) {\n return words32.reduce(function (str, word) { return str + word32ToByteString(word); }, '');\n}\n/**\n * @param {?} word\n * @return {?}\n */\nfunction word32ToByteString(word) {\n var /** @type {?} */ str = '';\n for (var /** @type {?} */ i = 0; i < 4; i++) {\n str += String.fromCharCode((word >>> 8 * (3 - i)) & 0xff);\n }\n return str;\n}\n/**\n * @param {?} str\n * @return {?}\n */\nfunction byteStringToHexString(str) {\n var /** @type {?} */ hex = '';\n for (var /** @type {?} */ i = 0; i < str.length; i++) {\n var /** @type {?} */ b = byteAt(str, i);\n hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n }\n return hex.toLowerCase();\n}\n/**\n * @param {?} str\n * @return {?}\n */\nfunction byteStringToDecString(str) {\n var /** @type {?} */ decimal = '';\n var /** @type {?} */ toThePower = '1';\n for (var /** @type {?} */ i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}\n/**\n * @param {?} x\n * @param {?} y\n * @return {?}\n */\nfunction addBigInt(x, y) {\n var /** @type {?} */ sum = '';\n var /** @type {?} */ len = Math.max(x.length, y.length);\n for (var /** @type {?} */ i = 0, /** @type {?} */ carry = 0; i < len || carry; i++) {\n var /** @type {?} */ tmpSum = carry + +(x[i] || 0) + +(y[i] || 0);\n if (tmpSum >= 10) {\n carry = 1;\n sum += tmpSum - 10;\n }\n else {\n carry = 0;\n sum += tmpSum;\n }\n }\n return sum;\n}\n/**\n * @param {?} num\n * @param {?} b\n * @return {?}\n */\nfunction numberTimesBigInt(num, b) {\n var /** @type {?} */ product = '';\n var /** @type {?} */ bToThePower = b;\n for (; num !== 0; num = num >>> 1) {\n if (num & 1)\n product = addBigInt(product, bToThePower);\n bToThePower = addBigInt(bToThePower, bToThePower);\n }\n return product;\n}\n//# sourceMappingURL=digest.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Message = /** @class */ (function () {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param id\n */\n function Message(nodes, placeholders, placeholderToMessage, meaning, description, id) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.id = id;\n if (nodes.length) {\n this.sources = [{\n filePath: nodes[0].sourceSpan.start.file.url,\n startLine: nodes[0].sourceSpan.start.line + 1,\n startCol: nodes[0].sourceSpan.start.col + 1,\n endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n endCol: nodes[0].sourceSpan.start.col + 1\n }];\n }\n else {\n this.sources = [];\n }\n }\n return Message;\n}());\nexport { Message };\nfunction Message_tsickle_Closure_declarations() {\n /** @type {?} */\n Message.prototype.sources;\n /** @type {?} */\n Message.prototype.nodes;\n /** @type {?} */\n Message.prototype.placeholders;\n /** @type {?} */\n Message.prototype.placeholderToMessage;\n /** @type {?} */\n Message.prototype.meaning;\n /** @type {?} */\n Message.prototype.description;\n /** @type {?} */\n Message.prototype.id;\n}\n/**\n * @record\n */\nexport function MessageSpan() { }\nfunction MessageSpan_tsickle_Closure_declarations() {\n /** @type {?} */\n MessageSpan.prototype.filePath;\n /** @type {?} */\n MessageSpan.prototype.startLine;\n /** @type {?} */\n MessageSpan.prototype.startCol;\n /** @type {?} */\n MessageSpan.prototype.endLine;\n /** @type {?} */\n MessageSpan.prototype.endCol;\n}\n/**\n * @record\n */\nexport function Node() { }\nfunction Node_tsickle_Closure_declarations() {\n /** @type {?} */\n Node.prototype.sourceSpan;\n /** @type {?} */\n Node.prototype.visit;\n}\nvar Text = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Text.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitText(this, context); };\n return Text;\n}());\nexport { Text };\nfunction Text_tsickle_Closure_declarations() {\n /** @type {?} */\n Text.prototype.value;\n /** @type {?} */\n Text.prototype.sourceSpan;\n}\nvar Container = /** @class */ (function () {\n function Container(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Container.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitContainer(this, context); };\n return Container;\n}());\nexport { Container };\nfunction Container_tsickle_Closure_declarations() {\n /** @type {?} */\n Container.prototype.children;\n /** @type {?} */\n Container.prototype.sourceSpan;\n}\nvar Icu = /** @class */ (function () {\n function Icu(expression, type, cases, sourceSpan) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Icu.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitIcu(this, context); };\n return Icu;\n}());\nexport { Icu };\nfunction Icu_tsickle_Closure_declarations() {\n /** @type {?} */\n Icu.prototype.expressionPlaceholder;\n /** @type {?} */\n Icu.prototype.expression;\n /** @type {?} */\n Icu.prototype.type;\n /** @type {?} */\n Icu.prototype.cases;\n /** @type {?} */\n Icu.prototype.sourceSpan;\n}\nvar TagPlaceholder = /** @class */ (function () {\n function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, sourceSpan) {\n this.tag = tag;\n this.attrs = attrs;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.isVoid = isVoid;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n TagPlaceholder.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitTagPlaceholder(this, context); };\n return TagPlaceholder;\n}());\nexport { TagPlaceholder };\nfunction TagPlaceholder_tsickle_Closure_declarations() {\n /** @type {?} */\n TagPlaceholder.prototype.tag;\n /** @type {?} */\n TagPlaceholder.prototype.attrs;\n /** @type {?} */\n TagPlaceholder.prototype.startName;\n /** @type {?} */\n TagPlaceholder.prototype.closeName;\n /** @type {?} */\n TagPlaceholder.prototype.children;\n /** @type {?} */\n TagPlaceholder.prototype.isVoid;\n /** @type {?} */\n TagPlaceholder.prototype.sourceSpan;\n}\nvar Placeholder = /** @class */ (function () {\n function Placeholder(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n Placeholder.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitPlaceholder(this, context); };\n return Placeholder;\n}());\nexport { Placeholder };\nfunction Placeholder_tsickle_Closure_declarations() {\n /** @type {?} */\n Placeholder.prototype.value;\n /** @type {?} */\n Placeholder.prototype.name;\n /** @type {?} */\n Placeholder.prototype.sourceSpan;\n}\nvar IcuPlaceholder = /** @class */ (function () {\n function IcuPlaceholder(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n IcuPlaceholder.prototype.visit = /**\n * @param {?} visitor\n * @param {?=} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitIcuPlaceholder(this, context); };\n return IcuPlaceholder;\n}());\nexport { IcuPlaceholder };\nfunction IcuPlaceholder_tsickle_Closure_declarations() {\n /** @type {?} */\n IcuPlaceholder.prototype.value;\n /** @type {?} */\n IcuPlaceholder.prototype.name;\n /** @type {?} */\n IcuPlaceholder.prototype.sourceSpan;\n}\n/**\n * @record\n */\nexport function Visitor() { }\nfunction Visitor_tsickle_Closure_declarations() {\n /** @type {?} */\n Visitor.prototype.visitText;\n /** @type {?} */\n Visitor.prototype.visitContainer;\n /** @type {?} */\n Visitor.prototype.visitIcu;\n /** @type {?} */\n Visitor.prototype.visitTagPlaceholder;\n /** @type {?} */\n Visitor.prototype.visitPlaceholder;\n /** @type {?} */\n Visitor.prototype.visitIcuPlaceholder;\n}\nvar CloneVisitor = /** @class */ (function () {\n function CloneVisitor() {\n }\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { return new Text(text.value, text.sourceSpan); };\n /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n var /** @type {?} */ children = container.children.map(function (n) { return n.visit(_this, context); });\n return new Container(children, container.sourceSpan);\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ cases = {};\n Object.keys(icu.cases).forEach(function (key) { return cases[key] = icu.cases[key].visit(_this, context); });\n var /** @type {?} */ msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);\n msg.expressionPlaceholder = icu.expressionPlaceholder;\n return msg;\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var _this = this;\n var /** @type {?} */ children = ph.children.map(function (n) { return n.visit(_this, context); });\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n CloneVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n };\n return CloneVisitor;\n}());\nexport { CloneVisitor };\nvar RecurseVisitor = /** @class */ (function () {\n function RecurseVisitor() {\n }\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { };\n /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n container.children.forEach(function (child) { return child.visit(_this); });\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n Object.keys(icu.cases).forEach(function (k) { icu.cases[k].visit(_this); });\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var _this = this;\n ph.children.forEach(function (child) { return child.visit(_this); });\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) { };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n RecurseVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) { };\n return RecurseVisitor;\n}());\nexport { RecurseVisitor };\n//# sourceMappingURL=i18n_ast.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { TagContentType } from './tags';\nvar HtmlTagDefinition = /** @class */ (function () {\n function HtmlTagDefinition(_a) {\n var _b = _a === void 0 ? {} : _a, closedByChildren = _b.closedByChildren, requiredParents = _b.requiredParents, implicitNamespacePrefix = _b.implicitNamespacePrefix, _c = _b.contentType, contentType = _c === void 0 ? TagContentType.PARSABLE_DATA : _c, _d = _b.closedByParent, closedByParent = _d === void 0 ? false : _d, _e = _b.isVoid, isVoid = _e === void 0 ? false : _e, _f = _b.ignoreFirstLf, ignoreFirstLf = _f === void 0 ? false : _f;\n var _this = this;\n this.closedByChildren = {};\n this.closedByParent = false;\n this.canSelfClose = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(function (tagName) { return _this.closedByChildren[tagName] = true; });\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n if (requiredParents && requiredParents.length > 0) {\n this.requiredParents = {};\n // The first parent is the list is automatically when none of the listed parents are present\n this.parentToAdd = requiredParents[0];\n requiredParents.forEach(function (tagName) { return _this.requiredParents[tagName] = true; });\n }\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n }\n /**\n * @param {?} currentParent\n * @return {?}\n */\n HtmlTagDefinition.prototype.requireExtraParent = /**\n * @param {?} currentParent\n * @return {?}\n */\n function (currentParent) {\n if (!this.requiredParents) {\n return false;\n }\n if (!currentParent) {\n return true;\n }\n var /** @type {?} */ lcParent = currentParent.toLowerCase();\n var /** @type {?} */ isParentTemplate = lcParent === 'template' || currentParent === 'ng-template';\n return !isParentTemplate && this.requiredParents[lcParent] != true;\n };\n /**\n * @param {?} name\n * @return {?}\n */\n HtmlTagDefinition.prototype.isClosedByChild = /**\n * @param {?} name\n * @return {?}\n */\n function (name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n };\n return HtmlTagDefinition;\n}());\nexport { HtmlTagDefinition };\nfunction HtmlTagDefinition_tsickle_Closure_declarations() {\n /** @type {?} */\n HtmlTagDefinition.prototype.closedByChildren;\n /** @type {?} */\n HtmlTagDefinition.prototype.closedByParent;\n /** @type {?} */\n HtmlTagDefinition.prototype.requiredParents;\n /** @type {?} */\n HtmlTagDefinition.prototype.parentToAdd;\n /** @type {?} */\n HtmlTagDefinition.prototype.implicitNamespacePrefix;\n /** @type {?} */\n HtmlTagDefinition.prototype.contentType;\n /** @type {?} */\n HtmlTagDefinition.prototype.isVoid;\n /** @type {?} */\n HtmlTagDefinition.prototype.ignoreFirstLf;\n /** @type {?} */\n HtmlTagDefinition.prototype.canSelfClose;\n}\n// see http://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nvar /** @type {?} */ TAG_DEFINITIONS = {\n 'base': new HtmlTagDefinition({ isVoid: true }),\n 'meta': new HtmlTagDefinition({ isVoid: true }),\n 'area': new HtmlTagDefinition({ isVoid: true }),\n 'embed': new HtmlTagDefinition({ isVoid: true }),\n 'link': new HtmlTagDefinition({ isVoid: true }),\n 'img': new HtmlTagDefinition({ isVoid: true }),\n 'input': new HtmlTagDefinition({ isVoid: true }),\n 'param': new HtmlTagDefinition({ isVoid: true }),\n 'hr': new HtmlTagDefinition({ isVoid: true }),\n 'br': new HtmlTagDefinition({ isVoid: true }),\n 'source': new HtmlTagDefinition({ isVoid: true }),\n 'track': new HtmlTagDefinition({ isVoid: true }),\n 'wbr': new HtmlTagDefinition({ isVoid: true }),\n 'p': new HtmlTagDefinition({\n closedByChildren: [\n 'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form',\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr',\n 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'\n ],\n closedByParent: true\n }),\n 'thead': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'] }),\n 'tbody': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'], closedByParent: true }),\n 'tfoot': new HtmlTagDefinition({ closedByChildren: ['tbody'], closedByParent: true }),\n 'tr': new HtmlTagDefinition({\n closedByChildren: ['tr'],\n requiredParents: ['tbody', 'tfoot', 'thead'],\n closedByParent: true\n }),\n 'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'col': new HtmlTagDefinition({ requiredParents: ['colgroup'], isVoid: true }),\n 'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),\n 'math': new HtmlTagDefinition({ implicitNamespacePrefix: 'math' }),\n 'li': new HtmlTagDefinition({ closedByChildren: ['li'], closedByParent: true }),\n 'dt': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'] }),\n 'dd': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'], closedByParent: true }),\n 'rb': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rt': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rtc': new HtmlTagDefinition({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),\n 'rp': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),\n 'option': new HtmlTagDefinition({ closedByChildren: ['option', 'optgroup'], closedByParent: true }),\n 'pre': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'listing': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'style': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'script': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'title': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT }),\n 'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),\n};\nvar /** @type {?} */ _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n/**\n * @param {?} tagName\n * @return {?}\n */\nexport function getHtmlTagDefinition(tagName) {\n return TAG_DEFINITIONS[tagName.toLowerCase()] || _DEFAULT_TAG_DEFINITION;\n}\n//# sourceMappingURL=html_tags.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar /** @type {?} */ TAG_TO_PLACEHOLDER_NAMES = {\n 'A': 'LINK',\n 'B': 'BOLD_TEXT',\n 'BR': 'LINE_BREAK',\n 'EM': 'EMPHASISED_TEXT',\n 'H1': 'HEADING_LEVEL1',\n 'H2': 'HEADING_LEVEL2',\n 'H3': 'HEADING_LEVEL3',\n 'H4': 'HEADING_LEVEL4',\n 'H5': 'HEADING_LEVEL5',\n 'H6': 'HEADING_LEVEL6',\n 'HR': 'HORIZONTAL_RULE',\n 'I': 'ITALIC_TEXT',\n 'LI': 'LIST_ITEM',\n 'LINK': 'MEDIA_LINK',\n 'OL': 'ORDERED_LIST',\n 'P': 'PARAGRAPH',\n 'Q': 'QUOTATION',\n 'S': 'STRIKETHROUGH_TEXT',\n 'SMALL': 'SMALL_TEXT',\n 'SUB': 'SUBSTRIPT',\n 'SUP': 'SUPERSCRIPT',\n 'TBODY': 'TABLE_BODY',\n 'TD': 'TABLE_CELL',\n 'TFOOT': 'TABLE_FOOTER',\n 'TH': 'TABLE_HEADER_CELL',\n 'THEAD': 'TABLE_HEADER',\n 'TR': 'TABLE_ROW',\n 'TT': 'MONOSPACED_TEXT',\n 'U': 'UNDERLINED_TEXT',\n 'UL': 'UNORDERED_LIST',\n};\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nvar /**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nPlaceholderRegistry = /** @class */ (function () {\n function PlaceholderRegistry() {\n this._placeHolderNameCounts = {};\n this._signatureToName = {};\n }\n /**\n * @param {?} tag\n * @param {?} attrs\n * @param {?} isVoid\n * @return {?}\n */\n PlaceholderRegistry.prototype.getStartTagPlaceholderName = /**\n * @param {?} tag\n * @param {?} attrs\n * @param {?} isVoid\n * @return {?}\n */\n function (tag, attrs, isVoid) {\n var /** @type {?} */ signature = this._hashTag(tag, attrs, isVoid);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var /** @type {?} */ upperTag = tag.toUpperCase();\n var /** @type {?} */ baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\" + upperTag;\n var /** @type {?} */ name = this._generateUniqueName(isVoid ? baseName : \"START_\" + baseName);\n this._signatureToName[signature] = name;\n return name;\n };\n /**\n * @param {?} tag\n * @return {?}\n */\n PlaceholderRegistry.prototype.getCloseTagPlaceholderName = /**\n * @param {?} tag\n * @return {?}\n */\n function (tag) {\n var /** @type {?} */ signature = this._hashClosingTag(tag);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var /** @type {?} */ upperTag = tag.toUpperCase();\n var /** @type {?} */ baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\" + upperTag;\n var /** @type {?} */ name = this._generateUniqueName(\"CLOSE_\" + baseName);\n this._signatureToName[signature] = name;\n return name;\n };\n /**\n * @param {?} name\n * @param {?} content\n * @return {?}\n */\n PlaceholderRegistry.prototype.getPlaceholderName = /**\n * @param {?} name\n * @param {?} content\n * @return {?}\n */\n function (name, content) {\n var /** @type {?} */ upperName = name.toUpperCase();\n var /** @type {?} */ signature = \"PH: \" + upperName + \"=\" + content;\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var /** @type {?} */ uniqueName = this._generateUniqueName(upperName);\n this._signatureToName[signature] = uniqueName;\n return uniqueName;\n };\n /**\n * @param {?} name\n * @return {?}\n */\n PlaceholderRegistry.prototype.getUniquePlaceholder = /**\n * @param {?} name\n * @return {?}\n */\n function (name) {\n return this._generateUniqueName(name.toUpperCase());\n };\n /**\n * @param {?} tag\n * @param {?} attrs\n * @param {?} isVoid\n * @return {?}\n */\n PlaceholderRegistry.prototype._hashTag = /**\n * @param {?} tag\n * @param {?} attrs\n * @param {?} isVoid\n * @return {?}\n */\n function (tag, attrs, isVoid) {\n var /** @type {?} */ start = \"<\" + tag;\n var /** @type {?} */ strAttrs = Object.keys(attrs).sort().map(function (name) { return \" \" + name + \"=\" + attrs[name]; }).join('');\n var /** @type {?} */ end = isVoid ? '/>' : \">\";\n return start + strAttrs + end;\n };\n /**\n * @param {?} tag\n * @return {?}\n */\n PlaceholderRegistry.prototype._hashClosingTag = /**\n * @param {?} tag\n * @return {?}\n */\n function (tag) { return this._hashTag(\"/\" + tag, {}, false); };\n /**\n * @param {?} base\n * @return {?}\n */\n PlaceholderRegistry.prototype._generateUniqueName = /**\n * @param {?} base\n * @return {?}\n */\n function (base) {\n var /** @type {?} */ seen = this._placeHolderNameCounts.hasOwnProperty(base);\n if (!seen) {\n this._placeHolderNameCounts[base] = 1;\n return base;\n }\n var /** @type {?} */ id = this._placeHolderNameCounts[base];\n this._placeHolderNameCounts[base] = id + 1;\n return base + \"_\" + id;\n };\n return PlaceholderRegistry;\n}());\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nexport { PlaceholderRegistry };\nfunction PlaceholderRegistry_tsickle_Closure_declarations() {\n /** @type {?} */\n PlaceholderRegistry.prototype._placeHolderNameCounts;\n /** @type {?} */\n PlaceholderRegistry.prototype._signatureToName;\n}\n//# sourceMappingURL=placeholder.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { Lexer as ExpressionLexer } from '../expression_parser/lexer';\nimport { Parser as ExpressionParser } from '../expression_parser/parser';\nimport * as html from '../ml_parser/ast';\nimport { getHtmlTagDefinition } from '../ml_parser/html_tags';\nimport * as i18n from './i18n_ast';\nimport { PlaceholderRegistry } from './serializers/placeholder';\nvar /** @type {?} */ _expParser = new ExpressionParser(new ExpressionLexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n * @param {?} interpolationConfig\n * @return {?}\n */\nexport function createI18nMessageFactory(interpolationConfig) {\n var /** @type {?} */ visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return function (nodes, meaning, description, id) {\n return visitor.toI18nMessage(nodes, meaning, description, id);\n };\n}\nvar _I18nVisitor = /** @class */ (function () {\n function _I18nVisitor(_expressionParser, _interpolationConfig) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n }\n /**\n * @param {?} nodes\n * @param {?} meaning\n * @param {?} description\n * @param {?} id\n * @return {?}\n */\n _I18nVisitor.prototype.toI18nMessage = /**\n * @param {?} nodes\n * @param {?} meaning\n * @param {?} description\n * @param {?} id\n * @return {?}\n */\n function (nodes, meaning, description, id) {\n this._isIcu = nodes.length == 1 && nodes[0] instanceof html.Expansion;\n this._icuDepth = 0;\n this._placeholderRegistry = new PlaceholderRegistry();\n this._placeholderToContent = {};\n this._placeholderToMessage = {};\n var /** @type {?} */ i18nodes = html.visitAll(this, nodes, {});\n return new i18n.Message(i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);\n };\n /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitElement = /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n function (el, context) {\n var /** @type {?} */ children = html.visitAll(this, el.children);\n var /** @type {?} */ attrs = {};\n el.attrs.forEach(function (attr) {\n // Do not visit the attributes, translatable ones are top-level ASTs\n attrs[attr.name] = attr.value;\n });\n var /** @type {?} */ isVoid = getHtmlTagDefinition(el.name).isVoid;\n var /** @type {?} */ startPhName = this._placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n this._placeholderToContent[startPhName] = /** @type {?} */ ((el.sourceSpan)).toString();\n var /** @type {?} */ closePhName = '';\n if (!isVoid) {\n closePhName = this._placeholderRegistry.getCloseTagPlaceholderName(el.name);\n this._placeholderToContent[closePhName] = \"\";\n }\n return new i18n.TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, /** @type {?} */ ((el.sourceSpan)));\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) {\n return this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) {\n return this._visitTextWithInterpolation(text.value, /** @type {?} */ ((text.sourceSpan)));\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { return null; };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n this._icuDepth++;\n var /** @type {?} */ i18nIcuCases = {};\n var /** @type {?} */ i18nIcu = new i18n.Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n icu.cases.forEach(function (caze) {\n i18nIcuCases[caze.value] = new i18n.Container(caze.expression.map(function (node) { return node.visit(_this, {}); }), caze.expSourceSpan);\n });\n this._icuDepth--;\n if (this._isIcu || this._icuDepth > 0) {\n // Returns an ICU node when:\n // - the message (vs a part of the message) is an ICU message, or\n // - the ICU message is nested.\n var /** @type {?} */ expPh = this._placeholderRegistry.getUniquePlaceholder(\"VAR_\" + icu.type);\n i18nIcu.expressionPlaceholder = expPh;\n this._placeholderToContent[expPh] = icu.switchValue;\n return i18nIcu;\n }\n // Else returns a placeholder\n // ICU placeholders should not be replaced with their original content but with the their\n // translations. We need to create a new visitor (they are not re-entrant) to compute the\n // message id.\n // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n var /** @type {?} */ phName = this._placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n var /** @type {?} */ visitor = new _I18nVisitor(this._expressionParser, this._interpolationConfig);\n this._placeholderToMessage[phName] = visitor.toI18nMessage([icu], '', '', '');\n return new i18n.IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n _I18nVisitor.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n throw new Error('Unreachable code');\n };\n /**\n * @param {?} text\n * @param {?} sourceSpan\n * @return {?}\n */\n _I18nVisitor.prototype._visitTextWithInterpolation = /**\n * @param {?} text\n * @param {?} sourceSpan\n * @return {?}\n */\n function (text, sourceSpan) {\n var /** @type {?} */ splitInterpolation = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig);\n if (!splitInterpolation) {\n // No expression, return a single text\n return new i18n.Text(text, sourceSpan);\n }\n // Return a group of text + expressions\n var /** @type {?} */ nodes = [];\n var /** @type {?} */ container = new i18n.Container(nodes, sourceSpan);\n var _a = this._interpolationConfig, sDelimiter = _a.start, eDelimiter = _a.end;\n for (var /** @type {?} */ i = 0; i < splitInterpolation.strings.length - 1; i++) {\n var /** @type {?} */ expression = splitInterpolation.expressions[i];\n var /** @type {?} */ baseName = _extractPlaceholderName(expression) || 'INTERPOLATION';\n var /** @type {?} */ phName = this._placeholderRegistry.getPlaceholderName(baseName, expression);\n if (splitInterpolation.strings[i].length) {\n // No need to add empty strings\n nodes.push(new i18n.Text(splitInterpolation.strings[i], sourceSpan));\n }\n nodes.push(new i18n.Placeholder(expression, phName, sourceSpan));\n this._placeholderToContent[phName] = sDelimiter + expression + eDelimiter;\n }\n // The last index contains no expression\n var /** @type {?} */ lastStringIdx = splitInterpolation.strings.length - 1;\n if (splitInterpolation.strings[lastStringIdx].length) {\n nodes.push(new i18n.Text(splitInterpolation.strings[lastStringIdx], sourceSpan));\n }\n return container;\n };\n return _I18nVisitor;\n}());\nfunction _I18nVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _I18nVisitor.prototype._isIcu;\n /** @type {?} */\n _I18nVisitor.prototype._icuDepth;\n /** @type {?} */\n _I18nVisitor.prototype._placeholderRegistry;\n /** @type {?} */\n _I18nVisitor.prototype._placeholderToContent;\n /** @type {?} */\n _I18nVisitor.prototype._placeholderToMessage;\n /** @type {?} */\n _I18nVisitor.prototype._expressionParser;\n /** @type {?} */\n _I18nVisitor.prototype._interpolationConfig;\n}\nvar /** @type {?} */ _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\n/**\n * @param {?} input\n * @return {?}\n */\nfunction _extractPlaceholderName(input) {\n return input.split(_CUSTOM_PH_EXP)[2];\n}\n//# sourceMappingURL=i18n_parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { ParseError } from '../parse_util';\n/**\n * An i18n error.\n */\nvar /**\n * An i18n error.\n */\nI18nError = /** @class */ (function (_super) {\n tslib_1.__extends(I18nError, _super);\n function I18nError(span, msg) {\n return _super.call(this, span, msg) || this;\n }\n return I18nError;\n}(ParseError));\n/**\n * An i18n error.\n */\nexport { I18nError };\n//# sourceMappingURL=parse_util.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as html from '../ml_parser/ast';\nimport { ParseTreeResult } from '../ml_parser/parser';\nimport * as i18n from './i18n_ast';\nimport { createI18nMessageFactory } from './i18n_parser';\nimport { I18nError } from './parse_util';\nvar /** @type {?} */ _I18N_ATTR = 'i18n';\nvar /** @type {?} */ _I18N_ATTR_PREFIX = 'i18n-';\nvar /** @type {?} */ _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nvar /** @type {?} */ MEANING_SEPARATOR = '|';\nvar /** @type {?} */ ID_SEPARATOR = '@@';\nvar /** @type {?} */ i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n * @param {?} nodes\n * @param {?} interpolationConfig\n * @param {?} implicitTags\n * @param {?} implicitAttrs\n * @return {?}\n */\nexport function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n var /** @type {?} */ visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n}\n/**\n * @param {?} nodes\n * @param {?} translations\n * @param {?} interpolationConfig\n * @param {?} implicitTags\n * @param {?} implicitAttrs\n * @return {?}\n */\nexport function mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n var /** @type {?} */ visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.merge(nodes, translations, interpolationConfig);\n}\nvar ExtractionResult = /** @class */ (function () {\n function ExtractionResult(messages, errors) {\n this.messages = messages;\n this.errors = errors;\n }\n return ExtractionResult;\n}());\nexport { ExtractionResult };\nfunction ExtractionResult_tsickle_Closure_declarations() {\n /** @type {?} */\n ExtractionResult.prototype.messages;\n /** @type {?} */\n ExtractionResult.prototype.errors;\n}\n/** @enum {number} */\nvar _VisitorMode = {\n Extract: 0,\n Merge: 1,\n};\n_VisitorMode[_VisitorMode.Extract] = \"Extract\";\n_VisitorMode[_VisitorMode.Merge] = \"Merge\";\n/**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * \\@internal\n */\nvar /**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * \\@internal\n */\n_Visitor = /** @class */ (function () {\n function _Visitor(_implicitTags, _implicitAttrs) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n }\n /**\n * Extracts the messages from the tree\n */\n /**\n * Extracts the messages from the tree\n * @param {?} nodes\n * @param {?} interpolationConfig\n * @return {?}\n */\n _Visitor.prototype.extract = /**\n * Extracts the messages from the tree\n * @param {?} nodes\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (nodes, interpolationConfig) {\n var _this = this;\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(function (node) { return node.visit(_this, null); });\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n };\n /**\n * Returns a tree where all translatable nodes are translated\n */\n /**\n * Returns a tree where all translatable nodes are translated\n * @param {?} nodes\n * @param {?} translations\n * @param {?} interpolationConfig\n * @return {?}\n */\n _Visitor.prototype.merge = /**\n * Returns a tree where all translatable nodes are translated\n * @param {?} nodes\n * @param {?} translations\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (nodes, translations, interpolationConfig) {\n this._init(_VisitorMode.Merge, interpolationConfig);\n this._translations = translations;\n // Construct a single fake root element\n var /** @type {?} */ wrapper = new html.Element('wrapper', [], nodes, /** @type {?} */ ((undefined)), undefined, undefined);\n var /** @type {?} */ translatedNode = wrapper.visit(this, null);\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ParseTreeResult(translatedNode.children, this._errors);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n // Parse cases for translatable html attributes\n var /** @type {?} */ expression = html.visitAll(this, icuCase.expression, context);\n if (this._mode === _VisitorMode.Merge) {\n return new html.ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n }\n };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n this._mayBeAddBlockChildren(icu);\n var /** @type {?} */ wasInIcu = this._inIcu;\n if (!this._inIcu) {\n // nested ICU messages should not be extracted but top-level translated as a whole\n if (this._isInTranslatableSection) {\n this._addMessage([icu]);\n }\n this._inIcu = true;\n }\n var /** @type {?} */ cases = html.visitAll(this, icu.cases, context);\n if (this._mode === _VisitorMode.Merge) {\n icu = new html.Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n }\n this._inIcu = wasInIcu;\n return icu;\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) {\n var /** @type {?} */ isOpening = _isOpeningComment(comment);\n if (isOpening && this._isInTranslatableSection) {\n this._reportError(comment, 'Could not start a block inside a translatable section');\n return;\n }\n var /** @type {?} */ isClosing = _isClosingComment(comment);\n if (isClosing && !this._inI18nBlock) {\n this._reportError(comment, 'Trying to close an unopened block');\n return;\n }\n if (!this._inI18nNode && !this._inIcu) {\n if (!this._inI18nBlock) {\n if (isOpening) {\n // deprecated from v5 you should use instead of i18n comments\n if (!i18nCommentsWarned && /** @type {?} */ (console) && /** @type {?} */ (console.warn)) {\n i18nCommentsWarned = true;\n var /** @type {?} */ details = comment.sourceSpan.details ? \", \" + comment.sourceSpan.details : '';\n // TODO(ocombe): use a log service once there is a public one available\n console.warn(\"I18n comments are deprecated, use an element instead (\" + comment.sourceSpan.start + details + \")\");\n }\n this._inI18nBlock = true;\n this._blockStartDepth = this._depth;\n this._blockChildren = [];\n this._blockMeaningAndDesc = /** @type {?} */ ((comment.value)).replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n this._openTranslatableSection(comment);\n }\n }\n else {\n if (isClosing) {\n if (this._depth == this._blockStartDepth) {\n this._closeTranslatableSection(comment, this._blockChildren);\n this._inI18nBlock = false;\n var /** @type {?} */ message = /** @type {?} */ ((this._addMessage(this._blockChildren, this._blockMeaningAndDesc)));\n // merge attributes in sections\n var /** @type {?} */ nodes = this._translateMessage(comment, message);\n return html.visitAll(this, nodes);\n }\n else {\n this._reportError(comment, 'I18N blocks should not cross element boundaries');\n return;\n }\n }\n }\n }\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) {\n if (this._isInTranslatableSection) {\n this._mayBeAddBlockChildren(text);\n }\n return text;\n };\n /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitElement = /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n function (el, context) {\n var _this = this;\n this._mayBeAddBlockChildren(el);\n this._depth++;\n var /** @type {?} */ wasInI18nNode = this._inI18nNode;\n var /** @type {?} */ wasInImplicitNode = this._inImplicitNode;\n var /** @type {?} */ childNodes = [];\n var /** @type {?} */ translatedChildNodes = /** @type {?} */ ((undefined));\n // Extract:\n // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n // - ICU messages\n var /** @type {?} */ i18nAttr = _getI18nAttr(el);\n var /** @type {?} */ i18nMeta = i18nAttr ? i18nAttr.value : '';\n var /** @type {?} */ isImplicit = this._implicitTags.some(function (tag) { return el.name === tag; }) && !this._inIcu &&\n !this._isInTranslatableSection;\n var /** @type {?} */ isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n this._inImplicitNode = wasInImplicitNode || isImplicit;\n if (!this._isInTranslatableSection && !this._inIcu) {\n if (i18nAttr || isTopLevelImplicit) {\n this._inI18nNode = true;\n var /** @type {?} */ message = /** @type {?} */ ((this._addMessage(el.children, i18nMeta)));\n translatedChildNodes = this._translateMessage(el, message);\n }\n if (this._mode == _VisitorMode.Extract) {\n var /** @type {?} */ isTranslatable = i18nAttr || isTopLevelImplicit;\n if (isTranslatable)\n this._openTranslatableSection(el);\n html.visitAll(this, el.children);\n if (isTranslatable)\n this._closeTranslatableSection(el, el.children);\n }\n }\n else {\n if (i18nAttr || isTopLevelImplicit) {\n this._reportError(el, 'Could not mark an element as translatable inside a translatable section');\n }\n if (this._mode == _VisitorMode.Extract) {\n // Descend into child nodes for extraction\n html.visitAll(this, el.children);\n }\n }\n if (this._mode === _VisitorMode.Merge) {\n var /** @type {?} */ visitNodes = translatedChildNodes || el.children;\n visitNodes.forEach(function (child) {\n var /** @type {?} */ visited = child.visit(_this, context);\n if (visited && !_this._isInTranslatableSection) {\n // Do not add the children from translatable sections (= i18n blocks here)\n // They will be added later in this loop when the block closes (i.e. on ``)\n childNodes = childNodes.concat(visited);\n }\n });\n }\n this._visitAttributesOf(el);\n this._depth--;\n this._inI18nNode = wasInI18nNode;\n this._inImplicitNode = wasInImplicitNode;\n if (this._mode === _VisitorMode.Merge) {\n var /** @type {?} */ translatedAttrs = this._translateAttributes(el);\n return new html.Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n }\n return null;\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) {\n throw new Error('unreachable code');\n };\n /**\n * @param {?} mode\n * @param {?} interpolationConfig\n * @return {?}\n */\n _Visitor.prototype._init = /**\n * @param {?} mode\n * @param {?} interpolationConfig\n * @return {?}\n */\n function (mode, interpolationConfig) {\n this._mode = mode;\n this._inI18nBlock = false;\n this._inI18nNode = false;\n this._depth = 0;\n this._inIcu = false;\n this._msgCountAtSectionStart = undefined;\n this._errors = [];\n this._messages = [];\n this._inImplicitNode = false;\n this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n };\n /**\n * @param {?} el\n * @return {?}\n */\n _Visitor.prototype._visitAttributesOf = /**\n * @param {?} el\n * @return {?}\n */\n function (el) {\n var _this = this;\n var /** @type {?} */ explicitAttrNameToValue = {};\n var /** @type {?} */ implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs.filter(function (attr) { return attr.name.startsWith(_I18N_ATTR_PREFIX); })\n .forEach(function (attr) {\n return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n attr.value;\n });\n el.attrs.forEach(function (attr) {\n if (attr.name in explicitAttrNameToValue) {\n _this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n }\n else if (implicitAttrNames.some(function (name) { return attr.name === name; })) {\n _this._addMessage([attr]);\n }\n });\n };\n /**\n * @param {?} ast\n * @param {?=} msgMeta\n * @return {?}\n */\n _Visitor.prototype._addMessage = /**\n * @param {?} ast\n * @param {?=} msgMeta\n * @return {?}\n */\n function (ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof html.Attribute && !(/** @type {?} */ (ast[0])).value) {\n // Do not create empty messages\n return null;\n }\n var _a = _parseMessageMeta(msgMeta), meaning = _a.meaning, description = _a.description, id = _a.id;\n var /** @type {?} */ message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n };\n /**\n * @param {?} el\n * @param {?} message\n * @return {?}\n */\n _Visitor.prototype._translateMessage = /**\n * @param {?} el\n * @param {?} message\n * @return {?}\n */\n function (el, message) {\n if (message && this._mode === _VisitorMode.Merge) {\n var /** @type {?} */ nodes = this._translations.get(message);\n if (nodes) {\n return nodes;\n }\n this._reportError(el, \"Translation unavailable for message id=\\\"\" + this._translations.digest(message) + \"\\\"\");\n }\n return [];\n };\n /**\n * @param {?} el\n * @return {?}\n */\n _Visitor.prototype._translateAttributes = /**\n * @param {?} el\n * @return {?}\n */\n function (el) {\n var _this = this;\n var /** @type {?} */ attributes = el.attrs;\n var /** @type {?} */ i18nParsedMessageMeta = {};\n attributes.forEach(function (attr) {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n _parseMessageMeta(attr.value);\n }\n });\n var /** @type {?} */ translatedAttributes = [];\n attributes.forEach(function (attr) {\n if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n // strip i18n specific attributes\n return;\n }\n if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {\n var _a = i18nParsedMessageMeta[attr.name], meaning = _a.meaning, description = _a.description, id = _a.id;\n var /** @type {?} */ message = _this._createI18nMessage([attr], meaning, description, id);\n var /** @type {?} */ nodes = _this._translations.get(message);\n if (nodes) {\n if (nodes.length == 0) {\n translatedAttributes.push(new html.Attribute(attr.name, '', attr.sourceSpan));\n }\n else if (nodes[0] instanceof html.Text) {\n var /** @type {?} */ value = (/** @type {?} */ (nodes[0])).value;\n translatedAttributes.push(new html.Attribute(attr.name, value, attr.sourceSpan));\n }\n else {\n _this._reportError(el, \"Unexpected translation for attribute \\\"\" + attr.name + \"\\\" (id=\\\"\" + (id || _this._translations.digest(message)) + \"\\\")\");\n }\n }\n else {\n _this._reportError(el, \"Translation unavailable for attribute \\\"\" + attr.name + \"\\\" (id=\\\"\" + (id || _this._translations.digest(message)) + \"\\\")\");\n }\n }\n else {\n translatedAttributes.push(attr);\n }\n });\n return translatedAttributes;\n };\n /**\n * Add the node as a child of the block when:\n * - we are in a block,\n * - we are not inside a ICU message (those are handled separately),\n * - the node is a \"direct child\" of the block\n * @param {?} node\n * @return {?}\n */\n _Visitor.prototype._mayBeAddBlockChildren = /**\n * Add the node as a child of the block when:\n * - we are in a block,\n * - we are not inside a ICU message (those are handled separately),\n * - the node is a \"direct child\" of the block\n * @param {?} node\n * @return {?}\n */\n function (node) {\n if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {\n this._blockChildren.push(node);\n }\n };\n /**\n * Marks the start of a section, see `_closeTranslatableSection`\n * @param {?} node\n * @return {?}\n */\n _Visitor.prototype._openTranslatableSection = /**\n * Marks the start of a section, see `_closeTranslatableSection`\n * @param {?} node\n * @return {?}\n */\n function (node) {\n if (this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section start');\n }\n else {\n this._msgCountAtSectionStart = this._messages.length;\n }\n };\n Object.defineProperty(_Visitor.prototype, \"_isInTranslatableSection\", {\n get: /**\n * A translatable section could be:\n * - the content of translatable element,\n * - nodes between `` and `` comments\n * @return {?}\n */\n function () {\n return this._msgCountAtSectionStart !== void 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Terminates a section.\n *\n * If a section has only one significant children (comments not significant) then we should not\n * keep the message from this children:\n *\n * `

{ICU message}

` would produce two messages:\n * - one for the

content with meaning and description,\n * - another one for the ICU message.\n *\n * In this case the last message is discarded as it contains less information (the AST is\n * otherwise identical).\n *\n * Note that we should still keep messages extracted from attributes inside the section (ie in the\n * ICU message here)\n * @param {?} node\n * @param {?} directChildren\n * @return {?}\n */\n _Visitor.prototype._closeTranslatableSection = /**\n * Terminates a section.\n *\n * If a section has only one significant children (comments not significant) then we should not\n * keep the message from this children:\n *\n * `

{ICU message}

` would produce two messages:\n * - one for the

content with meaning and description,\n * - another one for the ICU message.\n *\n * In this case the last message is discarded as it contains less information (the AST is\n * otherwise identical).\n *\n * Note that we should still keep messages extracted from attributes inside the section (ie in the\n * ICU message here)\n * @param {?} node\n * @param {?} directChildren\n * @return {?}\n */\n function (node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n var /** @type {?} */ startIndex = this._msgCountAtSectionStart;\n var /** @type {?} */ significantChildren = directChildren.reduce(function (count, node) { return count + (node instanceof html.Comment ? 0 : 1); }, 0);\n if (significantChildren == 1) {\n for (var /** @type {?} */ i = this._messages.length - 1; i >= /** @type {?} */ ((startIndex)); i--) {\n var /** @type {?} */ ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = undefined;\n };\n /**\n * @param {?} node\n * @param {?} msg\n * @return {?}\n */\n _Visitor.prototype._reportError = /**\n * @param {?} node\n * @param {?} msg\n * @return {?}\n */\n function (node, msg) {\n this._errors.push(new I18nError(/** @type {?} */ ((node.sourceSpan)), msg));\n };\n return _Visitor;\n}());\nfunction _Visitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _Visitor.prototype._depth;\n /** @type {?} */\n _Visitor.prototype._inI18nNode;\n /** @type {?} */\n _Visitor.prototype._inImplicitNode;\n /** @type {?} */\n _Visitor.prototype._inI18nBlock;\n /** @type {?} */\n _Visitor.prototype._blockMeaningAndDesc;\n /** @type {?} */\n _Visitor.prototype._blockChildren;\n /** @type {?} */\n _Visitor.prototype._blockStartDepth;\n /** @type {?} */\n _Visitor.prototype._inIcu;\n /** @type {?} */\n _Visitor.prototype._msgCountAtSectionStart;\n /** @type {?} */\n _Visitor.prototype._errors;\n /** @type {?} */\n _Visitor.prototype._mode;\n /** @type {?} */\n _Visitor.prototype._messages;\n /** @type {?} */\n _Visitor.prototype._translations;\n /** @type {?} */\n _Visitor.prototype._createI18nMessage;\n /** @type {?} */\n _Visitor.prototype._implicitTags;\n /** @type {?} */\n _Visitor.prototype._implicitAttrs;\n}\n/**\n * @param {?} n\n * @return {?}\n */\nfunction _isOpeningComment(n) {\n return !!(n instanceof html.Comment && n.value && n.value.startsWith('i18n'));\n}\n/**\n * @param {?} n\n * @return {?}\n */\nfunction _isClosingComment(n) {\n return !!(n instanceof html.Comment && n.value && n.value === '/i18n');\n}\n/**\n * @param {?} p\n * @return {?}\n */\nfunction _getI18nAttr(p) {\n return p.attrs.find(function (attr) { return attr.name === _I18N_ATTR; }) || null;\n}\n/**\n * @param {?=} i18n\n * @return {?}\n */\nfunction _parseMessageMeta(i18n) {\n if (!i18n)\n return { meaning: '', description: '', id: '' };\n var /** @type {?} */ idIndex = i18n.indexOf(ID_SEPARATOR);\n var /** @type {?} */ descIndex = i18n.indexOf(MEANING_SEPARATOR);\n var _a = (idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], meaningAndDesc = _a[0], id = _a[1];\n var _b = (descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc], meaning = _b[0], description = _b[1];\n return { meaning: meaning, description: description, id: id };\n}\n//# sourceMappingURL=extractor_merger.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { TagContentType } from './tags';\nvar XmlTagDefinition = /** @class */ (function () {\n function XmlTagDefinition() {\n this.closedByParent = false;\n this.contentType = TagContentType.PARSABLE_DATA;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n }\n /**\n * @param {?} currentParent\n * @return {?}\n */\n XmlTagDefinition.prototype.requireExtraParent = /**\n * @param {?} currentParent\n * @return {?}\n */\n function (currentParent) { return false; };\n /**\n * @param {?} name\n * @return {?}\n */\n XmlTagDefinition.prototype.isClosedByChild = /**\n * @param {?} name\n * @return {?}\n */\n function (name) { return false; };\n return XmlTagDefinition;\n}());\nexport { XmlTagDefinition };\nfunction XmlTagDefinition_tsickle_Closure_declarations() {\n /** @type {?} */\n XmlTagDefinition.prototype.closedByParent;\n /** @type {?} */\n XmlTagDefinition.prototype.requiredParents;\n /** @type {?} */\n XmlTagDefinition.prototype.parentToAdd;\n /** @type {?} */\n XmlTagDefinition.prototype.implicitNamespacePrefix;\n /** @type {?} */\n XmlTagDefinition.prototype.contentType;\n /** @type {?} */\n XmlTagDefinition.prototype.isVoid;\n /** @type {?} */\n XmlTagDefinition.prototype.ignoreFirstLf;\n /** @type {?} */\n XmlTagDefinition.prototype.canSelfClose;\n}\nvar /** @type {?} */ _TAG_DEFINITION = new XmlTagDefinition();\n/**\n * @param {?} tagName\n * @return {?}\n */\nexport function getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n}\n//# sourceMappingURL=xml_tags.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { Parser } from './parser';\nimport { getXmlTagDefinition } from './xml_tags';\nexport { ParseTreeResult, TreeError } from './parser';\nvar XmlParser = /** @class */ (function (_super) {\n tslib_1.__extends(XmlParser, _super);\n function XmlParser() {\n return _super.call(this, getXmlTagDefinition) || this;\n }\n /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @return {?}\n */\n XmlParser.prototype.parse = /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @return {?}\n */\n function (source, url, parseExpansionForms) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms);\n };\n return XmlParser;\n}(Parser));\nexport { XmlParser };\n//# sourceMappingURL=xml_parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport * as i18n from '../i18n_ast';\n/**\n * @abstract\n */\nvar /**\n * @abstract\n */\nSerializer = /** @class */ (function () {\n function Serializer() {\n }\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n /**\n * @param {?} message\n * @return {?}\n */\n Serializer.prototype.createNameMapper = /**\n * @param {?} message\n * @return {?}\n */\n function (message) { return null; };\n return Serializer;\n}());\n/**\n * @abstract\n */\nexport { Serializer };\nfunction Serializer_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n Serializer.prototype.write = function (messages, locale) { };\n /**\n * @abstract\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n Serializer.prototype.load = function (content, url) { };\n /**\n * @abstract\n * @param {?} message\n * @return {?}\n */\n Serializer.prototype.digest = function (message) { };\n}\n/**\n * A `PlaceholderMapper` converts placeholder names from internal to serialized representation and\n * back.\n *\n * It should be used for serialization format that put constraints on the placeholder names.\n * @record\n */\nexport function PlaceholderMapper() { }\nfunction PlaceholderMapper_tsickle_Closure_declarations() {\n /** @type {?} */\n PlaceholderMapper.prototype.toPublicName;\n /** @type {?} */\n PlaceholderMapper.prototype.toInternalName;\n}\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nvar /**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nSimplePlaceholderMapper = /** @class */ (function (_super) {\n tslib_1.__extends(SimplePlaceholderMapper, _super);\n // create a mapping from the message\n function SimplePlaceholderMapper(message, mapName) {\n var _this = _super.call(this) || this;\n _this.mapName = mapName;\n _this.internalToPublic = {};\n _this.publicToNextId = {};\n _this.publicToInternal = {};\n message.nodes.forEach(function (node) { return node.visit(_this); });\n return _this;\n }\n /**\n * @param {?} internalName\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.toPublicName = /**\n * @param {?} internalName\n * @return {?}\n */\n function (internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ?\n this.internalToPublic[internalName] :\n null;\n };\n /**\n * @param {?} publicName\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.toInternalName = /**\n * @param {?} publicName\n * @return {?}\n */\n function (publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n null;\n };\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { return null; };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n this.visitPlaceholderName(ph.startName);\n _super.prototype.visitTagPlaceholder.call(this, ph, context);\n this.visitPlaceholderName(ph.closeName);\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) { this.visitPlaceholderName(ph.name); };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n this.visitPlaceholderName(ph.name);\n };\n /**\n * @param {?} internalName\n * @return {?}\n */\n SimplePlaceholderMapper.prototype.visitPlaceholderName = /**\n * @param {?} internalName\n * @return {?}\n */\n function (internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n var /** @type {?} */ publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n var /** @type {?} */ nextId = this.publicToNextId[publicName];\n this.publicToNextId[publicName] = nextId + 1;\n publicName = publicName + \"_\" + nextId;\n }\n else {\n this.publicToNextId[publicName] = 1;\n }\n this.internalToPublic[internalName] = publicName;\n this.publicToInternal[publicName] = internalName;\n };\n return SimplePlaceholderMapper;\n}(i18n.RecurseVisitor));\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nexport { SimplePlaceholderMapper };\nfunction SimplePlaceholderMapper_tsickle_Closure_declarations() {\n /** @type {?} */\n SimplePlaceholderMapper.prototype.internalToPublic;\n /** @type {?} */\n SimplePlaceholderMapper.prototype.publicToNextId;\n /** @type {?} */\n SimplePlaceholderMapper.prototype.publicToInternal;\n /** @type {?} */\n SimplePlaceholderMapper.prototype.mapName;\n}\n//# sourceMappingURL=serializer.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\n/**\n * @record\n */\nexport function IVisitor() { }\nfunction IVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n IVisitor.prototype.visitTag;\n /** @type {?} */\n IVisitor.prototype.visitText;\n /** @type {?} */\n IVisitor.prototype.visitDeclaration;\n /** @type {?} */\n IVisitor.prototype.visitDoctype;\n}\nvar _Visitor = /** @class */ (function () {\n function _Visitor() {\n }\n /**\n * @param {?} tag\n * @return {?}\n */\n _Visitor.prototype.visitTag = /**\n * @param {?} tag\n * @return {?}\n */\n function (tag) {\n var _this = this;\n var /** @type {?} */ strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return \"<\" + tag.name + strAttrs + \"/>\";\n }\n var /** @type {?} */ strChildren = tag.children.map(function (node) { return node.visit(_this); });\n return \"<\" + tag.name + strAttrs + \">\" + strChildren.join('') + \"\";\n };\n /**\n * @param {?} text\n * @return {?}\n */\n _Visitor.prototype.visitText = /**\n * @param {?} text\n * @return {?}\n */\n function (text) { return text.value; };\n /**\n * @param {?} decl\n * @return {?}\n */\n _Visitor.prototype.visitDeclaration = /**\n * @param {?} decl\n * @return {?}\n */\n function (decl) {\n return \"\";\n };\n /**\n * @param {?} attrs\n * @return {?}\n */\n _Visitor.prototype._serializeAttributes = /**\n * @param {?} attrs\n * @return {?}\n */\n function (attrs) {\n var /** @type {?} */ strAttrs = Object.keys(attrs).map(function (name) { return name + \"=\\\"\" + attrs[name] + \"\\\"\"; }).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n };\n /**\n * @param {?} doctype\n * @return {?}\n */\n _Visitor.prototype.visitDoctype = /**\n * @param {?} doctype\n * @return {?}\n */\n function (doctype) {\n return \"\";\n };\n return _Visitor;\n}());\nvar /** @type {?} */ _visitor = new _Visitor();\n/**\n * @param {?} nodes\n * @return {?}\n */\nexport function serialize(nodes) {\n return nodes.map(function (node) { return node.visit(_visitor); }).join('');\n}\n/**\n * @record\n */\nexport function Node() { }\nfunction Node_tsickle_Closure_declarations() {\n /** @type {?} */\n Node.prototype.visit;\n}\nvar Declaration = /** @class */ (function () {\n function Declaration(unescapedAttrs) {\n var _this = this;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n /**\n * @param {?} visitor\n * @return {?}\n */\n Declaration.prototype.visit = /**\n * @param {?} visitor\n * @return {?}\n */\n function (visitor) { return visitor.visitDeclaration(this); };\n return Declaration;\n}());\nexport { Declaration };\nfunction Declaration_tsickle_Closure_declarations() {\n /** @type {?} */\n Declaration.prototype.attrs;\n}\nvar Doctype = /** @class */ (function () {\n function Doctype(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n /**\n * @param {?} visitor\n * @return {?}\n */\n Doctype.prototype.visit = /**\n * @param {?} visitor\n * @return {?}\n */\n function (visitor) { return visitor.visitDoctype(this); };\n return Doctype;\n}());\nexport { Doctype };\nfunction Doctype_tsickle_Closure_declarations() {\n /** @type {?} */\n Doctype.prototype.rootTag;\n /** @type {?} */\n Doctype.prototype.dtd;\n}\nvar Tag = /** @class */ (function () {\n function Tag(name, unescapedAttrs, children) {\n if (unescapedAttrs === void 0) { unescapedAttrs = {}; }\n if (children === void 0) { children = []; }\n var _this = this;\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n /**\n * @param {?} visitor\n * @return {?}\n */\n Tag.prototype.visit = /**\n * @param {?} visitor\n * @return {?}\n */\n function (visitor) { return visitor.visitTag(this); };\n return Tag;\n}());\nexport { Tag };\nfunction Tag_tsickle_Closure_declarations() {\n /** @type {?} */\n Tag.prototype.attrs;\n /** @type {?} */\n Tag.prototype.name;\n /** @type {?} */\n Tag.prototype.children;\n}\nvar Text = /** @class */ (function () {\n function Text(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n /**\n * @param {?} visitor\n * @return {?}\n */\n Text.prototype.visit = /**\n * @param {?} visitor\n * @return {?}\n */\n function (visitor) { return visitor.visitText(this); };\n return Text;\n}());\nexport { Text };\nfunction Text_tsickle_Closure_declarations() {\n /** @type {?} */\n Text.prototype.value;\n}\nvar CR = /** @class */ (function (_super) {\n tslib_1.__extends(CR, _super);\n function CR(ws) {\n if (ws === void 0) { ws = 0; }\n return _super.call(this, \"\\n\" + new Array(ws + 1).join(' ')) || this;\n }\n return CR;\n}(Text));\nexport { CR };\nvar /** @type {?} */ _ESCAPED_CHARS = [\n [/&/g, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [//g, '>'],\n];\n/**\n * @param {?} text\n * @return {?}\n */\nexport function escapeXml(text) {\n return _ESCAPED_CHARS.reduce(function (text, entry) { return text.replace(entry[0], entry[1]); }, text);\n}\n//# sourceMappingURL=xml_helper.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport * as ml from '../../ml_parser/ast';\nimport { XmlParser } from '../../ml_parser/xml_parser';\nimport { digest } from '../digest';\nimport * as i18n from '../i18n_ast';\nimport { I18nError } from '../parse_util';\nimport { Serializer } from './serializer';\nimport * as xml from './xml_helper';\nvar /** @type {?} */ _VERSION = '1.2';\nvar /** @type {?} */ _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nvar /** @type {?} */ _DEFAULT_SOURCE_LANG = 'en';\nvar /** @type {?} */ _PLACEHOLDER_TAG = 'x';\nvar /** @type {?} */ _MARKER_TAG = 'mrk';\nvar /** @type {?} */ _FILE_TAG = 'file';\nvar /** @type {?} */ _SOURCE_TAG = 'source';\nvar /** @type {?} */ _SEGMENT_SOURCE_TAG = 'seg-source';\nvar /** @type {?} */ _TARGET_TAG = 'target';\nvar /** @type {?} */ _UNIT_TAG = 'trans-unit';\nvar /** @type {?} */ _CONTEXT_GROUP_TAG = 'context-group';\nvar /** @type {?} */ _CONTEXT_TAG = 'context';\nvar Xliff = /** @class */ (function (_super) {\n tslib_1.__extends(Xliff, _super);\n function Xliff() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n Xliff.prototype.write = /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n function (messages, locale) {\n var /** @type {?} */ visitor = new _WriteVisitor();\n var /** @type {?} */ transUnits = [];\n messages.forEach(function (message) {\n var /** @type {?} */ contextTags = [];\n message.sources.forEach(function (source) {\n var /** @type {?} */ contextGroupTag = new xml.Tag(_CONTEXT_GROUP_TAG, { purpose: 'location' });\n contextGroupTag.children.push(new xml.CR(10), new xml.Tag(_CONTEXT_TAG, { 'context-type': 'sourcefile' }, [new xml.Text(source.filePath)]), new xml.CR(10), new xml.Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new xml.Text(\"\" + source.startLine)]), new xml.CR(8));\n contextTags.push(new xml.CR(8), contextGroupTag);\n });\n var /** @type {?} */ transUnit = new xml.Tag(_UNIT_TAG, { id: message.id, datatype: 'html' });\n (_a = transUnit.children).push.apply(_a, [new xml.CR(8), new xml.Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes))].concat(contextTags));\n if (message.description) {\n transUnit.children.push(new xml.CR(8), new xml.Tag('note', { priority: '1', from: 'description' }, [new xml.Text(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new xml.CR(8), new xml.Tag('note', { priority: '1', from: 'meaning' }, [new xml.Text(message.meaning)]));\n }\n transUnit.children.push(new xml.CR(6));\n transUnits.push(new xml.CR(6), transUnit);\n var _a;\n });\n var /** @type {?} */ body = new xml.Tag('body', {}, transUnits.concat([new xml.CR(4)]));\n var /** @type {?} */ file = new xml.Tag('file', {\n 'source-language': locale || _DEFAULT_SOURCE_LANG,\n datatype: 'plaintext',\n original: 'ng2.template',\n }, [new xml.CR(4), body, new xml.CR(2)]);\n var /** @type {?} */ xliff = new xml.Tag('xliff', { version: _VERSION, xmlns: _XMLNS }, [new xml.CR(2), file, new xml.CR()]);\n return xml.serialize([\n new xml.Declaration({ version: '1.0', encoding: 'UTF-8' }), new xml.CR(), xliff, new xml.CR()\n ]);\n };\n /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n Xliff.prototype.load = /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n function (content, url) {\n // xliff to xml nodes\n var /** @type {?} */ xliffParser = new XliffParser();\n var _a = xliffParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var /** @type {?} */ i18nNodesByMsgId = {};\n var /** @type {?} */ converter = new XmlToI18n();\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;\n errors.push.apply(errors, e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(\"xliff parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: /** @type {?} */ ((locale)), i18nNodesByMsgId: i18nNodesByMsgId };\n };\n /**\n * @param {?} message\n * @return {?}\n */\n Xliff.prototype.digest = /**\n * @param {?} message\n * @return {?}\n */\n function (message) { return digest(message); };\n return Xliff;\n}(Serializer));\nexport { Xliff };\nvar _WriteVisitor = /** @class */ (function () {\n function _WriteVisitor() {\n }\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { return [new xml.Text(text.value)]; };\n /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n var /** @type {?} */ nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });\n return nodes;\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ nodes = [new xml.Text(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, [new xml.Text(c + \" {\")].concat(icu.cases[c].visit(_this), [new xml.Text(\"} \")]));\n });\n nodes.push(new xml.Text(\"}\"));\n return nodes;\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ ctype = getCtypeForTag(ph.tag);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [new xml.Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': \"<\" + ph.tag + \"/>\" })];\n }\n var /** @type {?} */ startTagPh = new xml.Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': \"<\" + ph.tag + \">\" });\n var /** @type {?} */ closeTagPh = new xml.Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype, 'equiv-text': \"\" });\n return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n return [new xml.Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': \"{{\" + ph.value + \"}}\" })];\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ equivText = \"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + \"}\";\n return [new xml.Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': equivText })];\n };\n /**\n * @param {?} nodes\n * @return {?}\n */\n _WriteVisitor.prototype.serialize = /**\n * @param {?} nodes\n * @return {?}\n */\n function (nodes) {\n var _this = this;\n return [].concat.apply([], nodes.map(function (node) { return node.visit(_this); }));\n };\n return _WriteVisitor;\n}());\nvar XliffParser = /** @class */ (function () {\n function XliffParser() {\n this._locale = null;\n }\n /**\n * @param {?} xliff\n * @param {?} url\n * @return {?}\n */\n XliffParser.prototype.parse = /**\n * @param {?} xliff\n * @param {?} url\n * @return {?}\n */\n function (xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n var /** @type {?} */ xml = new XmlParser().parse(xliff, url, false);\n this._errors = xml.errors;\n ml.visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitElement = /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n function (element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = /** @type {?} */ ((null));\n var /** @type {?} */ idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _UNIT_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var /** @type {?} */ id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n ml.visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, \"Message \" + id + \" misses a translation\");\n }\n }\n }\n break;\n // ignore those tags\n case _SOURCE_TAG:\n case _SEGMENT_SOURCE_TAG:\n break;\n case _TARGET_TAG:\n var /** @type {?} */ innerTextStart = /** @type {?} */ ((element.startSourceSpan)).end.offset;\n var /** @type {?} */ innerTextEnd = /** @type {?} */ ((element.endSourceSpan)).start.offset;\n var /** @type {?} */ content = /** @type {?} */ ((element.startSourceSpan)).start.file.content;\n var /** @type {?} */ innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _FILE_TAG:\n var /** @type {?} */ localeAttr = element.attrs.find(function (attr) { return attr.name === 'target-language'; });\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n ml.visitAll(this, element.children, null);\n break;\n default:\n // TODO(vicb): assert file structure, xliff version\n // For now only recurse on unhandled nodes\n ml.visitAll(this, element.children, null);\n }\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitExpansion = /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n function (expansion, context) { };\n /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n XliffParser.prototype.visitExpansionCase = /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n function (expansionCase, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n XliffParser.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(/** @type {?} */ ((node.sourceSpan)), message));\n };\n return XliffParser;\n}());\nfunction XliffParser_tsickle_Closure_declarations() {\n /** @type {?} */\n XliffParser.prototype._unitMlString;\n /** @type {?} */\n XliffParser.prototype._errors;\n /** @type {?} */\n XliffParser.prototype._msgIdToHtml;\n /** @type {?} */\n XliffParser.prototype._locale;\n}\nvar XmlToI18n = /** @class */ (function () {\n function XmlToI18n() {\n }\n /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n XmlToI18n.prototype.convert = /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n function (message, url) {\n var /** @type {?} */ xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var /** @type {?} */ i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] : [].concat.apply([], ml.visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { return new i18n.Text(text.value, /** @type {?} */ ((text.sourceSpan))); };\n /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitElement = /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n function (el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n var /** @type {?} */ nameAttr = el.attrs.find(function (attr) { return attr.name === 'id'; });\n if (nameAttr) {\n return new i18n.Placeholder('', nameAttr.value, /** @type {?} */ ((el.sourceSpan)));\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"id\\\" attribute\");\n return null;\n }\n if (el.name === _MARKER_TAG) {\n return [].concat.apply([], ml.visitAll(this, el.children));\n }\n this._addError(el, \"Unexpected tag\");\n return null;\n };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var /** @type {?} */ caseMap = {};\n ml.visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n });\n return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: ml.visitAll(this, icuCase.expression),\n };\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n XmlToI18n.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(/** @type {?} */ ((node.sourceSpan)), message));\n };\n return XmlToI18n;\n}());\nfunction XmlToI18n_tsickle_Closure_declarations() {\n /** @type {?} */\n XmlToI18n.prototype._errors;\n}\n/**\n * @param {?} tag\n * @return {?}\n */\nfunction getCtypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n return 'lb';\n case 'img':\n return 'image';\n default:\n return \"x-\" + tag;\n }\n}\n//# sourceMappingURL=xliff.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport * as ml from '../../ml_parser/ast';\nimport { XmlParser } from '../../ml_parser/xml_parser';\nimport { decimalDigest } from '../digest';\nimport * as i18n from '../i18n_ast';\nimport { I18nError } from '../parse_util';\nimport { Serializer } from './serializer';\nimport * as xml from './xml_helper';\nvar /** @type {?} */ _VERSION = '2.0';\nvar /** @type {?} */ _XMLNS = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nvar /** @type {?} */ _DEFAULT_SOURCE_LANG = 'en';\nvar /** @type {?} */ _PLACEHOLDER_TAG = 'ph';\nvar /** @type {?} */ _PLACEHOLDER_SPANNING_TAG = 'pc';\nvar /** @type {?} */ _MARKER_TAG = 'mrk';\nvar /** @type {?} */ _XLIFF_TAG = 'xliff';\nvar /** @type {?} */ _SOURCE_TAG = 'source';\nvar /** @type {?} */ _TARGET_TAG = 'target';\nvar /** @type {?} */ _UNIT_TAG = 'unit';\nvar Xliff2 = /** @class */ (function (_super) {\n tslib_1.__extends(Xliff2, _super);\n function Xliff2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n Xliff2.prototype.write = /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n function (messages, locale) {\n var /** @type {?} */ visitor = new _WriteVisitor();\n var /** @type {?} */ units = [];\n messages.forEach(function (message) {\n var /** @type {?} */ unit = new xml.Tag(_UNIT_TAG, { id: message.id });\n var /** @type {?} */ notes = new xml.Tag('notes');\n if (message.description || message.meaning) {\n if (message.description) {\n notes.children.push(new xml.CR(8), new xml.Tag('note', { category: 'description' }, [new xml.Text(message.description)]));\n }\n if (message.meaning) {\n notes.children.push(new xml.CR(8), new xml.Tag('note', { category: 'meaning' }, [new xml.Text(message.meaning)]));\n }\n }\n message.sources.forEach(function (source) {\n notes.children.push(new xml.CR(8), new xml.Tag('note', { category: 'location' }, [\n new xml.Text(source.filePath + \":\" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))\n ]));\n });\n notes.children.push(new xml.CR(6));\n unit.children.push(new xml.CR(6), notes);\n var /** @type {?} */ segment = new xml.Tag('segment');\n segment.children.push(new xml.CR(8), new xml.Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new xml.CR(6));\n unit.children.push(new xml.CR(6), segment, new xml.CR(4));\n units.push(new xml.CR(4), unit);\n });\n var /** @type {?} */ file = new xml.Tag('file', { 'original': 'ng.template', id: 'ngi18n' }, units.concat([new xml.CR(2)]));\n var /** @type {?} */ xliff = new xml.Tag(_XLIFF_TAG, { version: _VERSION, xmlns: _XMLNS, srcLang: locale || _DEFAULT_SOURCE_LANG }, [new xml.CR(2), file, new xml.CR()]);\n return xml.serialize([\n new xml.Declaration({ version: '1.0', encoding: 'UTF-8' }), new xml.CR(), xliff, new xml.CR()\n ]);\n };\n /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n Xliff2.prototype.load = /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n function (content, url) {\n // xliff to xml nodes\n var /** @type {?} */ xliff2Parser = new Xliff2Parser();\n var _a = xliff2Parser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var /** @type {?} */ i18nNodesByMsgId = {};\n var /** @type {?} */ converter = new XmlToI18n();\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;\n errors.push.apply(errors, e);\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(\"xliff2 parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: /** @type {?} */ ((locale)), i18nNodesByMsgId: i18nNodesByMsgId };\n };\n /**\n * @param {?} message\n * @return {?}\n */\n Xliff2.prototype.digest = /**\n * @param {?} message\n * @return {?}\n */\n function (message) { return decimalDigest(message); };\n return Xliff2;\n}(Serializer));\nexport { Xliff2 };\nvar _WriteVisitor = /** @class */ (function () {\n function _WriteVisitor() {\n }\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { return [new xml.Text(text.value)]; };\n /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n var /** @type {?} */ nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });\n return nodes;\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ nodes = [new xml.Text(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, [new xml.Text(c + \" {\")].concat(icu.cases[c].visit(_this), [new xml.Text(\"} \")]));\n });\n nodes.push(new xml.Text(\"}\"));\n return nodes;\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var _this = this;\n var /** @type {?} */ type = getTypeForTag(ph.tag);\n if (ph.isVoid) {\n var /** @type {?} */ tagPh = new xml.Tag(_PLACEHOLDER_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equiv: ph.startName,\n type: type,\n disp: \"<\" + ph.tag + \"/>\",\n });\n return [tagPh];\n }\n var /** @type {?} */ tagPc = new xml.Tag(_PLACEHOLDER_SPANNING_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equivStart: ph.startName,\n equivEnd: ph.closeName,\n type: type,\n dispStart: \"<\" + ph.tag + \">\",\n dispEnd: \"\",\n });\n var /** @type {?} */ nodes = [].concat.apply([], ph.children.map(function (node) { return node.visit(_this); }));\n if (nodes.length) {\n nodes.forEach(function (node) { return tagPc.children.push(node); });\n }\n else {\n tagPc.children.push(new xml.Text(''));\n }\n return [tagPc];\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ idStr = (this._nextPlaceholderId++).toString();\n return [new xml.Tag(_PLACEHOLDER_TAG, {\n id: idStr,\n equiv: ph.name,\n disp: \"{{\" + ph.value + \"}}\",\n })];\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _WriteVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ cases = Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ');\n var /** @type {?} */ idStr = (this._nextPlaceholderId++).toString();\n return [new xml.Tag(_PLACEHOLDER_TAG, { id: idStr, equiv: ph.name, disp: \"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + cases + \"}\" })];\n };\n /**\n * @param {?} nodes\n * @return {?}\n */\n _WriteVisitor.prototype.serialize = /**\n * @param {?} nodes\n * @return {?}\n */\n function (nodes) {\n var _this = this;\n this._nextPlaceholderId = 0;\n return [].concat.apply([], nodes.map(function (node) { return node.visit(_this); }));\n };\n return _WriteVisitor;\n}());\nfunction _WriteVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _WriteVisitor.prototype._nextPlaceholderId;\n}\nvar Xliff2Parser = /** @class */ (function () {\n function Xliff2Parser() {\n this._locale = null;\n }\n /**\n * @param {?} xliff\n * @param {?} url\n * @return {?}\n */\n Xliff2Parser.prototype.parse = /**\n * @param {?} xliff\n * @param {?} url\n * @return {?}\n */\n function (xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n var /** @type {?} */ xml = new XmlParser().parse(xliff, url, false);\n this._errors = xml.errors;\n ml.visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitElement = /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n function (element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = null;\n var /** @type {?} */ idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _UNIT_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var /** @type {?} */ id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n ml.visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, \"Message \" + id + \" misses a translation\");\n }\n }\n }\n break;\n case _SOURCE_TAG:\n // ignore source message\n break;\n case _TARGET_TAG:\n var /** @type {?} */ innerTextStart = /** @type {?} */ ((element.startSourceSpan)).end.offset;\n var /** @type {?} */ innerTextEnd = /** @type {?} */ ((element.endSourceSpan)).start.offset;\n var /** @type {?} */ content = /** @type {?} */ ((element.startSourceSpan)).start.file.content;\n var /** @type {?} */ innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _XLIFF_TAG:\n var /** @type {?} */ localeAttr = element.attrs.find(function (attr) { return attr.name === 'trgLang'; });\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n var /** @type {?} */ versionAttr = element.attrs.find(function (attr) { return attr.name === 'version'; });\n if (versionAttr) {\n var /** @type {?} */ version = versionAttr.value;\n if (version !== '2.0') {\n this._addError(element, \"The XLIFF file version \" + version + \" is not compatible with XLIFF 2.0 serializer\");\n }\n else {\n ml.visitAll(this, element.children, null);\n }\n }\n break;\n default:\n ml.visitAll(this, element.children, null);\n }\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitExpansion = /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n function (expansion, context) { };\n /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n Xliff2Parser.prototype.visitExpansionCase = /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n function (expansionCase, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n Xliff2Parser.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return Xliff2Parser;\n}());\nfunction Xliff2Parser_tsickle_Closure_declarations() {\n /** @type {?} */\n Xliff2Parser.prototype._unitMlString;\n /** @type {?} */\n Xliff2Parser.prototype._errors;\n /** @type {?} */\n Xliff2Parser.prototype._msgIdToHtml;\n /** @type {?} */\n Xliff2Parser.prototype._locale;\n}\nvar XmlToI18n = /** @class */ (function () {\n function XmlToI18n() {\n }\n /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n XmlToI18n.prototype.convert = /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n function (message, url) {\n var /** @type {?} */ xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var /** @type {?} */ i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] : [].concat.apply([], ml.visitAll(this, xmlIcu.rootNodes));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { return new i18n.Text(text.value, text.sourceSpan); };\n /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitElement = /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n function (el, context) {\n var _this = this;\n switch (el.name) {\n case _PLACEHOLDER_TAG:\n var /** @type {?} */ nameAttr = el.attrs.find(function (attr) { return attr.name === 'equiv'; });\n if (nameAttr) {\n return [new i18n.Placeholder('', nameAttr.value, el.sourceSpan)];\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"equiv\\\" attribute\");\n break;\n case _PLACEHOLDER_SPANNING_TAG:\n var /** @type {?} */ startAttr = el.attrs.find(function (attr) { return attr.name === 'equivStart'; });\n var /** @type {?} */ endAttr = el.attrs.find(function (attr) { return attr.name === 'equivEnd'; });\n if (!startAttr) {\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"equivStart\\\" attribute\");\n }\n else if (!endAttr) {\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"equivEnd\\\" attribute\");\n }\n else {\n var /** @type {?} */ startId = startAttr.value;\n var /** @type {?} */ endId = endAttr.value;\n var /** @type {?} */ nodes = [];\n return nodes.concat.apply(nodes, [new i18n.Placeholder('', startId, el.sourceSpan)].concat(el.children.map(function (node) { return node.visit(_this, null); }), [new i18n.Placeholder('', endId, el.sourceSpan)]));\n }\n break;\n case _MARKER_TAG:\n return [].concat.apply([], ml.visitAll(this, el.children));\n default:\n this._addError(el, \"Unexpected tag\");\n }\n return null;\n };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var /** @type {?} */ caseMap = {};\n ml.visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n });\n return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: [].concat.apply([], ml.visitAll(this, icuCase.expression)),\n };\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n XmlToI18n.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XmlToI18n;\n}());\nfunction XmlToI18n_tsickle_Closure_declarations() {\n /** @type {?} */\n XmlToI18n.prototype._errors;\n}\n/**\n * @param {?} tag\n * @return {?}\n */\nfunction getTypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n case 'b':\n case 'i':\n case 'u':\n return 'fmt';\n case 'img':\n return 'image';\n case 'a':\n return 'link';\n default:\n return 'other';\n }\n}\n//# sourceMappingURL=xliff2.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { decimalDigest } from '../digest';\nimport { Serializer, SimplePlaceholderMapper } from './serializer';\nimport * as xml from './xml_helper';\nvar /** @type {?} */ _MESSAGES_TAG = 'messagebundle';\nvar /** @type {?} */ _MESSAGE_TAG = 'msg';\nvar /** @type {?} */ _PLACEHOLDER_TAG = 'ph';\nvar /** @type {?} */ _EXEMPLE_TAG = 'ex';\nvar /** @type {?} */ _SOURCE_TAG = 'source';\nvar /** @type {?} */ _DOCTYPE = \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\";\nvar Xmb = /** @class */ (function (_super) {\n tslib_1.__extends(Xmb, _super);\n function Xmb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n Xmb.prototype.write = /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n function (messages, locale) {\n var /** @type {?} */ exampleVisitor = new ExampleVisitor();\n var /** @type {?} */ visitor = new _Visitor();\n var /** @type {?} */ rootNode = new xml.Tag(_MESSAGES_TAG);\n messages.forEach(function (message) {\n var /** @type {?} */ attrs = { id: message.id };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n var /** @type {?} */ sourceTags = [];\n message.sources.forEach(function (source) {\n sourceTags.push(new xml.Tag(_SOURCE_TAG, {}, [\n new xml.Text(source.filePath + \":\" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))\n ]));\n });\n rootNode.children.push(new xml.CR(2), new xml.Tag(_MESSAGE_TAG, attrs, sourceTags.concat(visitor.serialize(message.nodes))));\n });\n rootNode.children.push(new xml.CR());\n return xml.serialize([\n new xml.Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new xml.CR(),\n new xml.Doctype(_MESSAGES_TAG, _DOCTYPE),\n new xml.CR(),\n exampleVisitor.addDefaultExamples(rootNode),\n new xml.CR(),\n ]);\n };\n /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n Xmb.prototype.load = /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n function (content, url) {\n throw new Error('Unsupported');\n };\n /**\n * @param {?} message\n * @return {?}\n */\n Xmb.prototype.digest = /**\n * @param {?} message\n * @return {?}\n */\n function (message) { return digest(message); };\n /**\n * @param {?} message\n * @return {?}\n */\n Xmb.prototype.createNameMapper = /**\n * @param {?} message\n * @return {?}\n */\n function (message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n };\n return Xmb;\n}(Serializer));\nexport { Xmb };\nvar _Visitor = /** @class */ (function () {\n function _Visitor() {\n }\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n _Visitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) { return [new xml.Text(text.value)]; };\n /**\n * @param {?} container\n * @param {?} context\n * @return {?}\n */\n _Visitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n var /** @type {?} */ nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });\n return nodes;\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n _Visitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ nodes = [new xml.Text(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, [new xml.Text(c + \" {\")].concat(icu.cases[c].visit(_this), [new xml.Text(\"} \")]));\n });\n nodes.push(new xml.Text(\"}\"));\n return nodes;\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _Visitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ startEx = new xml.Tag(_EXEMPLE_TAG, {}, [new xml.Text(\"<\" + ph.tag + \">\")]);\n var /** @type {?} */ startTagPh = new xml.Tag(_PLACEHOLDER_TAG, { name: ph.startName }, [startEx]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n var /** @type {?} */ closeEx = new xml.Tag(_EXEMPLE_TAG, {}, [new xml.Text(\"\")]);\n var /** @type {?} */ closeTagPh = new xml.Tag(_PLACEHOLDER_TAG, { name: ph.closeName }, [closeEx]);\n return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _Visitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ exTag = new xml.Tag(_EXEMPLE_TAG, {}, [new xml.Text(\"{{\" + ph.value + \"}}\")]);\n return [new xml.Tag(_PLACEHOLDER_TAG, { name: ph.name }, [exTag])];\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n _Visitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ exTag = new xml.Tag(_EXEMPLE_TAG, {}, [\n new xml.Text(\"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + \"}\")\n ]);\n return [new xml.Tag(_PLACEHOLDER_TAG, { name: ph.name }, [exTag])];\n };\n /**\n * @param {?} nodes\n * @return {?}\n */\n _Visitor.prototype.serialize = /**\n * @param {?} nodes\n * @return {?}\n */\n function (nodes) {\n var _this = this;\n return [].concat.apply([], nodes.map(function (node) { return node.visit(_this); }));\n };\n return _Visitor;\n}());\n/**\n * @param {?} message\n * @return {?}\n */\nexport function digest(message) {\n return decimalDigest(message);\n}\nvar ExampleVisitor = /** @class */ (function () {\n function ExampleVisitor() {\n }\n /**\n * @param {?} node\n * @return {?}\n */\n ExampleVisitor.prototype.addDefaultExamples = /**\n * @param {?} node\n * @return {?}\n */\n function (node) {\n node.visit(this);\n return node;\n };\n /**\n * @param {?} tag\n * @return {?}\n */\n ExampleVisitor.prototype.visitTag = /**\n * @param {?} tag\n * @return {?}\n */\n function (tag) {\n var _this = this;\n if (tag.name === _PLACEHOLDER_TAG) {\n if (!tag.children || tag.children.length == 0) {\n var /** @type {?} */ exText = new xml.Text(tag.attrs['name'] || '...');\n tag.children = [new xml.Tag(_EXEMPLE_TAG, {}, [exText])];\n }\n }\n else if (tag.children) {\n tag.children.forEach(function (node) { return node.visit(_this); });\n }\n };\n /**\n * @param {?} text\n * @return {?}\n */\n ExampleVisitor.prototype.visitText = /**\n * @param {?} text\n * @return {?}\n */\n function (text) { };\n /**\n * @param {?} decl\n * @return {?}\n */\n ExampleVisitor.prototype.visitDeclaration = /**\n * @param {?} decl\n * @return {?}\n */\n function (decl) { };\n /**\n * @param {?} doctype\n * @return {?}\n */\n ExampleVisitor.prototype.visitDoctype = /**\n * @param {?} doctype\n * @return {?}\n */\n function (doctype) { };\n return ExampleVisitor;\n}());\n/**\n * @param {?} internalName\n * @return {?}\n */\nexport function toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n//# sourceMappingURL=xmb.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport * as ml from '../../ml_parser/ast';\nimport { XmlParser } from '../../ml_parser/xml_parser';\nimport * as i18n from '../i18n_ast';\nimport { I18nError } from '../parse_util';\nimport { Serializer, SimplePlaceholderMapper } from './serializer';\nimport { digest, toPublicName } from './xmb';\nvar /** @type {?} */ _TRANSLATIONS_TAG = 'translationbundle';\nvar /** @type {?} */ _TRANSLATION_TAG = 'translation';\nvar /** @type {?} */ _PLACEHOLDER_TAG = 'ph';\nvar Xtb = /** @class */ (function (_super) {\n tslib_1.__extends(Xtb, _super);\n function Xtb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n Xtb.prototype.write = /**\n * @param {?} messages\n * @param {?} locale\n * @return {?}\n */\n function (messages, locale) { throw new Error('Unsupported'); };\n /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n Xtb.prototype.load = /**\n * @param {?} content\n * @param {?} url\n * @return {?}\n */\n function (content, url) {\n // xtb to xml nodes\n var /** @type {?} */ xtbParser = new XtbParser();\n var _a = xtbParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var /** @type {?} */ i18nNodesByMsgId = {};\n var /** @type {?} */ converter = new XmlToI18n();\n // Because we should be able to load xtb files that rely on features not supported by angular,\n // we need to delay the conversion of html to i18n nodes so that non angular messages are not\n // converted\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var /** @type {?} */ valueFn = function () {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, errors = _a.errors;\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n return i18nNodes;\n };\n createLazyProperty(i18nNodesByMsgId, msgId, valueFn);\n });\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: /** @type {?} */ ((locale)), i18nNodesByMsgId: i18nNodesByMsgId };\n };\n /**\n * @param {?} message\n * @return {?}\n */\n Xtb.prototype.digest = /**\n * @param {?} message\n * @return {?}\n */\n function (message) { return digest(message); };\n /**\n * @param {?} message\n * @return {?}\n */\n Xtb.prototype.createNameMapper = /**\n * @param {?} message\n * @return {?}\n */\n function (message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n };\n return Xtb;\n}(Serializer));\nexport { Xtb };\n/**\n * @param {?} messages\n * @param {?} id\n * @param {?} valueFn\n * @return {?}\n */\nfunction createLazyProperty(messages, id, valueFn) {\n Object.defineProperty(messages, id, {\n configurable: true,\n enumerable: true,\n get: function () {\n var /** @type {?} */ value = valueFn();\n Object.defineProperty(messages, id, { enumerable: true, value: value });\n return value;\n },\n set: function (_) { throw new Error('Could not overwrite an XTB translation'); },\n });\n}\nvar XtbParser = /** @class */ (function () {\n function XtbParser() {\n this._locale = null;\n }\n /**\n * @param {?} xtb\n * @param {?} url\n * @return {?}\n */\n XtbParser.prototype.parse = /**\n * @param {?} xtb\n * @param {?} url\n * @return {?}\n */\n function (xtb, url) {\n this._bundleDepth = 0;\n this._msgIdToHtml = {};\n // We can not parse the ICU messages at this point as some messages might not originate\n // from Angular that could not be lex'd.\n var /** @type {?} */ xml = new XmlParser().parse(xtb, url, false);\n this._errors = xml.errors;\n ml.visitAll(this, xml.rootNodes);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitElement = /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n function (element, context) {\n switch (element.name) {\n case _TRANSLATIONS_TAG:\n this._bundleDepth++;\n if (this._bundleDepth > 1) {\n this._addError(element, \"<\" + _TRANSLATIONS_TAG + \"> elements can not be nested\");\n }\n var /** @type {?} */ langAttr = element.attrs.find(function (attr) { return attr.name === 'lang'; });\n if (langAttr) {\n this._locale = langAttr.value;\n }\n ml.visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n var /** @type {?} */ idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _TRANSLATION_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var /** @type {?} */ id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n var /** @type {?} */ innerTextStart = /** @type {?} */ ((element.startSourceSpan)).end.offset;\n var /** @type {?} */ innerTextEnd = /** @type {?} */ ((element.endSourceSpan)).start.offset;\n var /** @type {?} */ content = /** @type {?} */ ((element.startSourceSpan)).start.file.content;\n var /** @type {?} */ innerText = content.slice(/** @type {?} */ ((innerTextStart)), /** @type {?} */ ((innerTextEnd)));\n this._msgIdToHtml[id] = innerText;\n }\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitExpansion = /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n function (expansion, context) { };\n /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n XtbParser.prototype.visitExpansionCase = /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n function (expansionCase, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n XtbParser.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(/** @type {?} */ ((node.sourceSpan)), message));\n };\n return XtbParser;\n}());\nfunction XtbParser_tsickle_Closure_declarations() {\n /** @type {?} */\n XtbParser.prototype._bundleDepth;\n /** @type {?} */\n XtbParser.prototype._errors;\n /** @type {?} */\n XtbParser.prototype._msgIdToHtml;\n /** @type {?} */\n XtbParser.prototype._locale;\n}\nvar XmlToI18n = /** @class */ (function () {\n function XmlToI18n() {\n }\n /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n XmlToI18n.prototype.convert = /**\n * @param {?} message\n * @param {?} url\n * @return {?}\n */\n function (message, url) {\n var /** @type {?} */ xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var /** @type {?} */ i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n ml.visitAll(this, xmlIcu.rootNodes);\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { return new i18n.Text(text.value, /** @type {?} */ ((text.sourceSpan))); };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n var /** @type {?} */ caseMap = {};\n ml.visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new i18n.Container(c.nodes, icu.sourceSpan);\n });\n return new i18n.Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: ml.visitAll(this, icuCase.expression),\n };\n };\n /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitElement = /**\n * @param {?} el\n * @param {?} context\n * @return {?}\n */\n function (el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n var /** @type {?} */ nameAttr = el.attrs.find(function (attr) { return attr.name === 'name'; });\n if (nameAttr) {\n return new i18n.Placeholder('', nameAttr.value, /** @type {?} */ ((el.sourceSpan)));\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"name\\\" attribute\");\n }\n else {\n this._addError(el, \"Unexpected tag\");\n }\n return null;\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n XmlToI18n.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { };\n /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n XmlToI18n.prototype._addError = /**\n * @param {?} node\n * @param {?} message\n * @return {?}\n */\n function (node, message) {\n this._errors.push(new I18nError(/** @type {?} */ ((node.sourceSpan)), message));\n };\n return XmlToI18n;\n}());\nfunction XmlToI18n_tsickle_Closure_declarations() {\n /** @type {?} */\n XmlToI18n.prototype._errors;\n}\n//# sourceMappingURL=xtb.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { getHtmlTagDefinition } from './html_tags';\nimport { DEFAULT_INTERPOLATION_CONFIG } from './interpolation_config';\nimport { Parser } from './parser';\nexport { ParseTreeResult, TreeError } from './parser';\nvar HtmlParser = /** @class */ (function (_super) {\n tslib_1.__extends(HtmlParser, _super);\n function HtmlParser() {\n return _super.call(this, getHtmlTagDefinition) || this;\n }\n /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n HtmlParser.prototype.parse = /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);\n };\n return HtmlParser;\n}(Parser));\nexport { HtmlParser };\n//# sourceMappingURL=html_parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { MissingTranslationStrategy } from '../core';\nimport { HtmlParser } from '../ml_parser/html_parser';\nimport { I18nError } from './parse_util';\nimport { escapeXml } from './serializers/xml_helper';\n/**\n * A container for translated messages\n */\nvar /**\n * A container for translated messages\n */\nTranslationBundle = /** @class */ (function () {\n function TranslationBundle(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console) {\n if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }\n if (missingTranslationStrategy === void 0) { missingTranslationStrategy = MissingTranslationStrategy.Warning; }\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this.digest = digest;\n this.mapperFactory = mapperFactory;\n this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, /** @type {?} */ ((mapperFactory)), missingTranslationStrategy, console);\n }\n // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n /**\n * @param {?} content\n * @param {?} url\n * @param {?} serializer\n * @param {?} missingTranslationStrategy\n * @param {?=} console\n * @return {?}\n */\n TranslationBundle.load = /**\n * @param {?} content\n * @param {?} url\n * @param {?} serializer\n * @param {?} missingTranslationStrategy\n * @param {?=} console\n * @return {?}\n */\n function (content, url, serializer, missingTranslationStrategy, console) {\n var _a = serializer.load(content, url), locale = _a.locale, i18nNodesByMsgId = _a.i18nNodesByMsgId;\n var /** @type {?} */ digestFn = function (m) { return serializer.digest(m); };\n var /** @type {?} */ mapperFactory = function (m) { return ((serializer.createNameMapper(m))); };\n return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);\n };\n // Returns the translation as HTML nodes from the given source message.\n /**\n * @param {?} srcMsg\n * @return {?}\n */\n TranslationBundle.prototype.get = /**\n * @param {?} srcMsg\n * @return {?}\n */\n function (srcMsg) {\n var /** @type {?} */ html = this._i18nToHtml.convert(srcMsg);\n if (html.errors.length) {\n throw new Error(html.errors.join('\\n'));\n }\n return html.nodes;\n };\n /**\n * @param {?} srcMsg\n * @return {?}\n */\n TranslationBundle.prototype.has = /**\n * @param {?} srcMsg\n * @return {?}\n */\n function (srcMsg) { return this.digest(srcMsg) in this._i18nNodesByMsgId; };\n return TranslationBundle;\n}());\n/**\n * A container for translated messages\n */\nexport { TranslationBundle };\nfunction TranslationBundle_tsickle_Closure_declarations() {\n /** @type {?} */\n TranslationBundle.prototype._i18nToHtml;\n /** @type {?} */\n TranslationBundle.prototype._i18nNodesByMsgId;\n /** @type {?} */\n TranslationBundle.prototype.digest;\n /** @type {?} */\n TranslationBundle.prototype.mapperFactory;\n}\nvar I18nToHtmlVisitor = /** @class */ (function () {\n function I18nToHtmlVisitor(_i18nNodesByMsgId, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {\n if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this._locale = _locale;\n this._digest = _digest;\n this._mapperFactory = _mapperFactory;\n this._missingTranslationStrategy = _missingTranslationStrategy;\n this._console = _console;\n this._contextStack = [];\n this._errors = [];\n }\n /**\n * @param {?} srcMsg\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.convert = /**\n * @param {?} srcMsg\n * @return {?}\n */\n function (srcMsg) {\n this._contextStack.length = 0;\n this._errors.length = 0;\n // i18n to text\n var /** @type {?} */ text = this._convertToText(srcMsg);\n // text to html\n var /** @type {?} */ url = srcMsg.nodes[0].sourceSpan.start.file.url;\n var /** @type {?} */ html = new HtmlParser().parse(text, url, true);\n return {\n nodes: html.rootNodes,\n errors: this._errors.concat(html.errors),\n };\n };\n /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?=} context\n * @return {?}\n */\n function (text, context) {\n // `convert()` uses an `HtmlParser` to return `html.Node`s\n // we should then make sure that any special characters are escaped\n return escapeXml(text.value);\n };\n /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitContainer = /**\n * @param {?} container\n * @param {?=} context\n * @return {?}\n */\n function (container, context) {\n var _this = this;\n return container.children.map(function (n) { return n.visit(_this); }).join('');\n };\n /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitIcu = /**\n * @param {?} icu\n * @param {?=} context\n * @return {?}\n */\n function (icu, context) {\n var _this = this;\n var /** @type {?} */ cases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n // TODO(vicb): Once all format switch to using expression placeholders\n // we should throw when the placeholder is not in the source message\n var /** @type {?} */ exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?\n this._srcMsg.placeholders[icu.expression] :\n icu.expression;\n return \"{\" + exp + \", \" + icu.type + \", \" + cases.join(' ') + \"}\";\n };\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var /** @type {?} */ phName = this._mapper(ph.name);\n if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n return this._srcMsg.placeholders[phName];\n }\n if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {\n return this._convertToText(this._srcMsg.placeholderToMessage[phName]);\n }\n this._addError(ph, \"Unknown placeholder \\\"\" + ph.name + \"\\\"\");\n return '';\n };\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitTagPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n var _this = this;\n var /** @type {?} */ tag = \"\" + ph.tag;\n var /** @type {?} */ attrs = Object.keys(ph.attrs).map(function (name) { return name + \"=\\\"\" + ph.attrs[name] + \"\\\"\"; }).join(' ');\n if (ph.isVoid) {\n return \"<\" + tag + \" \" + attrs + \"/>\";\n }\n var /** @type {?} */ children = ph.children.map(function (c) { return c.visit(_this); }).join('');\n return \"<\" + tag + \" \" + attrs + \">\" + children + \"\";\n };\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n I18nToHtmlVisitor.prototype.visitIcuPlaceholder = /**\n * @param {?} ph\n * @param {?=} context\n * @return {?}\n */\n function (ph, context) {\n // An ICU placeholder references the source message to be serialized\n return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);\n };\n /**\n * Convert a source message to a translated text string:\n * - text nodes are replaced with their translation,\n * - placeholders are replaced with their content,\n * - ICU nodes are converted to ICU expressions.\n * @param {?} srcMsg\n * @return {?}\n */\n I18nToHtmlVisitor.prototype._convertToText = /**\n * Convert a source message to a translated text string:\n * - text nodes are replaced with their translation,\n * - placeholders are replaced with their content,\n * - ICU nodes are converted to ICU expressions.\n * @param {?} srcMsg\n * @return {?}\n */\n function (srcMsg) {\n var _this = this;\n var /** @type {?} */ id = this._digest(srcMsg);\n var /** @type {?} */ mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n var /** @type {?} */ nodes;\n this._contextStack.push({ msg: this._srcMsg, mapper: this._mapper });\n this._srcMsg = srcMsg;\n if (this._i18nNodesByMsgId.hasOwnProperty(id)) {\n // When there is a translation use its nodes as the source\n // And create a mapper to convert serialized placeholder names to internal names\n nodes = this._i18nNodesByMsgId[id];\n this._mapper = function (name) { return mapper ? /** @type {?} */ ((mapper.toInternalName(name))) : name; };\n }\n else {\n // When no translation has been found\n // - report an error / a warning / nothing,\n // - use the nodes from the original message\n // - placeholders are already internal and need no mapper\n if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {\n var /** @type {?} */ ctx = this._locale ? \" for locale \\\"\" + this._locale + \"\\\"\" : '';\n this._addError(srcMsg.nodes[0], \"Missing translation for message \\\"\" + id + \"\\\"\" + ctx);\n }\n else if (this._console &&\n this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n var /** @type {?} */ ctx = this._locale ? \" for locale \\\"\" + this._locale + \"\\\"\" : '';\n this._console.warn(\"Missing translation for message \\\"\" + id + \"\\\"\" + ctx);\n }\n nodes = srcMsg.nodes;\n this._mapper = function (name) { return name; };\n }\n var /** @type {?} */ text = nodes.map(function (node) { return node.visit(_this); }).join('');\n var /** @type {?} */ context = /** @type {?} */ ((this._contextStack.pop()));\n this._srcMsg = context.msg;\n this._mapper = context.mapper;\n return text;\n };\n /**\n * @param {?} el\n * @param {?} msg\n * @return {?}\n */\n I18nToHtmlVisitor.prototype._addError = /**\n * @param {?} el\n * @param {?} msg\n * @return {?}\n */\n function (el, msg) {\n this._errors.push(new I18nError(el.sourceSpan, msg));\n };\n return I18nToHtmlVisitor;\n}());\nfunction I18nToHtmlVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n I18nToHtmlVisitor.prototype._srcMsg;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._contextStack;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._errors;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._mapper;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._i18nNodesByMsgId;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._locale;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._digest;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._mapperFactory;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._missingTranslationStrategy;\n /** @type {?} */\n I18nToHtmlVisitor.prototype._console;\n}\n//# sourceMappingURL=translation_bundle.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { MissingTranslationStrategy } from '../core';\nimport { DEFAULT_INTERPOLATION_CONFIG } from '../ml_parser/interpolation_config';\nimport { ParseTreeResult } from '../ml_parser/parser';\nimport { digest } from './digest';\nimport { mergeTranslations } from './extractor_merger';\nimport { Xliff } from './serializers/xliff';\nimport { Xliff2 } from './serializers/xliff2';\nimport { Xmb } from './serializers/xmb';\nimport { Xtb } from './serializers/xtb';\nimport { TranslationBundle } from './translation_bundle';\nvar I18NHtmlParser = /** @class */ (function () {\n function I18NHtmlParser(_htmlParser, translations, translationsFormat, missingTranslation, console) {\n if (missingTranslation === void 0) { missingTranslation = MissingTranslationStrategy.Warning; }\n this._htmlParser = _htmlParser;\n if (translations) {\n var /** @type {?} */ serializer = createSerializer(translationsFormat);\n this._translationBundle =\n TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n }\n else {\n this._translationBundle =\n new TranslationBundle({}, null, digest, undefined, missingTranslation, console);\n }\n }\n /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n I18NHtmlParser.prototype.parse = /**\n * @param {?} source\n * @param {?} url\n * @param {?=} parseExpansionForms\n * @param {?=} interpolationConfig\n * @return {?}\n */\n function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var /** @type {?} */ parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);\n if (parseResult.errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n }\n return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n };\n return I18NHtmlParser;\n}());\nexport { I18NHtmlParser };\nfunction I18NHtmlParser_tsickle_Closure_declarations() {\n /** @type {?} */\n I18NHtmlParser.prototype.getTagDefinition;\n /** @type {?} */\n I18NHtmlParser.prototype._translationBundle;\n /** @type {?} */\n I18NHtmlParser.prototype._htmlParser;\n}\n/**\n * @param {?=} format\n * @return {?}\n */\nfunction createSerializer(format) {\n format = (format || 'xlf').toLowerCase();\n switch (format) {\n case 'xmb':\n return new Xmb();\n case 'xtb':\n return new Xtb();\n case 'xliff2':\n case 'xlf2':\n return new Xliff2();\n case 'xliff':\n case 'xlf':\n default:\n return new Xliff();\n }\n}\n//# sourceMappingURL=i18n_html_parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar /** @type {?} */ STRIP_SRC_FILE_SUFFIXES = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\nvar /** @type {?} */ GENERATED_FILE = /\\.ngfactory\\.|\\.ngsummary\\./;\nvar /** @type {?} */ JIT_SUMMARY_FILE = /\\.ngsummary\\./;\nvar /** @type {?} */ JIT_SUMMARY_NAME = /NgSummary$/;\n/**\n * @param {?} filePath\n * @param {?=} forceSourceFile\n * @return {?}\n */\nexport function ngfactoryFilePath(filePath, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n var /** @type {?} */ urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);\n return urlWithSuffix[0] + \".ngfactory\" + normalizeGenFileSuffix(urlWithSuffix[1]);\n}\n/**\n * @param {?} filePath\n * @return {?}\n */\nexport function stripGeneratedFileSuffix(filePath) {\n return filePath.replace(GENERATED_FILE, '.');\n}\n/**\n * @param {?} filePath\n * @return {?}\n */\nexport function isGeneratedFile(filePath) {\n return GENERATED_FILE.test(filePath);\n}\n/**\n * @param {?} path\n * @param {?=} forceSourceFile\n * @return {?}\n */\nexport function splitTypescriptSuffix(path, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n if (path.endsWith('.d.ts')) {\n return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];\n }\n var /** @type {?} */ lastDot = path.lastIndexOf('.');\n if (lastDot !== -1) {\n return [path.substring(0, lastDot), path.substring(lastDot)];\n }\n return [path, ''];\n}\n/**\n * @param {?} srcFileSuffix\n * @return {?}\n */\nexport function normalizeGenFileSuffix(srcFileSuffix) {\n return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;\n}\n/**\n * @param {?} fileName\n * @return {?}\n */\nexport function summaryFileName(fileName) {\n var /** @type {?} */ fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');\n return fileNameWithoutSuffix + \".ngsummary.json\";\n}\n/**\n * @param {?} fileName\n * @param {?=} forceSourceFile\n * @return {?}\n */\nexport function summaryForJitFileName(fileName, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n var /** @type {?} */ urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);\n return urlWithSuffix[0] + \".ngsummary\" + urlWithSuffix[1];\n}\n/**\n * @param {?} filePath\n * @return {?}\n */\nexport function stripSummaryForJitFileSuffix(filePath) {\n return filePath.replace(JIT_SUMMARY_FILE, '.');\n}\n/**\n * @param {?} symbolName\n * @return {?}\n */\nexport function summaryForJitName(symbolName) {\n return symbolName + \"NgSummary\";\n}\n/**\n * @param {?} symbolName\n * @return {?}\n */\nexport function stripSummaryForJitNameSuffix(symbolName) {\n return symbolName.replace(JIT_SUMMARY_NAME, '');\n}\nvar /** @type {?} */ LOWERED_SYMBOL = /\\u0275\\d+/;\n/**\n * @param {?} name\n * @return {?}\n */\nexport function isLoweredSymbol(name) {\n return LOWERED_SYMBOL.test(name);\n}\n/**\n * @param {?} id\n * @return {?}\n */\nexport function createLoweredSymbol(id) {\n return \"\\u0275\" + id;\n}\n//# sourceMappingURL=util.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar /** @type {?} */ CORE = '@angular/core';\nvar Identifiers = /** @class */ (function () {\n function Identifiers() {\n }\n Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {\n name: 'ANALYZE_FOR_ENTRY_COMPONENTS',\n moduleName: CORE,\n };\n Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };\n Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };\n Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };\n Identifiers.ChangeDetectorRef = {\n name: 'ChangeDetectorRef',\n moduleName: CORE,\n };\n Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };\n Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };\n Identifiers.CodegenComponentFactoryResolver = {\n name: 'ɵCodegenComponentFactoryResolver',\n moduleName: CORE,\n };\n Identifiers.ComponentFactoryResolver = {\n name: 'ComponentFactoryResolver',\n moduleName: CORE,\n };\n Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };\n Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };\n Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };\n Identifiers.createModuleFactory = {\n name: 'ɵcmf',\n moduleName: CORE,\n };\n Identifiers.moduleDef = {\n name: 'ɵmod',\n moduleName: CORE,\n };\n Identifiers.moduleProviderDef = {\n name: 'ɵmpd',\n moduleName: CORE,\n };\n Identifiers.RegisterModuleFactoryFn = {\n name: 'ɵregisterModuleFactory',\n moduleName: CORE,\n };\n Identifiers.Injector = { name: 'Injector', moduleName: CORE };\n Identifiers.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE,\n };\n Identifiers.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE,\n };\n Identifiers.SecurityContext = {\n name: 'SecurityContext',\n moduleName: CORE,\n };\n Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };\n Identifiers.TRANSLATIONS_FORMAT = {\n name: 'TRANSLATIONS_FORMAT',\n moduleName: CORE,\n };\n Identifiers.inlineInterpolate = {\n name: 'ɵinlineInterpolate',\n moduleName: CORE,\n };\n Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };\n Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };\n Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };\n Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };\n Identifiers.viewDef = { name: 'ɵvid', moduleName: CORE };\n Identifiers.elementDef = { name: 'ɵeld', moduleName: CORE };\n Identifiers.anchorDef = { name: 'ɵand', moduleName: CORE };\n Identifiers.textDef = { name: 'ɵted', moduleName: CORE };\n Identifiers.directiveDef = { name: 'ɵdid', moduleName: CORE };\n Identifiers.providerDef = { name: 'ɵprd', moduleName: CORE };\n Identifiers.queryDef = { name: 'ɵqud', moduleName: CORE };\n Identifiers.pureArrayDef = { name: 'ɵpad', moduleName: CORE };\n Identifiers.pureObjectDef = { name: 'ɵpod', moduleName: CORE };\n Identifiers.purePipeDef = { name: 'ɵppd', moduleName: CORE };\n Identifiers.pipeDef = { name: 'ɵpid', moduleName: CORE };\n Identifiers.nodeValue = { name: 'ɵnov', moduleName: CORE };\n Identifiers.ngContentDef = { name: 'ɵncd', moduleName: CORE };\n Identifiers.unwrapValue = { name: 'ɵunv', moduleName: CORE };\n Identifiers.createRendererType2 = { name: 'ɵcrt', moduleName: CORE };\n // type only\n Identifiers.RendererType2 = {\n name: 'RendererType2',\n moduleName: CORE,\n };\n // type only\n Identifiers.ViewDefinition = {\n name: 'ɵViewDefinition',\n moduleName: CORE,\n };\n Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };\n return Identifiers;\n}());\nexport { Identifiers };\nfunction Identifiers_tsickle_Closure_declarations() {\n /** @type {?} */\n Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS;\n /** @type {?} */\n Identifiers.ElementRef;\n /** @type {?} */\n Identifiers.NgModuleRef;\n /** @type {?} */\n Identifiers.ViewContainerRef;\n /** @type {?} */\n Identifiers.ChangeDetectorRef;\n /** @type {?} */\n Identifiers.QueryList;\n /** @type {?} */\n Identifiers.TemplateRef;\n /** @type {?} */\n Identifiers.CodegenComponentFactoryResolver;\n /** @type {?} */\n Identifiers.ComponentFactoryResolver;\n /** @type {?} */\n Identifiers.ComponentFactory;\n /** @type {?} */\n Identifiers.ComponentRef;\n /** @type {?} */\n Identifiers.NgModuleFactory;\n /** @type {?} */\n Identifiers.createModuleFactory;\n /** @type {?} */\n Identifiers.moduleDef;\n /** @type {?} */\n Identifiers.moduleProviderDef;\n /** @type {?} */\n Identifiers.RegisterModuleFactoryFn;\n /** @type {?} */\n Identifiers.Injector;\n /** @type {?} */\n Identifiers.ViewEncapsulation;\n /** @type {?} */\n Identifiers.ChangeDetectionStrategy;\n /** @type {?} */\n Identifiers.SecurityContext;\n /** @type {?} */\n Identifiers.LOCALE_ID;\n /** @type {?} */\n Identifiers.TRANSLATIONS_FORMAT;\n /** @type {?} */\n Identifiers.inlineInterpolate;\n /** @type {?} */\n Identifiers.interpolate;\n /** @type {?} */\n Identifiers.EMPTY_ARRAY;\n /** @type {?} */\n Identifiers.EMPTY_MAP;\n /** @type {?} */\n Identifiers.Renderer;\n /** @type {?} */\n Identifiers.viewDef;\n /** @type {?} */\n Identifiers.elementDef;\n /** @type {?} */\n Identifiers.anchorDef;\n /** @type {?} */\n Identifiers.textDef;\n /** @type {?} */\n Identifiers.directiveDef;\n /** @type {?} */\n Identifiers.providerDef;\n /** @type {?} */\n Identifiers.queryDef;\n /** @type {?} */\n Identifiers.pureArrayDef;\n /** @type {?} */\n Identifiers.pureObjectDef;\n /** @type {?} */\n Identifiers.purePipeDef;\n /** @type {?} */\n Identifiers.pipeDef;\n /** @type {?} */\n Identifiers.nodeValue;\n /** @type {?} */\n Identifiers.ngContentDef;\n /** @type {?} */\n Identifiers.unwrapValue;\n /** @type {?} */\n Identifiers.createRendererType2;\n /** @type {?} */\n Identifiers.RendererType2;\n /** @type {?} */\n Identifiers.ViewDefinition;\n /** @type {?} */\n Identifiers.createComponentFactory;\n}\n/**\n * @param {?} reference\n * @return {?}\n */\nexport function createTokenForReference(reference) {\n return { identifier: { reference: reference } };\n}\n/**\n * @param {?} reflector\n * @param {?} reference\n * @return {?}\n */\nexport function createTokenForExternalReference(reflector, reference) {\n return createTokenForReference(reflector.resolveExternalReference(reference));\n}\n//# sourceMappingURL=identifiers.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @enum {number} */\nvar LifecycleHooks = {\n OnInit: 0,\n OnDestroy: 1,\n DoCheck: 2,\n OnChanges: 3,\n AfterContentInit: 4,\n AfterContentChecked: 5,\n AfterViewInit: 6,\n AfterViewChecked: 7,\n};\nexport { LifecycleHooks };\nLifecycleHooks[LifecycleHooks.OnInit] = \"OnInit\";\nLifecycleHooks[LifecycleHooks.OnDestroy] = \"OnDestroy\";\nLifecycleHooks[LifecycleHooks.DoCheck] = \"DoCheck\";\nLifecycleHooks[LifecycleHooks.OnChanges] = \"OnChanges\";\nLifecycleHooks[LifecycleHooks.AfterContentInit] = \"AfterContentInit\";\nLifecycleHooks[LifecycleHooks.AfterContentChecked] = \"AfterContentChecked\";\nLifecycleHooks[LifecycleHooks.AfterViewInit] = \"AfterViewInit\";\nLifecycleHooks[LifecycleHooks.AfterViewChecked] = \"AfterViewChecked\";\nexport var /** @type {?} */ LIFECYCLE_HOOKS_VALUES = [\n LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,\n LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,\n LifecycleHooks.AfterViewChecked\n];\n/**\n * @param {?} reflector\n * @param {?} hook\n * @param {?} token\n * @return {?}\n */\nexport function hasLifecycleHook(reflector, hook, token) {\n return reflector.hasLifecycleHook(token, getHookName(hook));\n}\n/**\n * @param {?} reflector\n * @param {?} token\n * @return {?}\n */\nexport function getAllLifecycleHooks(reflector, token) {\n return LIFECYCLE_HOOKS_VALUES.filter(function (hook) { return hasLifecycleHook(reflector, hook, token); });\n}\n/**\n * @param {?} hook\n * @return {?}\n */\nfunction getHookName(hook) {\n switch (hook) {\n case LifecycleHooks.OnInit:\n return 'ngOnInit';\n case LifecycleHooks.OnDestroy:\n return 'ngOnDestroy';\n case LifecycleHooks.DoCheck:\n return 'ngDoCheck';\n case LifecycleHooks.OnChanges:\n return 'ngOnChanges';\n case LifecycleHooks.AfterContentInit:\n return 'ngAfterContentInit';\n case LifecycleHooks.AfterContentChecked:\n return 'ngAfterContentChecked';\n case LifecycleHooks.AfterViewInit:\n return 'ngAfterViewInit';\n case LifecycleHooks.AfterViewChecked:\n return 'ngAfterViewChecked';\n }\n}\n//# sourceMappingURL=lifecycle_reflector.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { getHtmlTagDefinition } from './ml_parser/html_tags';\nvar /** @type {?} */ _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' + //\":not(\"\n '([-\\\\w]+)|' + // \"tag\"\n '(?:\\\\.([-\\\\w]+))|' + // \".class\"\n '(?:\\\\[([-.\\\\w*]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n '(\\\\))|' + // \")\"\n '(\\\\s*,\\\\s*)', // \",\"\n'g');\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nvar /**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nCssSelector = /** @class */ (function () {\n function CssSelector() {\n this.element = null;\n this.classNames = [];\n this.attrs = [];\n this.notSelectors = [];\n }\n /**\n * @param {?} selector\n * @return {?}\n */\n CssSelector.parse = /**\n * @param {?} selector\n * @return {?}\n */\n function (selector) {\n var /** @type {?} */ results = [];\n var /** @type {?} */ _addResult = function (res, cssSel) {\n if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&\n cssSel.attrs.length == 0) {\n cssSel.element = '*';\n }\n res.push(cssSel);\n };\n var /** @type {?} */ cssSelector = new CssSelector();\n var /** @type {?} */ match;\n var /** @type {?} */ current = cssSelector;\n var /** @type {?} */ inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1]) {\n if (inNot) {\n throw new Error('Nesting :not is not allowed in a selector');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n if (match[2]) {\n current.setElement(match[2]);\n }\n if (match[3]) {\n current.addClassName(match[3]);\n }\n if (match[4]) {\n current.addAttribute(match[4], match[6]);\n }\n if (match[7]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8]) {\n if (inNot) {\n throw new Error('Multiple selectors in :not are not supported');\n }\n _addResult(results, cssSelector);\n cssSelector = current = new CssSelector();\n }\n }\n _addResult(results, cssSelector);\n return results;\n };\n /**\n * @return {?}\n */\n CssSelector.prototype.isElementSelector = /**\n * @return {?}\n */\n function () {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n this.notSelectors.length === 0;\n };\n /**\n * @return {?}\n */\n CssSelector.prototype.hasElementSelector = /**\n * @return {?}\n */\n function () { return !!this.element; };\n /**\n * @param {?=} element\n * @return {?}\n */\n CssSelector.prototype.setElement = /**\n * @param {?=} element\n * @return {?}\n */\n function (element) {\n if (element === void 0) { element = null; }\n this.element = element;\n };\n /** Gets a template string for an element that matches the selector. */\n /**\n * Gets a template string for an element that matches the selector.\n * @return {?}\n */\n CssSelector.prototype.getMatchingElementTemplate = /**\n * Gets a template string for an element that matches the selector.\n * @return {?}\n */\n function () {\n var /** @type {?} */ tagName = this.element || 'div';\n var /** @type {?} */ classAttr = this.classNames.length > 0 ? \" class=\\\"\" + this.classNames.join(' ') + \"\\\"\" : '';\n var /** @type {?} */ attrs = '';\n for (var /** @type {?} */ i = 0; i < this.attrs.length; i += 2) {\n var /** @type {?} */ attrName = this.attrs[i];\n var /** @type {?} */ attrValue = this.attrs[i + 1] !== '' ? \"=\\\"\" + this.attrs[i + 1] + \"\\\"\" : '';\n attrs += \" \" + attrName + attrValue;\n }\n return getHtmlTagDefinition(tagName).isVoid ? \"<\" + tagName + classAttr + attrs + \"/>\" :\n \"<\" + tagName + classAttr + attrs + \">\";\n };\n /**\n * @param {?} name\n * @param {?=} value\n * @return {?}\n */\n CssSelector.prototype.addAttribute = /**\n * @param {?} name\n * @param {?=} value\n * @return {?}\n */\n function (name, value) {\n if (value === void 0) { value = ''; }\n this.attrs.push(name, value && value.toLowerCase() || '');\n };\n /**\n * @param {?} name\n * @return {?}\n */\n CssSelector.prototype.addClassName = /**\n * @param {?} name\n * @return {?}\n */\n function (name) { this.classNames.push(name.toLowerCase()); };\n /**\n * @return {?}\n */\n CssSelector.prototype.toString = /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(function (klass) { return res += \".\" + klass; });\n }\n if (this.attrs) {\n for (var /** @type {?} */ i = 0; i < this.attrs.length; i += 2) {\n var /** @type {?} */ name_1 = this.attrs[i];\n var /** @type {?} */ value = this.attrs[i + 1];\n res += \"[\" + name_1 + (value ? '=' + value : '') + \"]\";\n }\n }\n this.notSelectors.forEach(function (notSelector) { return res += \":not(\" + notSelector + \")\"; });\n return res;\n };\n return CssSelector;\n}());\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nexport { CssSelector };\nfunction CssSelector_tsickle_Closure_declarations() {\n /** @type {?} */\n CssSelector.prototype.element;\n /** @type {?} */\n CssSelector.prototype.classNames;\n /** @type {?} */\n CssSelector.prototype.attrs;\n /** @type {?} */\n CssSelector.prototype.notSelectors;\n}\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nvar /**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nSelectorMatcher = /** @class */ (function () {\n function SelectorMatcher() {\n this._elementMap = new Map();\n this._elementPartialMap = new Map();\n this._classMap = new Map();\n this._classPartialMap = new Map();\n this._attrValueMap = new Map();\n this._attrValuePartialMap = new Map();\n this._listContexts = [];\n }\n /**\n * @param {?} notSelectors\n * @return {?}\n */\n SelectorMatcher.createNotMatcher = /**\n * @param {?} notSelectors\n * @return {?}\n */\n function (notSelectors) {\n var /** @type {?} */ notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n };\n /**\n * @param {?} cssSelectors\n * @param {?=} callbackCtxt\n * @return {?}\n */\n SelectorMatcher.prototype.addSelectables = /**\n * @param {?} cssSelectors\n * @param {?=} callbackCtxt\n * @return {?}\n */\n function (cssSelectors, callbackCtxt) {\n var /** @type {?} */ listContext = /** @type {?} */ ((null));\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (var /** @type {?} */ i = 0; i < cssSelectors.length; i++) {\n this._addSelectable(cssSelectors[i], callbackCtxt, listContext);\n }\n };\n /**\n * Add an object that can be found later on by calling `match`.\n * @param {?} cssSelector A css selector\n * @param {?} callbackCtxt An opaque object that will be given to the callback of the `match` function\n * @param {?} listContext\n * @return {?}\n */\n SelectorMatcher.prototype._addSelectable = /**\n * Add an object that can be found later on by calling `match`.\n * @param {?} cssSelector A css selector\n * @param {?} callbackCtxt An opaque object that will be given to the callback of the `match` function\n * @param {?} listContext\n * @return {?}\n */\n function (cssSelector, callbackCtxt, listContext) {\n var /** @type {?} */ matcher = this;\n var /** @type {?} */ element = cssSelector.element;\n var /** @type {?} */ classNames = cssSelector.classNames;\n var /** @type {?} */ attrs = cssSelector.attrs;\n var /** @type {?} */ selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n var /** @type {?} */ isTerminal = attrs.length === 0 && classNames.length === 0;\n if (isTerminal) {\n this._addTerminal(matcher._elementMap, element, selectable);\n }\n else {\n matcher = this._addPartial(matcher._elementPartialMap, element);\n }\n }\n if (classNames) {\n for (var /** @type {?} */ i = 0; i < classNames.length; i++) {\n var /** @type {?} */ isTerminal = attrs.length === 0 && i === classNames.length - 1;\n var /** @type {?} */ className = classNames[i];\n if (isTerminal) {\n this._addTerminal(matcher._classMap, className, selectable);\n }\n else {\n matcher = this._addPartial(matcher._classPartialMap, className);\n }\n }\n }\n if (attrs) {\n for (var /** @type {?} */ i = 0; i < attrs.length; i += 2) {\n var /** @type {?} */ isTerminal = i === attrs.length - 2;\n var /** @type {?} */ name_2 = attrs[i];\n var /** @type {?} */ value = attrs[i + 1];\n if (isTerminal) {\n var /** @type {?} */ terminalMap = matcher._attrValueMap;\n var /** @type {?} */ terminalValuesMap = terminalMap.get(name_2);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name_2, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n }\n else {\n var /** @type {?} */ partialMap = matcher._attrValuePartialMap;\n var /** @type {?} */ partialValuesMap = partialMap.get(name_2);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name_2, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n };\n /**\n * @param {?} map\n * @param {?} name\n * @param {?} selectable\n * @return {?}\n */\n SelectorMatcher.prototype._addTerminal = /**\n * @param {?} map\n * @param {?} name\n * @param {?} selectable\n * @return {?}\n */\n function (map, name, selectable) {\n var /** @type {?} */ terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n };\n /**\n * @param {?} map\n * @param {?} name\n * @return {?}\n */\n SelectorMatcher.prototype._addPartial = /**\n * @param {?} map\n * @param {?} name\n * @return {?}\n */\n function (map, name) {\n var /** @type {?} */ matcher = map.get(name);\n if (!matcher) {\n matcher = new SelectorMatcher();\n map.set(name, matcher);\n }\n return matcher;\n };\n /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param cssSelector A css selector\n * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return boolean true if a match was found\n */\n /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param {?} cssSelector A css selector\n * @param {?} matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return {?} boolean true if a match was found\n */\n SelectorMatcher.prototype.match = /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param {?} cssSelector A css selector\n * @param {?} matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return {?} boolean true if a match was found\n */\n function (cssSelector, matchedCallback) {\n var /** @type {?} */ result = false;\n var /** @type {?} */ element = /** @type {?} */ ((cssSelector.element));\n var /** @type {?} */ classNames = cssSelector.classNames;\n var /** @type {?} */ attrs = cssSelector.attrs;\n for (var /** @type {?} */ i = 0; i < this._listContexts.length; i++) {\n this._listContexts[i].alreadyMatched = false;\n }\n result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||\n result;\n if (classNames) {\n for (var /** @type {?} */ i = 0; i < classNames.length; i++) {\n var /** @type {?} */ className = classNames[i];\n result =\n this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n result =\n this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||\n result;\n }\n }\n if (attrs) {\n for (var /** @type {?} */ i = 0; i < attrs.length; i += 2) {\n var /** @type {?} */ name_3 = attrs[i];\n var /** @type {?} */ value = attrs[i + 1];\n var /** @type {?} */ terminalValuesMap = /** @type {?} */ ((this._attrValueMap.get(name_3)));\n if (value) {\n result =\n this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n var /** @type {?} */ partialValuesMap = /** @type {?} */ ((this._attrValuePartialMap.get(name_3)));\n if (value) {\n result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n }\n }\n return result;\n };\n /** @internal */\n /**\n * \\@internal\n * @param {?} map\n * @param {?} name\n * @param {?} cssSelector\n * @param {?} matchedCallback\n * @return {?}\n */\n SelectorMatcher.prototype._matchTerminal = /**\n * \\@internal\n * @param {?} map\n * @param {?} name\n * @param {?} cssSelector\n * @param {?} matchedCallback\n * @return {?}\n */\n function (map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n var /** @type {?} */ selectables = map.get(name) || [];\n var /** @type {?} */ starSelectables = /** @type {?} */ ((map.get('*')));\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n var /** @type {?} */ selectable;\n var /** @type {?} */ result = false;\n for (var /** @type {?} */ i = 0; i < selectables.length; i++) {\n selectable = selectables[i];\n result = selectable.finalize(cssSelector, matchedCallback) || result;\n }\n return result;\n };\n /** @internal */\n /**\n * \\@internal\n * @param {?} map\n * @param {?} name\n * @param {?} cssSelector\n * @param {?} matchedCallback\n * @return {?}\n */\n SelectorMatcher.prototype._matchPartial = /**\n * \\@internal\n * @param {?} map\n * @param {?} name\n * @param {?} cssSelector\n * @param {?} matchedCallback\n * @return {?}\n */\n function (map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n var /** @type {?} */ nestedSelector = map.get(name);\n if (!nestedSelector) {\n return false;\n }\n // TODO(perf): get rid of recursion and measure again\n // TODO(perf): don't pass the whole selector into the recursion,\n // but only the not processed parts\n return nestedSelector.match(cssSelector, matchedCallback);\n };\n return SelectorMatcher;\n}());\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nexport { SelectorMatcher };\nfunction SelectorMatcher_tsickle_Closure_declarations() {\n /** @type {?} */\n SelectorMatcher.prototype._elementMap;\n /** @type {?} */\n SelectorMatcher.prototype._elementPartialMap;\n /** @type {?} */\n SelectorMatcher.prototype._classMap;\n /** @type {?} */\n SelectorMatcher.prototype._classPartialMap;\n /** @type {?} */\n SelectorMatcher.prototype._attrValueMap;\n /** @type {?} */\n SelectorMatcher.prototype._attrValuePartialMap;\n /** @type {?} */\n SelectorMatcher.prototype._listContexts;\n}\nvar SelectorListContext = /** @class */ (function () {\n function SelectorListContext(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n return SelectorListContext;\n}());\nexport { SelectorListContext };\nfunction SelectorListContext_tsickle_Closure_declarations() {\n /** @type {?} */\n SelectorListContext.prototype.alreadyMatched;\n /** @type {?} */\n SelectorListContext.prototype.selectors;\n}\nvar SelectorContext = /** @class */ (function () {\n function SelectorContext(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n /**\n * @param {?} cssSelector\n * @param {?} callback\n * @return {?}\n */\n SelectorContext.prototype.finalize = /**\n * @param {?} cssSelector\n * @param {?} callback\n * @return {?}\n */\n function (cssSelector, callback) {\n var /** @type {?} */ result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n var /** @type {?} */ notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n result = !notMatcher.match(cssSelector, null);\n }\n if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n if (this.listContext) {\n this.listContext.alreadyMatched = true;\n }\n callback(this.selector, this.cbContext);\n }\n return result;\n };\n return SelectorContext;\n}());\nexport { SelectorContext };\nfunction SelectorContext_tsickle_Closure_declarations() {\n /** @type {?} */\n SelectorContext.prototype.notSelectors;\n /** @type {?} */\n SelectorContext.prototype.selector;\n /** @type {?} */\n SelectorContext.prototype.cbContext;\n /** @type {?} */\n SelectorContext.prototype.listContext;\n}\n//# sourceMappingURL=selector.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { StaticSymbol } from './aot/static_symbol';\nimport { ngfactoryFilePath } from './aot/util';\nimport { assertArrayOfStrings, assertInterpolationSymbols } from './assertions';\nimport * as cpl from './compile_metadata';\nimport { ChangeDetectionStrategy, Type, ViewEncapsulation, createAttribute, createComponent, createHost, createInject, createInjectable, createInjectionToken, createOptional, createSelf, createSkipSelf } from './core';\nimport { Identifiers } from './identifiers';\nimport { getAllLifecycleHooks } from './lifecycle_reflector';\nimport { CssSelector } from './selector';\nimport { SyncAsync, ValueTransformer, isPromise, noUndefined, resolveForwardRef, stringify, syntaxError, visitValue } from './util';\nexport var /** @type {?} */ ERROR_COMPONENT_TYPE = 'ngComponentType';\nvar CompileMetadataResolver = /** @class */ (function () {\n function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {\n this._config = _config;\n this._htmlParser = _htmlParser;\n this._ngModuleResolver = _ngModuleResolver;\n this._directiveResolver = _directiveResolver;\n this._pipeResolver = _pipeResolver;\n this._summaryResolver = _summaryResolver;\n this._schemaRegistry = _schemaRegistry;\n this._directiveNormalizer = _directiveNormalizer;\n this._console = _console;\n this._staticSymbolCache = _staticSymbolCache;\n this._reflector = _reflector;\n this._errorCollector = _errorCollector;\n this._nonNormalizedDirectiveCache = new Map();\n this._directiveCache = new Map();\n this._summaryCache = new Map();\n this._pipeCache = new Map();\n this._ngModuleCache = new Map();\n this._ngModuleOfTypes = new Map();\n }\n /**\n * @return {?}\n */\n CompileMetadataResolver.prototype.getReflector = /**\n * @return {?}\n */\n function () { return this._reflector; };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.clearCacheFor = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n var /** @type {?} */ dirMeta = this._directiveCache.get(type);\n this._directiveCache.delete(type);\n this._nonNormalizedDirectiveCache.delete(type);\n this._summaryCache.delete(type);\n this._pipeCache.delete(type);\n this._ngModuleOfTypes.delete(type);\n // Clear all of the NgModule as they contain transitive information!\n this._ngModuleCache.clear();\n if (dirMeta) {\n this._directiveNormalizer.clearCacheFor(dirMeta);\n }\n };\n /**\n * @return {?}\n */\n CompileMetadataResolver.prototype.clearCache = /**\n * @return {?}\n */\n function () {\n this._directiveCache.clear();\n this._nonNormalizedDirectiveCache.clear();\n this._summaryCache.clear();\n this._pipeCache.clear();\n this._ngModuleCache.clear();\n this._ngModuleOfTypes.clear();\n this._directiveNormalizer.clearCache();\n };\n /**\n * @param {?} baseType\n * @param {?} name\n * @return {?}\n */\n CompileMetadataResolver.prototype._createProxyClass = /**\n * @param {?} baseType\n * @param {?} name\n * @return {?}\n */\n function (baseType, name) {\n var /** @type {?} */ delegate = null;\n var /** @type {?} */ proxyClass = /** @type {?} */ (function () {\n if (!delegate) {\n throw new Error(\"Illegal state: Class \" + name + \" for type \" + stringify(baseType) + \" is not compiled yet!\");\n }\n return delegate.apply(this, arguments);\n });\n proxyClass.setDelegate = function (d) {\n delegate = d;\n (/** @type {?} */ (proxyClass)).prototype = d.prototype;\n };\n // Make stringify work correctly\n (/** @type {?} */ (proxyClass)).overriddenName = name;\n return proxyClass;\n };\n /**\n * @param {?} dirType\n * @param {?} name\n * @return {?}\n */\n CompileMetadataResolver.prototype.getGeneratedClass = /**\n * @param {?} dirType\n * @param {?} name\n * @return {?}\n */\n function (dirType, name) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);\n }\n else {\n return this._createProxyClass(dirType, name);\n }\n };\n /**\n * @param {?} dirType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getComponentViewClass = /**\n * @param {?} dirType\n * @return {?}\n */\n function (dirType) {\n return this.getGeneratedClass(dirType, cpl.viewClassName(dirType, 0));\n };\n /**\n * @param {?} dirType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getHostComponentViewClass = /**\n * @param {?} dirType\n * @return {?}\n */\n function (dirType) {\n return this.getGeneratedClass(dirType, cpl.hostViewClassName(dirType));\n };\n /**\n * @param {?} dirType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getHostComponentType = /**\n * @param {?} dirType\n * @return {?}\n */\n function (dirType) {\n var /** @type {?} */ name = cpl.identifierName({ reference: dirType }) + \"_Host\";\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(dirType.filePath, name);\n }\n else {\n var /** @type {?} */ HostClass = /** @type {?} */ (function HostClass() { });\n HostClass.overriddenName = name;\n return HostClass;\n }\n };\n /**\n * @param {?} dirType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getRendererType = /**\n * @param {?} dirType\n * @return {?}\n */\n function (dirType) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), cpl.rendererTypeName(dirType));\n }\n else {\n // returning an object as proxy,\n // that we fill later during runtime compilation.\n return /** @type {?} */ ({});\n }\n };\n /**\n * @param {?} selector\n * @param {?} dirType\n * @param {?} inputs\n * @param {?} outputs\n * @return {?}\n */\n CompileMetadataResolver.prototype.getComponentFactory = /**\n * @param {?} selector\n * @param {?} dirType\n * @param {?} inputs\n * @param {?} outputs\n * @return {?}\n */\n function (selector, dirType, inputs, outputs) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), cpl.componentFactoryName(dirType));\n }\n else {\n var /** @type {?} */ hostView = this.getHostComponentViewClass(dirType);\n // Note: ngContentSelectors will be filled later once the template is\n // loaded.\n var /** @type {?} */ createComponentFactory = this._reflector.resolveExternalReference(Identifiers.createComponentFactory);\n return createComponentFactory(selector, dirType, /** @type {?} */ (hostView), inputs, outputs, []);\n }\n };\n /**\n * @param {?} factory\n * @param {?} ngContentSelectors\n * @return {?}\n */\n CompileMetadataResolver.prototype.initComponentFactory = /**\n * @param {?} factory\n * @param {?} ngContentSelectors\n * @return {?}\n */\n function (factory, ngContentSelectors) {\n if (!(factory instanceof StaticSymbol)) {\n (_a = (/** @type {?} */ (factory)).ngContentSelectors).push.apply(_a, ngContentSelectors);\n }\n var _a;\n };\n /**\n * @param {?} type\n * @param {?} kind\n * @return {?}\n */\n CompileMetadataResolver.prototype._loadSummary = /**\n * @param {?} type\n * @param {?} kind\n * @return {?}\n */\n function (type, kind) {\n var /** @type {?} */ typeSummary = this._summaryCache.get(type);\n if (!typeSummary) {\n var /** @type {?} */ summary = this._summaryResolver.resolveSummary(type);\n typeSummary = summary ? summary.type : null;\n this._summaryCache.set(type, typeSummary || null);\n }\n return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;\n };\n /**\n * @param {?} compMeta\n * @param {?=} hostViewType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getHostComponentMetadata = /**\n * @param {?} compMeta\n * @param {?=} hostViewType\n * @return {?}\n */\n function (compMeta, hostViewType) {\n var /** @type {?} */ hostType = this.getHostComponentType(compMeta.type.reference);\n if (!hostViewType) {\n hostViewType = this.getHostComponentViewClass(hostType);\n }\n // Note: ! is ok here as this method should only be called with normalized directive\n // metadata, which always fills in the selector.\n var /** @type {?} */ template = CssSelector.parse(/** @type {?} */ ((compMeta.selector)))[0].getMatchingElementTemplate();\n var /** @type {?} */ templateUrl = '';\n var /** @type {?} */ htmlAst = this._htmlParser.parse(template, templateUrl);\n return cpl.CompileDirectiveMetadata.create({\n isHost: true,\n type: { reference: hostType, diDeps: [], lifecycleHooks: [] },\n template: new cpl.CompileTemplateMetadata({\n encapsulation: ViewEncapsulation.None,\n template: template,\n templateUrl: templateUrl,\n htmlAst: htmlAst,\n styles: [],\n styleUrls: [],\n ngContentSelectors: [],\n animations: [],\n isInline: true,\n externalStylesheets: [],\n interpolation: null,\n preserveWhitespaces: false,\n }),\n exportAs: null,\n changeDetection: ChangeDetectionStrategy.Default,\n inputs: [],\n outputs: [],\n host: {},\n isComponent: true,\n selector: '*',\n providers: [],\n viewProviders: [],\n queries: [],\n guards: {},\n viewQueries: [],\n componentViewType: hostViewType,\n rendererType: /** @type {?} */ ({ id: '__Host__', encapsulation: ViewEncapsulation.None, styles: [], data: {} }),\n entryComponents: [],\n componentFactory: null\n });\n };\n /**\n * @param {?} ngModuleType\n * @param {?} directiveType\n * @param {?} isSync\n * @return {?}\n */\n CompileMetadataResolver.prototype.loadDirectiveMetadata = /**\n * @param {?} ngModuleType\n * @param {?} directiveType\n * @param {?} isSync\n * @return {?}\n */\n function (ngModuleType, directiveType, isSync) {\n var _this = this;\n if (this._directiveCache.has(directiveType)) {\n return null;\n }\n directiveType = resolveForwardRef(directiveType);\n var _a = /** @type {?} */ ((this.getNonNormalizedDirectiveMetadata(directiveType))), annotation = _a.annotation, metadata = _a.metadata;\n var /** @type {?} */ createDirectiveMetadata = function (templateMetadata) {\n var /** @type {?} */ normalizedDirMeta = new cpl.CompileDirectiveMetadata({\n isHost: false,\n type: metadata.type,\n isComponent: metadata.isComponent,\n selector: metadata.selector,\n exportAs: metadata.exportAs,\n changeDetection: metadata.changeDetection,\n inputs: metadata.inputs,\n outputs: metadata.outputs,\n hostListeners: metadata.hostListeners,\n hostProperties: metadata.hostProperties,\n hostAttributes: metadata.hostAttributes,\n providers: metadata.providers,\n viewProviders: metadata.viewProviders,\n queries: metadata.queries,\n guards: metadata.guards,\n viewQueries: metadata.viewQueries,\n entryComponents: metadata.entryComponents,\n componentViewType: metadata.componentViewType,\n rendererType: metadata.rendererType,\n componentFactory: metadata.componentFactory,\n template: templateMetadata\n });\n if (templateMetadata) {\n _this.initComponentFactory(/** @type {?} */ ((metadata.componentFactory)), templateMetadata.ngContentSelectors);\n }\n _this._directiveCache.set(directiveType, normalizedDirMeta);\n _this._summaryCache.set(directiveType, normalizedDirMeta.toSummary());\n return null;\n };\n if (metadata.isComponent) {\n var /** @type {?} */ template = /** @type {?} */ ((metadata.template));\n var /** @type {?} */ templateMeta = this._directiveNormalizer.normalizeTemplate({\n ngModuleType: ngModuleType,\n componentType: directiveType,\n moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),\n encapsulation: template.encapsulation,\n template: template.template,\n templateUrl: template.templateUrl,\n styles: template.styles,\n styleUrls: template.styleUrls,\n animations: template.animations,\n interpolation: template.interpolation,\n preserveWhitespaces: template.preserveWhitespaces\n });\n if (isPromise(templateMeta) && isSync) {\n this._reportError(componentStillLoadingError(directiveType), directiveType);\n return null;\n }\n return SyncAsync.then(templateMeta, createDirectiveMetadata);\n }\n else {\n // directive\n createDirectiveMetadata(null);\n return null;\n }\n };\n /**\n * @param {?} directiveType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata = /**\n * @param {?} directiveType\n * @return {?}\n */\n function (directiveType) {\n var _this = this;\n directiveType = resolveForwardRef(directiveType);\n if (!directiveType) {\n return null;\n }\n var /** @type {?} */ cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);\n if (cacheEntry) {\n return cacheEntry;\n }\n var /** @type {?} */ dirMeta = this._directiveResolver.resolve(directiveType, false);\n if (!dirMeta) {\n return null;\n }\n var /** @type {?} */ nonNormalizedTemplateMetadata = /** @type {?} */ ((undefined));\n if (createComponent.isTypeOf(dirMeta)) {\n // component\n var /** @type {?} */ compMeta = /** @type {?} */ (dirMeta);\n assertArrayOfStrings('styles', compMeta.styles);\n assertArrayOfStrings('styleUrls', compMeta.styleUrls);\n assertInterpolationSymbols('interpolation', compMeta.interpolation);\n var /** @type {?} */ animations = compMeta.animations;\n nonNormalizedTemplateMetadata = new cpl.CompileTemplateMetadata({\n encapsulation: noUndefined(compMeta.encapsulation),\n template: noUndefined(compMeta.template),\n templateUrl: noUndefined(compMeta.templateUrl),\n htmlAst: null,\n styles: compMeta.styles || [],\n styleUrls: compMeta.styleUrls || [],\n animations: animations || [],\n interpolation: noUndefined(compMeta.interpolation),\n isInline: !!compMeta.template,\n externalStylesheets: [],\n ngContentSelectors: [],\n preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces),\n });\n }\n var /** @type {?} */ changeDetectionStrategy = /** @type {?} */ ((null));\n var /** @type {?} */ viewProviders = [];\n var /** @type {?} */ entryComponentMetadata = [];\n var /** @type {?} */ selector = dirMeta.selector;\n if (createComponent.isTypeOf(dirMeta)) {\n // Component\n var /** @type {?} */ compMeta = /** @type {?} */ (dirMeta);\n changeDetectionStrategy = /** @type {?} */ ((compMeta.changeDetection));\n if (compMeta.viewProviders) {\n viewProviders = this._getProvidersMetadata(compMeta.viewProviders, entryComponentMetadata, \"viewProviders for \\\"\" + stringifyType(directiveType) + \"\\\"\", [], directiveType);\n }\n if (compMeta.entryComponents) {\n entryComponentMetadata = flattenAndDedupeArray(compMeta.entryComponents)\n .map(function (type) { return ((_this._getEntryComponentMetadata(type))); })\n .concat(entryComponentMetadata);\n }\n if (!selector) {\n selector = this._schemaRegistry.getDefaultComponentElementName();\n }\n }\n else {\n // Directive\n if (!selector) {\n this._reportError(syntaxError(\"Directive \" + stringifyType(directiveType) + \" has no selector, please add it!\"), directiveType);\n selector = 'error';\n }\n }\n var /** @type {?} */ providers = [];\n if (dirMeta.providers != null) {\n providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, \"providers for \\\"\" + stringifyType(directiveType) + \"\\\"\", [], directiveType);\n }\n var /** @type {?} */ queries = [];\n var /** @type {?} */ viewQueries = [];\n if (dirMeta.queries != null) {\n queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);\n viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);\n }\n var /** @type {?} */ metadata = cpl.CompileDirectiveMetadata.create({\n isHost: false,\n selector: selector,\n exportAs: noUndefined(dirMeta.exportAs),\n isComponent: !!nonNormalizedTemplateMetadata,\n type: this._getTypeMetadata(directiveType),\n template: nonNormalizedTemplateMetadata,\n changeDetection: changeDetectionStrategy,\n inputs: dirMeta.inputs || [],\n outputs: dirMeta.outputs || [],\n host: dirMeta.host || {},\n providers: providers || [],\n viewProviders: viewProviders || [],\n queries: queries || [],\n guards: dirMeta.guards || {},\n viewQueries: viewQueries || [],\n entryComponents: entryComponentMetadata,\n componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) :\n null,\n rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,\n componentFactory: null\n });\n if (nonNormalizedTemplateMetadata) {\n metadata.componentFactory =\n this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);\n }\n cacheEntry = { metadata: metadata, annotation: dirMeta };\n this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);\n return cacheEntry;\n };\n /**\n * Gets the metadata for the given directive.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n */\n /**\n * Gets the metadata for the given directive.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n * @param {?} directiveType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getDirectiveMetadata = /**\n * Gets the metadata for the given directive.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n * @param {?} directiveType\n * @return {?}\n */\n function (directiveType) {\n var /** @type {?} */ dirMeta = /** @type {?} */ ((this._directiveCache.get(directiveType)));\n if (!dirMeta) {\n this._reportError(syntaxError(\"Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive \" + stringifyType(directiveType) + \".\"), directiveType);\n }\n return dirMeta;\n };\n /**\n * @param {?} dirType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getDirectiveSummary = /**\n * @param {?} dirType\n * @return {?}\n */\n function (dirType) {\n var /** @type {?} */ dirSummary = /** @type {?} */ (this._loadSummary(dirType, cpl.CompileSummaryKind.Directive));\n if (!dirSummary) {\n this._reportError(syntaxError(\"Illegal state: Could not load the summary for directive \" + stringifyType(dirType) + \".\"), dirType);\n }\n return dirSummary;\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.isDirective = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n return !!this._loadSummary(type, cpl.CompileSummaryKind.Directive) ||\n this._directiveResolver.isDirective(type);\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.isPipe = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n return !!this._loadSummary(type, cpl.CompileSummaryKind.Pipe) ||\n this._pipeResolver.isPipe(type);\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.isNgModule = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n return !!this._loadSummary(type, cpl.CompileSummaryKind.NgModule) ||\n this._ngModuleResolver.isNgModule(type);\n };\n /**\n * @param {?} moduleType\n * @param {?=} alreadyCollecting\n * @return {?}\n */\n CompileMetadataResolver.prototype.getNgModuleSummary = /**\n * @param {?} moduleType\n * @param {?=} alreadyCollecting\n * @return {?}\n */\n function (moduleType, alreadyCollecting) {\n if (alreadyCollecting === void 0) { alreadyCollecting = null; }\n var /** @type {?} */ moduleSummary = /** @type {?} */ (this._loadSummary(moduleType, cpl.CompileSummaryKind.NgModule));\n if (!moduleSummary) {\n var /** @type {?} */ moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);\n moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;\n if (moduleSummary) {\n this._summaryCache.set(moduleType, moduleSummary);\n }\n }\n return moduleSummary;\n };\n /**\n * Loads the declared directives and pipes of an NgModule.\n */\n /**\n * Loads the declared directives and pipes of an NgModule.\n * @param {?} moduleType\n * @param {?} isSync\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata = /**\n * Loads the declared directives and pipes of an NgModule.\n * @param {?} moduleType\n * @param {?} isSync\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n function (moduleType, isSync, throwIfNotFound) {\n var _this = this;\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var /** @type {?} */ ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);\n var /** @type {?} */ loading = [];\n if (ngModule) {\n ngModule.declaredDirectives.forEach(function (id) {\n var /** @type {?} */ promise = _this.loadDirectiveMetadata(moduleType, id.reference, isSync);\n if (promise) {\n loading.push(promise);\n }\n });\n ngModule.declaredPipes.forEach(function (id) { return _this._loadPipeMetadata(id.reference); });\n }\n return Promise.all(loading);\n };\n /**\n * @param {?} moduleType\n * @param {?=} throwIfNotFound\n * @param {?=} alreadyCollecting\n * @return {?}\n */\n CompileMetadataResolver.prototype.getNgModuleMetadata = /**\n * @param {?} moduleType\n * @param {?=} throwIfNotFound\n * @param {?=} alreadyCollecting\n * @return {?}\n */\n function (moduleType, throwIfNotFound, alreadyCollecting) {\n var _this = this;\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n if (alreadyCollecting === void 0) { alreadyCollecting = null; }\n moduleType = resolveForwardRef(moduleType);\n var /** @type {?} */ compileMeta = this._ngModuleCache.get(moduleType);\n if (compileMeta) {\n return compileMeta;\n }\n var /** @type {?} */ meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);\n if (!meta) {\n return null;\n }\n var /** @type {?} */ declaredDirectives = [];\n var /** @type {?} */ exportedNonModuleIdentifiers = [];\n var /** @type {?} */ declaredPipes = [];\n var /** @type {?} */ importedModules = [];\n var /** @type {?} */ exportedModules = [];\n var /** @type {?} */ providers = [];\n var /** @type {?} */ entryComponents = [];\n var /** @type {?} */ bootstrapComponents = [];\n var /** @type {?} */ schemas = [];\n if (meta.imports) {\n flattenAndDedupeArray(meta.imports).forEach(function (importedType) {\n var /** @type {?} */ importedModuleType = /** @type {?} */ ((undefined));\n if (isValidType(importedType)) {\n importedModuleType = importedType;\n }\n else if (importedType && importedType.ngModule) {\n var /** @type {?} */ moduleWithProviders = importedType;\n importedModuleType = moduleWithProviders.ngModule;\n if (moduleWithProviders.providers) {\n providers.push.apply(providers, _this._getProvidersMetadata(moduleWithProviders.providers, entryComponents, \"provider for the NgModule '\" + stringifyType(importedModuleType) + \"'\", [], importedType));\n }\n }\n if (importedModuleType) {\n if (_this._checkSelfImport(moduleType, importedModuleType))\n return;\n if (!alreadyCollecting)\n alreadyCollecting = new Set();\n if (alreadyCollecting.has(importedModuleType)) {\n _this._reportError(syntaxError(_this._getTypeDescriptor(importedModuleType) + \" '\" + stringifyType(importedType) + \"' is imported recursively by the module '\" + stringifyType(moduleType) + \"'.\"), moduleType);\n return;\n }\n alreadyCollecting.add(importedModuleType);\n var /** @type {?} */ importedModuleSummary = _this.getNgModuleSummary(importedModuleType, alreadyCollecting);\n alreadyCollecting.delete(importedModuleType);\n if (!importedModuleSummary) {\n _this._reportError(syntaxError(\"Unexpected \" + _this._getTypeDescriptor(importedType) + \" '\" + stringifyType(importedType) + \"' imported by the module '\" + stringifyType(moduleType) + \"'. Please add a @NgModule annotation.\"), moduleType);\n return;\n }\n importedModules.push(importedModuleSummary);\n }\n else {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(importedType) + \"' imported by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n });\n }\n if (meta.exports) {\n flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {\n if (!isValidType(exportedType)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(exportedType) + \"' exported by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n if (!alreadyCollecting)\n alreadyCollecting = new Set();\n if (alreadyCollecting.has(exportedType)) {\n _this._reportError(syntaxError(_this._getTypeDescriptor(exportedType) + \" '\" + stringify(exportedType) + \"' is exported recursively by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n alreadyCollecting.add(exportedType);\n var /** @type {?} */ exportedModuleSummary = _this.getNgModuleSummary(exportedType, alreadyCollecting);\n alreadyCollecting.delete(exportedType);\n if (exportedModuleSummary) {\n exportedModules.push(exportedModuleSummary);\n }\n else {\n exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType));\n }\n });\n }\n // Note: This will be modified later, so we rely on\n // getting a new instance every time!\n var /** @type {?} */ transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);\n if (meta.declarations) {\n flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {\n if (!isValidType(declaredType)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(declaredType) + \"' declared by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n var /** @type {?} */ declaredIdentifier = _this._getIdentifierMetadata(declaredType);\n if (_this.isDirective(declaredType)) {\n transitiveModule.addDirective(declaredIdentifier);\n declaredDirectives.push(declaredIdentifier);\n _this._addTypeToModule(declaredType, moduleType);\n }\n else if (_this.isPipe(declaredType)) {\n transitiveModule.addPipe(declaredIdentifier);\n transitiveModule.pipes.push(declaredIdentifier);\n declaredPipes.push(declaredIdentifier);\n _this._addTypeToModule(declaredType, moduleType);\n }\n else {\n _this._reportError(syntaxError(\"Unexpected \" + _this._getTypeDescriptor(declaredType) + \" '\" + stringifyType(declaredType) + \"' declared by the module '\" + stringifyType(moduleType) + \"'. Please add a @Pipe/@Directive/@Component annotation.\"), moduleType);\n return;\n }\n });\n }\n var /** @type {?} */ exportedDirectives = [];\n var /** @type {?} */ exportedPipes = [];\n exportedNonModuleIdentifiers.forEach(function (exportedId) {\n if (transitiveModule.directivesSet.has(exportedId.reference)) {\n exportedDirectives.push(exportedId);\n transitiveModule.addExportedDirective(exportedId);\n }\n else if (transitiveModule.pipesSet.has(exportedId.reference)) {\n exportedPipes.push(exportedId);\n transitiveModule.addExportedPipe(exportedId);\n }\n else {\n _this._reportError(syntaxError(\"Can't export \" + _this._getTypeDescriptor(exportedId.reference) + \" \" + stringifyType(exportedId.reference) + \" from \" + stringifyType(moduleType) + \" as it was neither declared nor imported!\"), moduleType);\n return;\n }\n });\n // The providers of the module have to go last\n // so that they overwrite any other provider we already added.\n if (meta.providers) {\n providers.push.apply(providers, this._getProvidersMetadata(meta.providers, entryComponents, \"provider for the NgModule '\" + stringifyType(moduleType) + \"'\", [], moduleType));\n }\n if (meta.entryComponents) {\n entryComponents.push.apply(entryComponents, flattenAndDedupeArray(meta.entryComponents)\n .map(function (type) { return ((_this._getEntryComponentMetadata(type))); }));\n }\n if (meta.bootstrap) {\n flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {\n if (!isValidType(type)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(type) + \"' used in the bootstrap property of module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n bootstrapComponents.push(_this._getIdentifierMetadata(type));\n });\n }\n entryComponents.push.apply(entryComponents, bootstrapComponents.map(function (type) { return ((_this._getEntryComponentMetadata(type.reference))); }));\n if (meta.schemas) {\n schemas.push.apply(schemas, flattenAndDedupeArray(meta.schemas));\n }\n compileMeta = new cpl.CompileNgModuleMetadata({\n type: this._getTypeMetadata(moduleType),\n providers: providers,\n entryComponents: entryComponents,\n bootstrapComponents: bootstrapComponents,\n schemas: schemas,\n declaredDirectives: declaredDirectives,\n exportedDirectives: exportedDirectives,\n declaredPipes: declaredPipes,\n exportedPipes: exportedPipes,\n importedModules: importedModules,\n exportedModules: exportedModules,\n transitiveModule: transitiveModule,\n id: meta.id || null,\n });\n entryComponents.forEach(function (id) { return transitiveModule.addEntryComponent(id); });\n providers.forEach(function (provider) { return transitiveModule.addProvider(provider, /** @type {?} */ ((compileMeta)).type); });\n transitiveModule.addModule(compileMeta.type);\n this._ngModuleCache.set(moduleType, compileMeta);\n return compileMeta;\n };\n /**\n * @param {?} moduleType\n * @param {?} importedModuleType\n * @return {?}\n */\n CompileMetadataResolver.prototype._checkSelfImport = /**\n * @param {?} moduleType\n * @param {?} importedModuleType\n * @return {?}\n */\n function (moduleType, importedModuleType) {\n if (moduleType === importedModuleType) {\n this._reportError(syntaxError(\"'\" + stringifyType(moduleType) + \"' module can't import itself\"), moduleType);\n return true;\n }\n return false;\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype._getTypeDescriptor = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n if (isValidType(type)) {\n if (this.isDirective(type)) {\n return 'directive';\n }\n if (this.isPipe(type)) {\n return 'pipe';\n }\n if (this.isNgModule(type)) {\n return 'module';\n }\n }\n if ((/** @type {?} */ (type)).provide) {\n return 'provider';\n }\n return 'value';\n };\n /**\n * @param {?} type\n * @param {?} moduleType\n * @return {?}\n */\n CompileMetadataResolver.prototype._addTypeToModule = /**\n * @param {?} type\n * @param {?} moduleType\n * @return {?}\n */\n function (type, moduleType) {\n var /** @type {?} */ oldModule = this._ngModuleOfTypes.get(type);\n if (oldModule && oldModule !== moduleType) {\n this._reportError(syntaxError(\"Type \" + stringifyType(type) + \" is part of the declarations of 2 modules: \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \"! \" +\n (\"Please consider moving \" + stringifyType(type) + \" to a higher module that imports \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \". \") +\n (\"You can also create a new NgModule that exports and includes \" + stringifyType(type) + \" then import that NgModule in \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \".\")), moduleType);\n return;\n }\n this._ngModuleOfTypes.set(type, moduleType);\n };\n /**\n * @param {?} importedModules\n * @param {?} exportedModules\n * @return {?}\n */\n CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata = /**\n * @param {?} importedModules\n * @param {?} exportedModules\n * @return {?}\n */\n function (importedModules, exportedModules) {\n // collect `providers` / `entryComponents` from all imported and all exported modules\n var /** @type {?} */ result = new cpl.TransitiveCompileNgModuleMetadata();\n var /** @type {?} */ modulesByToken = new Map();\n importedModules.concat(exportedModules).forEach(function (modSummary) {\n modSummary.modules.forEach(function (mod) { return result.addModule(mod); });\n modSummary.entryComponents.forEach(function (comp) { return result.addEntryComponent(comp); });\n var /** @type {?} */ addedTokens = new Set();\n modSummary.providers.forEach(function (entry) {\n var /** @type {?} */ tokenRef = cpl.tokenReference(entry.provider.token);\n var /** @type {?} */ prevModules = modulesByToken.get(tokenRef);\n if (!prevModules) {\n prevModules = new Set();\n modulesByToken.set(tokenRef, prevModules);\n }\n var /** @type {?} */ moduleRef = entry.module.reference;\n // Note: the providers of one module may still contain multiple providers\n // per token (e.g. for multi providers), and we need to preserve these.\n if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {\n prevModules.add(moduleRef);\n addedTokens.add(tokenRef);\n result.addProvider(entry.provider, entry.module);\n }\n });\n });\n exportedModules.forEach(function (modSummary) {\n modSummary.exportedDirectives.forEach(function (id) { return result.addExportedDirective(id); });\n modSummary.exportedPipes.forEach(function (id) { return result.addExportedPipe(id); });\n });\n importedModules.forEach(function (modSummary) {\n modSummary.exportedDirectives.forEach(function (id) { return result.addDirective(id); });\n modSummary.exportedPipes.forEach(function (id) { return result.addPipe(id); });\n });\n return result;\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype._getIdentifierMetadata = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n type = resolveForwardRef(type);\n return { reference: type };\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.isInjectable = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n var /** @type {?} */ annotations = this._reflector.annotations(type);\n return annotations.some(function (ann) { return createInjectable.isTypeOf(ann); });\n };\n /**\n * @param {?} type\n * @return {?}\n */\n CompileMetadataResolver.prototype.getInjectableSummary = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n return {\n summaryKind: cpl.CompileSummaryKind.Injectable,\n type: this._getTypeMetadata(type, null, false)\n };\n };\n /**\n * @param {?} type\n * @param {?=} dependencies\n * @return {?}\n */\n CompileMetadataResolver.prototype._getInjectableMetadata = /**\n * @param {?} type\n * @param {?=} dependencies\n * @return {?}\n */\n function (type, dependencies) {\n if (dependencies === void 0) { dependencies = null; }\n var /** @type {?} */ typeSummary = this._loadSummary(type, cpl.CompileSummaryKind.Injectable);\n if (typeSummary) {\n return typeSummary.type;\n }\n return this._getTypeMetadata(type, dependencies);\n };\n /**\n * @param {?} type\n * @param {?=} dependencies\n * @param {?=} throwOnUnknownDeps\n * @return {?}\n */\n CompileMetadataResolver.prototype._getTypeMetadata = /**\n * @param {?} type\n * @param {?=} dependencies\n * @param {?=} throwOnUnknownDeps\n * @return {?}\n */\n function (type, dependencies, throwOnUnknownDeps) {\n if (dependencies === void 0) { dependencies = null; }\n if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }\n var /** @type {?} */ identifier = this._getIdentifierMetadata(type);\n return {\n reference: identifier.reference,\n diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),\n lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),\n };\n };\n /**\n * @param {?} factory\n * @param {?=} dependencies\n * @return {?}\n */\n CompileMetadataResolver.prototype._getFactoryMetadata = /**\n * @param {?} factory\n * @param {?=} dependencies\n * @return {?}\n */\n function (factory, dependencies) {\n if (dependencies === void 0) { dependencies = null; }\n factory = resolveForwardRef(factory);\n return { reference: factory, diDeps: this._getDependenciesMetadata(factory, dependencies) };\n };\n /**\n * Gets the metadata for the given pipe.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n */\n /**\n * Gets the metadata for the given pipe.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n * @param {?} pipeType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getPipeMetadata = /**\n * Gets the metadata for the given pipe.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n * @param {?} pipeType\n * @return {?}\n */\n function (pipeType) {\n var /** @type {?} */ pipeMeta = this._pipeCache.get(pipeType);\n if (!pipeMeta) {\n this._reportError(syntaxError(\"Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe \" + stringifyType(pipeType) + \".\"), pipeType);\n }\n return pipeMeta || null;\n };\n /**\n * @param {?} pipeType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getPipeSummary = /**\n * @param {?} pipeType\n * @return {?}\n */\n function (pipeType) {\n var /** @type {?} */ pipeSummary = /** @type {?} */ (this._loadSummary(pipeType, cpl.CompileSummaryKind.Pipe));\n if (!pipeSummary) {\n this._reportError(syntaxError(\"Illegal state: Could not load the summary for pipe \" + stringifyType(pipeType) + \".\"), pipeType);\n }\n return pipeSummary;\n };\n /**\n * @param {?} pipeType\n * @return {?}\n */\n CompileMetadataResolver.prototype.getOrLoadPipeMetadata = /**\n * @param {?} pipeType\n * @return {?}\n */\n function (pipeType) {\n var /** @type {?} */ pipeMeta = this._pipeCache.get(pipeType);\n if (!pipeMeta) {\n pipeMeta = this._loadPipeMetadata(pipeType);\n }\n return pipeMeta;\n };\n /**\n * @param {?} pipeType\n * @return {?}\n */\n CompileMetadataResolver.prototype._loadPipeMetadata = /**\n * @param {?} pipeType\n * @return {?}\n */\n function (pipeType) {\n pipeType = resolveForwardRef(pipeType);\n var /** @type {?} */ pipeAnnotation = /** @type {?} */ ((this._pipeResolver.resolve(pipeType)));\n var /** @type {?} */ pipeMeta = new cpl.CompilePipeMetadata({\n type: this._getTypeMetadata(pipeType),\n name: pipeAnnotation.name,\n pure: !!pipeAnnotation.pure\n });\n this._pipeCache.set(pipeType, pipeMeta);\n this._summaryCache.set(pipeType, pipeMeta.toSummary());\n return pipeMeta;\n };\n /**\n * @param {?} typeOrFunc\n * @param {?} dependencies\n * @param {?=} throwOnUnknownDeps\n * @return {?}\n */\n CompileMetadataResolver.prototype._getDependenciesMetadata = /**\n * @param {?} typeOrFunc\n * @param {?} dependencies\n * @param {?=} throwOnUnknownDeps\n * @return {?}\n */\n function (typeOrFunc, dependencies, throwOnUnknownDeps) {\n var _this = this;\n if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }\n var /** @type {?} */ hasUnknownDeps = false;\n var /** @type {?} */ params = dependencies || this._reflector.parameters(typeOrFunc) || [];\n var /** @type {?} */ dependenciesMetadata = params.map(function (param) {\n var /** @type {?} */ isAttribute = false;\n var /** @type {?} */ isHost = false;\n var /** @type {?} */ isSelf = false;\n var /** @type {?} */ isSkipSelf = false;\n var /** @type {?} */ isOptional = false;\n var /** @type {?} */ token = null;\n if (Array.isArray(param)) {\n param.forEach(function (paramEntry) {\n if (createHost.isTypeOf(paramEntry)) {\n isHost = true;\n }\n else if (createSelf.isTypeOf(paramEntry)) {\n isSelf = true;\n }\n else if (createSkipSelf.isTypeOf(paramEntry)) {\n isSkipSelf = true;\n }\n else if (createOptional.isTypeOf(paramEntry)) {\n isOptional = true;\n }\n else if (createAttribute.isTypeOf(paramEntry)) {\n isAttribute = true;\n token = paramEntry.attributeName;\n }\n else if (createInject.isTypeOf(paramEntry)) {\n token = paramEntry.token;\n }\n else if (createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {\n token = paramEntry;\n }\n else if (isValidType(paramEntry) && token == null) {\n token = paramEntry;\n }\n });\n }\n else {\n token = param;\n }\n if (token == null) {\n hasUnknownDeps = true;\n return /** @type {?} */ ((null));\n }\n return {\n isAttribute: isAttribute,\n isHost: isHost,\n isSelf: isSelf,\n isSkipSelf: isSkipSelf,\n isOptional: isOptional,\n token: _this._getTokenMetadata(token)\n };\n });\n if (hasUnknownDeps) {\n var /** @type {?} */ depsTokens = dependenciesMetadata.map(function (dep) { return dep ? stringifyType(dep.token) : '?'; }).join(', ');\n var /** @type {?} */ message = \"Can't resolve all parameters for \" + stringifyType(typeOrFunc) + \": (\" + depsTokens + \").\";\n if (throwOnUnknownDeps || this._config.strictInjectionParameters) {\n this._reportError(syntaxError(message), typeOrFunc);\n }\n else {\n this._console.warn(\"Warning: \" + message + \" This will become an error in Angular v6.x\");\n }\n }\n return dependenciesMetadata;\n };\n /**\n * @param {?} token\n * @return {?}\n */\n CompileMetadataResolver.prototype._getTokenMetadata = /**\n * @param {?} token\n * @return {?}\n */\n function (token) {\n token = resolveForwardRef(token);\n var /** @type {?} */ compileToken;\n if (typeof token === 'string') {\n compileToken = { value: token };\n }\n else {\n compileToken = { identifier: { reference: token } };\n }\n return compileToken;\n };\n /**\n * @param {?} providers\n * @param {?} targetEntryComponents\n * @param {?=} debugInfo\n * @param {?=} compileProviders\n * @param {?=} type\n * @return {?}\n */\n CompileMetadataResolver.prototype._getProvidersMetadata = /**\n * @param {?} providers\n * @param {?} targetEntryComponents\n * @param {?=} debugInfo\n * @param {?=} compileProviders\n * @param {?=} type\n * @return {?}\n */\n function (providers, targetEntryComponents, debugInfo, compileProviders, type) {\n var _this = this;\n if (compileProviders === void 0) { compileProviders = []; }\n providers.forEach(function (provider, providerIdx) {\n if (Array.isArray(provider)) {\n _this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);\n }\n else {\n provider = resolveForwardRef(provider);\n var /** @type {?} */ providerMeta = /** @type {?} */ ((undefined));\n if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {\n _this._validateProvider(provider);\n providerMeta = new cpl.ProviderMeta(provider.provide, provider);\n }\n else if (isValidType(provider)) {\n providerMeta = new cpl.ProviderMeta(provider, { useClass: provider });\n }\n else if (provider === void 0) {\n _this._reportError(syntaxError(\"Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.\"));\n return;\n }\n else {\n var /** @type {?} */ providersInfo = (/** @type {?} */ (providers.reduce(function (soFar, seenProvider, seenProviderIdx) {\n if (seenProviderIdx < providerIdx) {\n soFar.push(\"\" + stringifyType(seenProvider));\n }\n else if (seenProviderIdx == providerIdx) {\n soFar.push(\"?\" + stringifyType(seenProvider) + \"?\");\n }\n else if (seenProviderIdx == providerIdx + 1) {\n soFar.push('...');\n }\n return soFar;\n }, [])))\n .join(', ');\n _this._reportError(syntaxError(\"Invalid \" + (debugInfo ? debugInfo : 'provider') + \" - only instances of Provider and Type are allowed, got: [\" + providersInfo + \"]\"), type);\n return;\n }\n if (providerMeta.token ===\n _this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {\n targetEntryComponents.push.apply(targetEntryComponents, _this._getEntryComponentsFromProvider(providerMeta, type));\n }\n else {\n compileProviders.push(_this.getProviderMetadata(providerMeta));\n }\n }\n });\n return compileProviders;\n };\n /**\n * @param {?} provider\n * @return {?}\n */\n CompileMetadataResolver.prototype._validateProvider = /**\n * @param {?} provider\n * @return {?}\n */\n function (provider) {\n if (provider.hasOwnProperty('useClass') && provider.useClass == null) {\n this._reportError(syntaxError(\"Invalid provider for \" + stringifyType(provider.provide) + \". useClass cannot be \" + provider.useClass + \".\\n Usually it happens when:\\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\\n 2. Class was used before it was declared. Use forwardRef in this case.\"));\n }\n };\n /**\n * @param {?} provider\n * @param {?=} type\n * @return {?}\n */\n CompileMetadataResolver.prototype._getEntryComponentsFromProvider = /**\n * @param {?} provider\n * @param {?=} type\n * @return {?}\n */\n function (provider, type) {\n var _this = this;\n var /** @type {?} */ components = [];\n var /** @type {?} */ collectedIdentifiers = [];\n if (provider.useFactory || provider.useExisting || provider.useClass) {\n this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!\"), type);\n return [];\n }\n if (!provider.multi) {\n this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!\"), type);\n return [];\n }\n extractIdentifiers(provider.useValue, collectedIdentifiers);\n collectedIdentifiers.forEach(function (identifier) {\n var /** @type {?} */ entry = _this._getEntryComponentMetadata(identifier.reference, false);\n if (entry) {\n components.push(entry);\n }\n });\n return components;\n };\n /**\n * @param {?} dirType\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n CompileMetadataResolver.prototype._getEntryComponentMetadata = /**\n * @param {?} dirType\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n function (dirType, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var /** @type {?} */ dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);\n if (dirMeta && dirMeta.metadata.isComponent) {\n return { componentType: dirType, componentFactory: /** @type {?} */ ((dirMeta.metadata.componentFactory)) };\n }\n var /** @type {?} */ dirSummary = /** @type {?} */ (this._loadSummary(dirType, cpl.CompileSummaryKind.Directive));\n if (dirSummary && dirSummary.isComponent) {\n return { componentType: dirType, componentFactory: /** @type {?} */ ((dirSummary.componentFactory)) };\n }\n if (throwIfNotFound) {\n throw syntaxError(dirType.name + \" cannot be used as an entry component.\");\n }\n return null;\n };\n /**\n * @param {?} provider\n * @return {?}\n */\n CompileMetadataResolver.prototype.getProviderMetadata = /**\n * @param {?} provider\n * @return {?}\n */\n function (provider) {\n var /** @type {?} */ compileDeps = /** @type {?} */ ((undefined));\n var /** @type {?} */ compileTypeMetadata = /** @type {?} */ ((null));\n var /** @type {?} */ compileFactoryMetadata = /** @type {?} */ ((null));\n var /** @type {?} */ token = this._getTokenMetadata(provider.token);\n if (provider.useClass) {\n compileTypeMetadata = this._getInjectableMetadata(provider.useClass, provider.dependencies);\n compileDeps = compileTypeMetadata.diDeps;\n if (provider.token === provider.useClass) {\n // use the compileTypeMetadata as it contains information about lifecycleHooks...\n token = { identifier: compileTypeMetadata };\n }\n }\n else if (provider.useFactory) {\n compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);\n compileDeps = compileFactoryMetadata.diDeps;\n }\n return {\n token: token,\n useClass: compileTypeMetadata,\n useValue: provider.useValue,\n useFactory: compileFactoryMetadata,\n useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,\n deps: compileDeps,\n multi: provider.multi\n };\n };\n /**\n * @param {?} queries\n * @param {?} isViewQuery\n * @param {?} directiveType\n * @return {?}\n */\n CompileMetadataResolver.prototype._getQueriesMetadata = /**\n * @param {?} queries\n * @param {?} isViewQuery\n * @param {?} directiveType\n * @return {?}\n */\n function (queries, isViewQuery, directiveType) {\n var _this = this;\n var /** @type {?} */ res = [];\n Object.keys(queries).forEach(function (propertyName) {\n var /** @type {?} */ query = queries[propertyName];\n if (query.isViewQuery === isViewQuery) {\n res.push(_this._getQueryMetadata(query, propertyName, directiveType));\n }\n });\n return res;\n };\n /**\n * @param {?} selector\n * @return {?}\n */\n CompileMetadataResolver.prototype._queryVarBindings = /**\n * @param {?} selector\n * @return {?}\n */\n function (selector) { return selector.split(/\\s*,\\s*/); };\n /**\n * @param {?} q\n * @param {?} propertyName\n * @param {?} typeOrFunc\n * @return {?}\n */\n CompileMetadataResolver.prototype._getQueryMetadata = /**\n * @param {?} q\n * @param {?} propertyName\n * @param {?} typeOrFunc\n * @return {?}\n */\n function (q, propertyName, typeOrFunc) {\n var _this = this;\n var /** @type {?} */ selectors;\n if (typeof q.selector === 'string') {\n selectors =\n this._queryVarBindings(q.selector).map(function (varName) { return _this._getTokenMetadata(varName); });\n }\n else {\n if (!q.selector) {\n this._reportError(syntaxError(\"Can't construct a query for the property \\\"\" + propertyName + \"\\\" of \\\"\" + stringifyType(typeOrFunc) + \"\\\" since the query selector wasn't defined.\"), typeOrFunc);\n selectors = [];\n }\n else {\n selectors = [this._getTokenMetadata(q.selector)];\n }\n }\n return {\n selectors: selectors,\n first: q.first,\n descendants: q.descendants, propertyName: propertyName,\n read: q.read ? this._getTokenMetadata(q.read) : /** @type {?} */ ((null))\n };\n };\n /**\n * @param {?} error\n * @param {?=} type\n * @param {?=} otherType\n * @return {?}\n */\n CompileMetadataResolver.prototype._reportError = /**\n * @param {?} error\n * @param {?=} type\n * @param {?=} otherType\n * @return {?}\n */\n function (error, type, otherType) {\n if (this._errorCollector) {\n this._errorCollector(error, type);\n if (otherType) {\n this._errorCollector(error, otherType);\n }\n }\n else {\n throw error;\n }\n };\n return CompileMetadataResolver;\n}());\nexport { CompileMetadataResolver };\nfunction CompileMetadataResolver_tsickle_Closure_declarations() {\n /** @type {?} */\n CompileMetadataResolver.prototype._nonNormalizedDirectiveCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._directiveCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._summaryCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._pipeCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._ngModuleCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._ngModuleOfTypes;\n /** @type {?} */\n CompileMetadataResolver.prototype._config;\n /** @type {?} */\n CompileMetadataResolver.prototype._htmlParser;\n /** @type {?} */\n CompileMetadataResolver.prototype._ngModuleResolver;\n /** @type {?} */\n CompileMetadataResolver.prototype._directiveResolver;\n /** @type {?} */\n CompileMetadataResolver.prototype._pipeResolver;\n /** @type {?} */\n CompileMetadataResolver.prototype._summaryResolver;\n /** @type {?} */\n CompileMetadataResolver.prototype._schemaRegistry;\n /** @type {?} */\n CompileMetadataResolver.prototype._directiveNormalizer;\n /** @type {?} */\n CompileMetadataResolver.prototype._console;\n /** @type {?} */\n CompileMetadataResolver.prototype._staticSymbolCache;\n /** @type {?} */\n CompileMetadataResolver.prototype._reflector;\n /** @type {?} */\n CompileMetadataResolver.prototype._errorCollector;\n}\n/**\n * @param {?} tree\n * @param {?=} out\n * @return {?}\n */\nfunction flattenArray(tree, out) {\n if (out === void 0) { out = []; }\n if (tree) {\n for (var /** @type {?} */ i = 0; i < tree.length; i++) {\n var /** @type {?} */ item = resolveForwardRef(tree[i]);\n if (Array.isArray(item)) {\n flattenArray(item, out);\n }\n else {\n out.push(item);\n }\n }\n }\n return out;\n}\n/**\n * @param {?} array\n * @return {?}\n */\nfunction dedupeArray(array) {\n if (array) {\n return Array.from(new Set(array));\n }\n return [];\n}\n/**\n * @param {?} tree\n * @return {?}\n */\nfunction flattenAndDedupeArray(tree) {\n return dedupeArray(flattenArray(tree));\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isValidType(value) {\n return (value instanceof StaticSymbol) || (value instanceof Type);\n}\n/**\n * @param {?} value\n * @param {?} targetIdentifiers\n * @return {?}\n */\nfunction extractIdentifiers(value, targetIdentifiers) {\n visitValue(value, new _CompileValueConverter(), targetIdentifiers);\n}\nvar _CompileValueConverter = /** @class */ (function (_super) {\n tslib_1.__extends(_CompileValueConverter, _super);\n function _CompileValueConverter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param {?} value\n * @param {?} targetIdentifiers\n * @return {?}\n */\n _CompileValueConverter.prototype.visitOther = /**\n * @param {?} value\n * @param {?} targetIdentifiers\n * @return {?}\n */\n function (value, targetIdentifiers) {\n targetIdentifiers.push({ reference: value });\n };\n return _CompileValueConverter;\n}(ValueTransformer));\n/**\n * @param {?} type\n * @return {?}\n */\nfunction stringifyType(type) {\n if (type instanceof StaticSymbol) {\n return type.name + \" in \" + type.filePath;\n }\n else {\n return stringify(type);\n }\n}\n/**\n * Indicates that a component is still being loaded in a synchronous compile.\n * @param {?} compType\n * @return {?}\n */\nfunction componentStillLoadingError(compType) {\n var /** @type {?} */ error = Error(\"Can't compile synchronously as \" + stringify(compType) + \" is still being loaded!\");\n (/** @type {?} */ (error))[ERROR_COMPONENT_TYPE] = compType;\n return error;\n}\n//# sourceMappingURL=metadata_resolver.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\n/** @enum {number} */\nvar TypeModifier = {\n Const: 0,\n};\nexport { TypeModifier };\nTypeModifier[TypeModifier.Const] = \"Const\";\n/**\n * @abstract\n */\nvar /**\n * @abstract\n */\nType = /** @class */ (function () {\n function Type(modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n this.modifiers = modifiers;\n if (!modifiers) {\n this.modifiers = [];\n }\n }\n /**\n * @param {?} modifier\n * @return {?}\n */\n Type.prototype.hasModifier = /**\n * @param {?} modifier\n * @return {?}\n */\n function (modifier) { return /** @type {?} */ ((this.modifiers)).indexOf(modifier) !== -1; };\n return Type;\n}());\n/**\n * @abstract\n */\nexport { Type };\nfunction Type_tsickle_Closure_declarations() {\n /** @type {?} */\n Type.prototype.modifiers;\n /**\n * @abstract\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Type.prototype.visitType = function (visitor, context) { };\n}\n/** @enum {number} */\nvar BuiltinTypeName = {\n Dynamic: 0,\n Bool: 1,\n String: 2,\n Int: 3,\n Number: 4,\n Function: 5,\n Inferred: 6,\n};\nexport { BuiltinTypeName };\nBuiltinTypeName[BuiltinTypeName.Dynamic] = \"Dynamic\";\nBuiltinTypeName[BuiltinTypeName.Bool] = \"Bool\";\nBuiltinTypeName[BuiltinTypeName.String] = \"String\";\nBuiltinTypeName[BuiltinTypeName.Int] = \"Int\";\nBuiltinTypeName[BuiltinTypeName.Number] = \"Number\";\nBuiltinTypeName[BuiltinTypeName.Function] = \"Function\";\nBuiltinTypeName[BuiltinTypeName.Inferred] = \"Inferred\";\nvar BuiltinType = /** @class */ (function (_super) {\n tslib_1.__extends(BuiltinType, _super);\n function BuiltinType(name, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.name = name;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BuiltinType.prototype.visitType = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitBuiltintType(this, context);\n };\n return BuiltinType;\n}(Type));\nexport { BuiltinType };\nfunction BuiltinType_tsickle_Closure_declarations() {\n /** @type {?} */\n BuiltinType.prototype.name;\n}\nvar ExpressionType = /** @class */ (function (_super) {\n tslib_1.__extends(ExpressionType, _super);\n function ExpressionType(value, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ExpressionType.prototype.visitType = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitExpressionType(this, context);\n };\n return ExpressionType;\n}(Type));\nexport { ExpressionType };\nfunction ExpressionType_tsickle_Closure_declarations() {\n /** @type {?} */\n ExpressionType.prototype.value;\n}\nvar ArrayType = /** @class */ (function (_super) {\n tslib_1.__extends(ArrayType, _super);\n function ArrayType(of, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.of = of;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ArrayType.prototype.visitType = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitArrayType(this, context);\n };\n return ArrayType;\n}(Type));\nexport { ArrayType };\nfunction ArrayType_tsickle_Closure_declarations() {\n /** @type {?} */\n ArrayType.prototype.of;\n}\nvar MapType = /** @class */ (function (_super) {\n tslib_1.__extends(MapType, _super);\n function MapType(valueType, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.valueType = valueType || null;\n return _this;\n }\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n MapType.prototype.visitType = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) { return visitor.visitMapType(this, context); };\n return MapType;\n}(Type));\nexport { MapType };\nfunction MapType_tsickle_Closure_declarations() {\n /** @type {?} */\n MapType.prototype.valueType;\n}\nexport var /** @type {?} */ DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nexport var /** @type {?} */ INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nexport var /** @type {?} */ BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nexport var /** @type {?} */ INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nexport var /** @type {?} */ NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nexport var /** @type {?} */ STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nexport var /** @type {?} */ FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\n/**\n * @record\n */\nexport function TypeVisitor() { }\nfunction TypeVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n TypeVisitor.prototype.visitBuiltintType;\n /** @type {?} */\n TypeVisitor.prototype.visitExpressionType;\n /** @type {?} */\n TypeVisitor.prototype.visitArrayType;\n /** @type {?} */\n TypeVisitor.prototype.visitMapType;\n}\n/** @enum {number} */\nvar BinaryOperator = {\n Equals: 0,\n NotEquals: 1,\n Identical: 2,\n NotIdentical: 3,\n Minus: 4,\n Plus: 5,\n Divide: 6,\n Multiply: 7,\n Modulo: 8,\n And: 9,\n Or: 10,\n Lower: 11,\n LowerEquals: 12,\n Bigger: 13,\n BiggerEquals: 14,\n};\nexport { BinaryOperator };\nBinaryOperator[BinaryOperator.Equals] = \"Equals\";\nBinaryOperator[BinaryOperator.NotEquals] = \"NotEquals\";\nBinaryOperator[BinaryOperator.Identical] = \"Identical\";\nBinaryOperator[BinaryOperator.NotIdentical] = \"NotIdentical\";\nBinaryOperator[BinaryOperator.Minus] = \"Minus\";\nBinaryOperator[BinaryOperator.Plus] = \"Plus\";\nBinaryOperator[BinaryOperator.Divide] = \"Divide\";\nBinaryOperator[BinaryOperator.Multiply] = \"Multiply\";\nBinaryOperator[BinaryOperator.Modulo] = \"Modulo\";\nBinaryOperator[BinaryOperator.And] = \"And\";\nBinaryOperator[BinaryOperator.Or] = \"Or\";\nBinaryOperator[BinaryOperator.Lower] = \"Lower\";\nBinaryOperator[BinaryOperator.LowerEquals] = \"LowerEquals\";\nBinaryOperator[BinaryOperator.Bigger] = \"Bigger\";\nBinaryOperator[BinaryOperator.BiggerEquals] = \"BiggerEquals\";\n/**\n * @template T\n * @param {?} base\n * @param {?} other\n * @return {?}\n */\nexport function nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\n/**\n * @template T\n * @param {?} base\n * @param {?} other\n * @return {?}\n */\nexport function areAllEquivalent(base, other) {\n var /** @type {?} */ len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (var /** @type {?} */ i = 0; i < len; i++) {\n if (!base[i].isEquivalent(other[i])) {\n return false;\n }\n }\n return true;\n}\n/**\n * @abstract\n */\nvar /**\n * @abstract\n */\nExpression = /** @class */ (function () {\n function Expression(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n /**\n * @param {?} name\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.prop = /**\n * @param {?} name\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n };\n /**\n * @param {?} index\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.key = /**\n * @param {?} index\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n };\n /**\n * @param {?} name\n * @param {?} params\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.callMethod = /**\n * @param {?} name\n * @param {?} params\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (name, params, sourceSpan) {\n return new InvokeMethodExpr(this, name, params, null, sourceSpan);\n };\n /**\n * @param {?} params\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.callFn = /**\n * @param {?} params\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (params, sourceSpan) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan);\n };\n /**\n * @param {?} params\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.instantiate = /**\n * @param {?} params\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n };\n /**\n * @param {?} trueCase\n * @param {?=} falseCase\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.conditional = /**\n * @param {?} trueCase\n * @param {?=} falseCase\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (trueCase, falseCase, sourceSpan) {\n if (falseCase === void 0) { falseCase = null; }\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.equals = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.notEquals = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.identical = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.notIdentical = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.minus = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.plus = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.divide = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.multiply = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.modulo = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.and = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.or = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.lower = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.lowerEquals = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.bigger = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.biggerEquals = /**\n * @param {?} rhs\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n };\n /**\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.isBlank = /**\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (sourceSpan) {\n // Note: We use equals by purpose here to compare to null and undefined in JS.\n // We use the typed null to allow strictNullChecks to narrow types.\n return this.equals(TYPED_NULL_EXPR, sourceSpan);\n };\n /**\n * @param {?} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n Expression.prototype.cast = /**\n * @param {?} type\n * @param {?=} sourceSpan\n * @return {?}\n */\n function (type, sourceSpan) {\n return new CastExpr(this, type, sourceSpan);\n };\n /**\n * @return {?}\n */\n Expression.prototype.toStmt = /**\n * @return {?}\n */\n function () { return new ExpressionStatement(this, null); };\n return Expression;\n}());\n/**\n * @abstract\n */\nexport { Expression };\nfunction Expression_tsickle_Closure_declarations() {\n /** @type {?} */\n Expression.prototype.type;\n /** @type {?} */\n Expression.prototype.sourceSpan;\n /**\n * @abstract\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Expression.prototype.visitExpression = function (visitor, context) { };\n /**\n * Calculates whether this expression produces the same value as the given expression.\n * Note: We don't check Types nor ParseSourceSpans nor function arguments.\n * @abstract\n * @param {?} e\n * @return {?}\n */\n Expression.prototype.isEquivalent = function (e) { };\n}\n/** @enum {number} */\nvar BuiltinVar = {\n This: 0,\n Super: 1,\n CatchError: 2,\n CatchStack: 3,\n};\nexport { BuiltinVar };\nBuiltinVar[BuiltinVar.This] = \"This\";\nBuiltinVar[BuiltinVar.Super] = \"Super\";\nBuiltinVar[BuiltinVar.CatchError] = \"CatchError\";\nBuiltinVar[BuiltinVar.CatchStack] = \"CatchStack\";\nvar ReadVarExpr = /** @class */ (function (_super) {\n tslib_1.__extends(ReadVarExpr, _super);\n function ReadVarExpr(name, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n if (typeof name === 'string') {\n _this.name = name;\n _this.builtin = null;\n }\n else {\n _this.name = null;\n _this.builtin = /** @type {?} */ (name);\n }\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n ReadVarExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ReadVarExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n };\n /**\n * @param {?} value\n * @return {?}\n */\n ReadVarExpr.prototype.set = /**\n * @param {?} value\n * @return {?}\n */\n function (value) {\n if (!this.name) {\n throw new Error(\"Built in variable \" + this.builtin + \" can not be assigned to.\");\n }\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n };\n return ReadVarExpr;\n}(Expression));\nexport { ReadVarExpr };\nfunction ReadVarExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n ReadVarExpr.prototype.name;\n /** @type {?} */\n ReadVarExpr.prototype.builtin;\n}\nvar WriteVarExpr = /** @class */ (function (_super) {\n tslib_1.__extends(WriteVarExpr, _super);\n function WriteVarExpr(name, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n WriteVarExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n WriteVarExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n };\n /**\n * @param {?=} type\n * @param {?=} modifiers\n * @return {?}\n */\n WriteVarExpr.prototype.toDeclStmt = /**\n * @param {?=} type\n * @param {?=} modifiers\n * @return {?}\n */\n function (type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n };\n return WriteVarExpr;\n}(Expression));\nexport { WriteVarExpr };\nfunction WriteVarExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n WriteVarExpr.prototype.value;\n /** @type {?} */\n WriteVarExpr.prototype.name;\n}\nvar WriteKeyExpr = /** @class */ (function (_super) {\n tslib_1.__extends(WriteKeyExpr, _super);\n function WriteKeyExpr(receiver, index, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.index = index;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n WriteKeyExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n WriteKeyExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n };\n return WriteKeyExpr;\n}(Expression));\nexport { WriteKeyExpr };\nfunction WriteKeyExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n WriteKeyExpr.prototype.value;\n /** @type {?} */\n WriteKeyExpr.prototype.receiver;\n /** @type {?} */\n WriteKeyExpr.prototype.index;\n}\nvar WritePropExpr = /** @class */ (function (_super) {\n tslib_1.__extends(WritePropExpr, _super);\n function WritePropExpr(receiver, name, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n WritePropExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.value.isEquivalent(e.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n WritePropExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n };\n return WritePropExpr;\n}(Expression));\nexport { WritePropExpr };\nfunction WritePropExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n WritePropExpr.prototype.value;\n /** @type {?} */\n WritePropExpr.prototype.receiver;\n /** @type {?} */\n WritePropExpr.prototype.name;\n}\n/** @enum {number} */\nvar BuiltinMethod = {\n ConcatArray: 0,\n SubscribeObservable: 1,\n Bind: 2,\n};\nexport { BuiltinMethod };\nBuiltinMethod[BuiltinMethod.ConcatArray] = \"ConcatArray\";\nBuiltinMethod[BuiltinMethod.SubscribeObservable] = \"SubscribeObservable\";\nBuiltinMethod[BuiltinMethod.Bind] = \"Bind\";\nvar InvokeMethodExpr = /** @class */ (function (_super) {\n tslib_1.__extends(InvokeMethodExpr, _super);\n function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.args = args;\n if (typeof method === 'string') {\n _this.name = method;\n _this.builtin = null;\n }\n else {\n _this.name = null;\n _this.builtin = /** @type {?} */ (method);\n }\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n InvokeMethodExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n InvokeMethodExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitInvokeMethodExpr(this, context);\n };\n return InvokeMethodExpr;\n}(Expression));\nexport { InvokeMethodExpr };\nfunction InvokeMethodExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n InvokeMethodExpr.prototype.name;\n /** @type {?} */\n InvokeMethodExpr.prototype.builtin;\n /** @type {?} */\n InvokeMethodExpr.prototype.receiver;\n /** @type {?} */\n InvokeMethodExpr.prototype.args;\n}\nvar InvokeFunctionExpr = /** @class */ (function (_super) {\n tslib_1.__extends(InvokeFunctionExpr, _super);\n function InvokeFunctionExpr(fn, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.fn = fn;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n InvokeFunctionExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n InvokeFunctionExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n };\n return InvokeFunctionExpr;\n}(Expression));\nexport { InvokeFunctionExpr };\nfunction InvokeFunctionExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n InvokeFunctionExpr.prototype.fn;\n /** @type {?} */\n InvokeFunctionExpr.prototype.args;\n}\nvar InstantiateExpr = /** @class */ (function (_super) {\n tslib_1.__extends(InstantiateExpr, _super);\n function InstantiateExpr(classExpr, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.classExpr = classExpr;\n _this.args = args;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n InstantiateExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n areAllEquivalent(this.args, e.args);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n InstantiateExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n };\n return InstantiateExpr;\n}(Expression));\nexport { InstantiateExpr };\nfunction InstantiateExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n InstantiateExpr.prototype.classExpr;\n /** @type {?} */\n InstantiateExpr.prototype.args;\n}\nvar LiteralExpr = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralExpr, _super);\n function LiteralExpr(value, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n LiteralExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof LiteralExpr && this.value === e.value;\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n LiteralExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n };\n return LiteralExpr;\n}(Expression));\nexport { LiteralExpr };\nfunction LiteralExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralExpr.prototype.value;\n}\nvar ExternalExpr = /** @class */ (function (_super) {\n tslib_1.__extends(ExternalExpr, _super);\n function ExternalExpr(value, type, typeParams, sourceSpan) {\n if (typeParams === void 0) { typeParams = null; }\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n _this.typeParams = typeParams;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n ExternalExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof ExternalExpr && this.value.name === e.value.name &&\n this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ExternalExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitExternalExpr(this, context);\n };\n return ExternalExpr;\n}(Expression));\nexport { ExternalExpr };\nfunction ExternalExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n ExternalExpr.prototype.value;\n /** @type {?} */\n ExternalExpr.prototype.typeParams;\n}\nvar ExternalReference = /** @class */ (function () {\n function ExternalReference(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n return ExternalReference;\n}());\nexport { ExternalReference };\nfunction ExternalReference_tsickle_Closure_declarations() {\n /** @type {?} */\n ExternalReference.prototype.moduleName;\n /** @type {?} */\n ExternalReference.prototype.name;\n /** @type {?} */\n ExternalReference.prototype.runtime;\n}\nvar ConditionalExpr = /** @class */ (function (_super) {\n tslib_1.__extends(ConditionalExpr, _super);\n function ConditionalExpr(condition, trueCase, falseCase, type, sourceSpan) {\n if (falseCase === void 0) { falseCase = null; }\n var _this = _super.call(this, type || trueCase.type, sourceSpan) || this;\n _this.condition = condition;\n _this.falseCase = falseCase;\n _this.trueCase = trueCase;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n ConditionalExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ConditionalExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n };\n return ConditionalExpr;\n}(Expression));\nexport { ConditionalExpr };\nfunction ConditionalExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n ConditionalExpr.prototype.trueCase;\n /** @type {?} */\n ConditionalExpr.prototype.condition;\n /** @type {?} */\n ConditionalExpr.prototype.falseCase;\n}\nvar NotExpr = /** @class */ (function (_super) {\n tslib_1.__extends(NotExpr, _super);\n function NotExpr(condition, sourceSpan) {\n var _this = _super.call(this, BOOL_TYPE, sourceSpan) || this;\n _this.condition = condition;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n NotExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n NotExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitNotExpr(this, context);\n };\n return NotExpr;\n}(Expression));\nexport { NotExpr };\nfunction NotExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n NotExpr.prototype.condition;\n}\nvar AssertNotNull = /** @class */ (function (_super) {\n tslib_1.__extends(AssertNotNull, _super);\n function AssertNotNull(condition, sourceSpan) {\n var _this = _super.call(this, condition.type, sourceSpan) || this;\n _this.condition = condition;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n AssertNotNull.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n AssertNotNull.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitAssertNotNullExpr(this, context);\n };\n return AssertNotNull;\n}(Expression));\nexport { AssertNotNull };\nfunction AssertNotNull_tsickle_Closure_declarations() {\n /** @type {?} */\n AssertNotNull.prototype.condition;\n}\nvar CastExpr = /** @class */ (function (_super) {\n tslib_1.__extends(CastExpr, _super);\n function CastExpr(value, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n CastExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof CastExpr && this.value.isEquivalent(e.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n CastExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitCastExpr(this, context);\n };\n return CastExpr;\n}(Expression));\nexport { CastExpr };\nfunction CastExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n CastExpr.prototype.value;\n}\nvar FnParam = /** @class */ (function () {\n function FnParam(name, type) {\n if (type === void 0) { type = null; }\n this.name = name;\n this.type = type;\n }\n /**\n * @param {?} param\n * @return {?}\n */\n FnParam.prototype.isEquivalent = /**\n * @param {?} param\n * @return {?}\n */\n function (param) { return this.name === param.name; };\n return FnParam;\n}());\nexport { FnParam };\nfunction FnParam_tsickle_Closure_declarations() {\n /** @type {?} */\n FnParam.prototype.name;\n /** @type {?} */\n FnParam.prototype.type;\n}\nvar FunctionExpr = /** @class */ (function (_super) {\n tslib_1.__extends(FunctionExpr, _super);\n function FunctionExpr(params, statements, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.params = params;\n _this.statements = statements;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n FunctionExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n areAllEquivalent(this.statements, e.statements);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n FunctionExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n };\n /**\n * @param {?} name\n * @param {?=} modifiers\n * @return {?}\n */\n FunctionExpr.prototype.toDeclStmt = /**\n * @param {?} name\n * @param {?=} modifiers\n * @return {?}\n */\n function (name, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n };\n return FunctionExpr;\n}(Expression));\nexport { FunctionExpr };\nfunction FunctionExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n FunctionExpr.prototype.params;\n /** @type {?} */\n FunctionExpr.prototype.statements;\n}\nvar BinaryOperatorExpr = /** @class */ (function (_super) {\n tslib_1.__extends(BinaryOperatorExpr, _super);\n function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan) {\n var _this = _super.call(this, type || lhs.type, sourceSpan) || this;\n _this.operator = operator;\n _this.rhs = rhs;\n _this.lhs = lhs;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n BinaryOperatorExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n BinaryOperatorExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n };\n return BinaryOperatorExpr;\n}(Expression));\nexport { BinaryOperatorExpr };\nfunction BinaryOperatorExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n BinaryOperatorExpr.prototype.lhs;\n /** @type {?} */\n BinaryOperatorExpr.prototype.operator;\n /** @type {?} */\n BinaryOperatorExpr.prototype.rhs;\n}\nvar ReadPropExpr = /** @class */ (function (_super) {\n tslib_1.__extends(ReadPropExpr, _super);\n function ReadPropExpr(receiver, name, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n ReadPropExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name;\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ReadPropExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n };\n /**\n * @param {?} value\n * @return {?}\n */\n ReadPropExpr.prototype.set = /**\n * @param {?} value\n * @return {?}\n */\n function (value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n };\n return ReadPropExpr;\n}(Expression));\nexport { ReadPropExpr };\nfunction ReadPropExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n ReadPropExpr.prototype.receiver;\n /** @type {?} */\n ReadPropExpr.prototype.name;\n}\nvar ReadKeyExpr = /** @class */ (function (_super) {\n tslib_1.__extends(ReadKeyExpr, _super);\n function ReadKeyExpr(receiver, index, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.index = index;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n ReadKeyExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ReadKeyExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n };\n /**\n * @param {?} value\n * @return {?}\n */\n ReadKeyExpr.prototype.set = /**\n * @param {?} value\n * @return {?}\n */\n function (value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n };\n return ReadKeyExpr;\n}(Expression));\nexport { ReadKeyExpr };\nfunction ReadKeyExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n ReadKeyExpr.prototype.receiver;\n /** @type {?} */\n ReadKeyExpr.prototype.index;\n}\nvar LiteralArrayExpr = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralArrayExpr, _super);\n function LiteralArrayExpr(entries, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.entries = entries;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n LiteralArrayExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n LiteralArrayExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n };\n return LiteralArrayExpr;\n}(Expression));\nexport { LiteralArrayExpr };\nfunction LiteralArrayExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralArrayExpr.prototype.entries;\n}\nvar LiteralMapEntry = /** @class */ (function () {\n function LiteralMapEntry(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n LiteralMapEntry.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n };\n return LiteralMapEntry;\n}());\nexport { LiteralMapEntry };\nfunction LiteralMapEntry_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralMapEntry.prototype.key;\n /** @type {?} */\n LiteralMapEntry.prototype.value;\n /** @type {?} */\n LiteralMapEntry.prototype.quoted;\n}\nvar LiteralMapExpr = /** @class */ (function (_super) {\n tslib_1.__extends(LiteralMapExpr, _super);\n function LiteralMapExpr(entries, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.entries = entries;\n _this.valueType = null;\n if (type) {\n _this.valueType = type.valueType;\n }\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n LiteralMapExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n LiteralMapExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n };\n return LiteralMapExpr;\n}(Expression));\nexport { LiteralMapExpr };\nfunction LiteralMapExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n LiteralMapExpr.prototype.valueType;\n /** @type {?} */\n LiteralMapExpr.prototype.entries;\n}\nvar CommaExpr = /** @class */ (function (_super) {\n tslib_1.__extends(CommaExpr, _super);\n function CommaExpr(parts, sourceSpan) {\n var _this = _super.call(this, parts[parts.length - 1].type, sourceSpan) || this;\n _this.parts = parts;\n return _this;\n }\n /**\n * @param {?} e\n * @return {?}\n */\n CommaExpr.prototype.isEquivalent = /**\n * @param {?} e\n * @return {?}\n */\n function (e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n CommaExpr.prototype.visitExpression = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitCommaExpr(this, context);\n };\n return CommaExpr;\n}(Expression));\nexport { CommaExpr };\nfunction CommaExpr_tsickle_Closure_declarations() {\n /** @type {?} */\n CommaExpr.prototype.parts;\n}\n/**\n * @record\n */\nexport function ExpressionVisitor() { }\nfunction ExpressionVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n ExpressionVisitor.prototype.visitReadVarExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitWriteVarExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitWriteKeyExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitWritePropExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitInvokeMethodExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitInvokeFunctionExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitInstantiateExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitLiteralExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitExternalExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitConditionalExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitNotExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitAssertNotNullExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitCastExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitFunctionExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitBinaryOperatorExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitReadPropExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitReadKeyExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitLiteralArrayExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitLiteralMapExpr;\n /** @type {?} */\n ExpressionVisitor.prototype.visitCommaExpr;\n}\nexport var /** @type {?} */ THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);\nexport var /** @type {?} */ SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);\nexport var /** @type {?} */ CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);\nexport var /** @type {?} */ CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);\nexport var /** @type {?} */ NULL_EXPR = new LiteralExpr(null, null, null);\nexport var /** @type {?} */ TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n/** @enum {number} */\nvar StmtModifier = {\n Final: 0,\n Private: 1,\n Exported: 2,\n};\nexport { StmtModifier };\nStmtModifier[StmtModifier.Final] = \"Final\";\nStmtModifier[StmtModifier.Private] = \"Private\";\nStmtModifier[StmtModifier.Exported] = \"Exported\";\n/**\n * @abstract\n */\nvar /**\n * @abstract\n */\nStatement = /** @class */ (function () {\n function Statement(modifiers, sourceSpan) {\n this.modifiers = modifiers || [];\n this.sourceSpan = sourceSpan || null;\n }\n /**\n * @param {?} modifier\n * @return {?}\n */\n Statement.prototype.hasModifier = /**\n * @param {?} modifier\n * @return {?}\n */\n function (modifier) { return /** @type {?} */ ((this.modifiers)).indexOf(modifier) !== -1; };\n return Statement;\n}());\n/**\n * @abstract\n */\nexport { Statement };\nfunction Statement_tsickle_Closure_declarations() {\n /** @type {?} */\n Statement.prototype.modifiers;\n /** @type {?} */\n Statement.prototype.sourceSpan;\n /**\n * Calculates whether this statement produces the same value as the given statement.\n * Note: We don't check Types nor ParseSourceSpans nor function arguments.\n * @abstract\n * @param {?} stmt\n * @return {?}\n */\n Statement.prototype.isEquivalent = function (stmt) { };\n /**\n * @abstract\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n Statement.prototype.visitStatement = function (visitor, context) { };\n}\nvar DeclareVarStmt = /** @class */ (function (_super) {\n tslib_1.__extends(DeclareVarStmt, _super);\n function DeclareVarStmt(name, value, type, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.value = value;\n _this.type = type || value.type;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n DeclareVarStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n this.value.isEquivalent(stmt.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n DeclareVarStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n };\n return DeclareVarStmt;\n}(Statement));\nexport { DeclareVarStmt };\nfunction DeclareVarStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n DeclareVarStmt.prototype.type;\n /** @type {?} */\n DeclareVarStmt.prototype.name;\n /** @type {?} */\n DeclareVarStmt.prototype.value;\n}\nvar DeclareFunctionStmt = /** @class */ (function (_super) {\n tslib_1.__extends(DeclareFunctionStmt, _super);\n function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.params = params;\n _this.statements = statements;\n _this.type = type || null;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n DeclareFunctionStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n areAllEquivalent(this.statements, stmt.statements);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n DeclareFunctionStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n };\n return DeclareFunctionStmt;\n}(Statement));\nexport { DeclareFunctionStmt };\nfunction DeclareFunctionStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n DeclareFunctionStmt.prototype.type;\n /** @type {?} */\n DeclareFunctionStmt.prototype.name;\n /** @type {?} */\n DeclareFunctionStmt.prototype.params;\n /** @type {?} */\n DeclareFunctionStmt.prototype.statements;\n}\nvar ExpressionStatement = /** @class */ (function (_super) {\n tslib_1.__extends(ExpressionStatement, _super);\n function ExpressionStatement(expr, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.expr = expr;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n ExpressionStatement.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ExpressionStatement.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n };\n return ExpressionStatement;\n}(Statement));\nexport { ExpressionStatement };\nfunction ExpressionStatement_tsickle_Closure_declarations() {\n /** @type {?} */\n ExpressionStatement.prototype.expr;\n}\nvar ReturnStatement = /** @class */ (function (_super) {\n tslib_1.__extends(ReturnStatement, _super);\n function ReturnStatement(value, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n ReturnStatement.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ReturnStatement.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitReturnStmt(this, context);\n };\n return ReturnStatement;\n}(Statement));\nexport { ReturnStatement };\nfunction ReturnStatement_tsickle_Closure_declarations() {\n /** @type {?} */\n ReturnStatement.prototype.value;\n}\nvar AbstractClassPart = /** @class */ (function () {\n function AbstractClassPart(type, modifiers) {\n this.modifiers = modifiers;\n if (!modifiers) {\n this.modifiers = [];\n }\n this.type = type || null;\n }\n /**\n * @param {?} modifier\n * @return {?}\n */\n AbstractClassPart.prototype.hasModifier = /**\n * @param {?} modifier\n * @return {?}\n */\n function (modifier) { return /** @type {?} */ ((this.modifiers)).indexOf(modifier) !== -1; };\n return AbstractClassPart;\n}());\nexport { AbstractClassPart };\nfunction AbstractClassPart_tsickle_Closure_declarations() {\n /** @type {?} */\n AbstractClassPart.prototype.type;\n /** @type {?} */\n AbstractClassPart.prototype.modifiers;\n}\nvar ClassField = /** @class */ (function (_super) {\n tslib_1.__extends(ClassField, _super);\n function ClassField(name, type, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n return _this;\n }\n /**\n * @param {?} f\n * @return {?}\n */\n ClassField.prototype.isEquivalent = /**\n * @param {?} f\n * @return {?}\n */\n function (f) { return this.name === f.name; };\n return ClassField;\n}(AbstractClassPart));\nexport { ClassField };\nfunction ClassField_tsickle_Closure_declarations() {\n /** @type {?} */\n ClassField.prototype.name;\n}\nvar ClassMethod = /** @class */ (function (_super) {\n tslib_1.__extends(ClassMethod, _super);\n function ClassMethod(name, params, body, type, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n _this.params = params;\n _this.body = body;\n return _this;\n }\n /**\n * @param {?} m\n * @return {?}\n */\n ClassMethod.prototype.isEquivalent = /**\n * @param {?} m\n * @return {?}\n */\n function (m) {\n return this.name === m.name && areAllEquivalent(this.body, m.body);\n };\n return ClassMethod;\n}(AbstractClassPart));\nexport { ClassMethod };\nfunction ClassMethod_tsickle_Closure_declarations() {\n /** @type {?} */\n ClassMethod.prototype.name;\n /** @type {?} */\n ClassMethod.prototype.params;\n /** @type {?} */\n ClassMethod.prototype.body;\n}\nvar ClassGetter = /** @class */ (function (_super) {\n tslib_1.__extends(ClassGetter, _super);\n function ClassGetter(name, body, type, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n _this.body = body;\n return _this;\n }\n /**\n * @param {?} m\n * @return {?}\n */\n ClassGetter.prototype.isEquivalent = /**\n * @param {?} m\n * @return {?}\n */\n function (m) {\n return this.name === m.name && areAllEquivalent(this.body, m.body);\n };\n return ClassGetter;\n}(AbstractClassPart));\nexport { ClassGetter };\nfunction ClassGetter_tsickle_Closure_declarations() {\n /** @type {?} */\n ClassGetter.prototype.name;\n /** @type {?} */\n ClassGetter.prototype.body;\n}\nvar ClassStmt = /** @class */ (function (_super) {\n tslib_1.__extends(ClassStmt, _super);\n function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.parent = parent;\n _this.fields = fields;\n _this.getters = getters;\n _this.constructorMethod = constructorMethod;\n _this.methods = methods;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n ClassStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof ClassStmt && this.name === stmt.name &&\n nullSafeIsEquivalent(this.parent, stmt.parent) &&\n areAllEquivalent(this.fields, stmt.fields) &&\n areAllEquivalent(this.getters, stmt.getters) &&\n this.constructorMethod.isEquivalent(stmt.constructorMethod) &&\n areAllEquivalent(this.methods, stmt.methods);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ClassStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitDeclareClassStmt(this, context);\n };\n return ClassStmt;\n}(Statement));\nexport { ClassStmt };\nfunction ClassStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n ClassStmt.prototype.name;\n /** @type {?} */\n ClassStmt.prototype.parent;\n /** @type {?} */\n ClassStmt.prototype.fields;\n /** @type {?} */\n ClassStmt.prototype.getters;\n /** @type {?} */\n ClassStmt.prototype.constructorMethod;\n /** @type {?} */\n ClassStmt.prototype.methods;\n}\nvar IfStmt = /** @class */ (function (_super) {\n tslib_1.__extends(IfStmt, _super);\n function IfStmt(condition, trueCase, falseCase, sourceSpan) {\n if (falseCase === void 0) { falseCase = []; }\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.condition = condition;\n _this.trueCase = trueCase;\n _this.falseCase = falseCase;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n IfStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&\n areAllEquivalent(this.trueCase, stmt.trueCase) &&\n areAllEquivalent(this.falseCase, stmt.falseCase);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n IfStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitIfStmt(this, context);\n };\n return IfStmt;\n}(Statement));\nexport { IfStmt };\nfunction IfStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n IfStmt.prototype.condition;\n /** @type {?} */\n IfStmt.prototype.trueCase;\n /** @type {?} */\n IfStmt.prototype.falseCase;\n}\nvar CommentStmt = /** @class */ (function (_super) {\n tslib_1.__extends(CommentStmt, _super);\n function CommentStmt(comment, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.comment = comment;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n CommentStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) { return stmt instanceof CommentStmt; };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n CommentStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitCommentStmt(this, context);\n };\n return CommentStmt;\n}(Statement));\nexport { CommentStmt };\nfunction CommentStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n CommentStmt.prototype.comment;\n}\nvar TryCatchStmt = /** @class */ (function (_super) {\n tslib_1.__extends(TryCatchStmt, _super);\n function TryCatchStmt(bodyStmts, catchStmts, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.bodyStmts = bodyStmts;\n _this.catchStmts = catchStmts;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n TryCatchStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&\n areAllEquivalent(this.catchStmts, stmt.catchStmts);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n TryCatchStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitTryCatchStmt(this, context);\n };\n return TryCatchStmt;\n}(Statement));\nexport { TryCatchStmt };\nfunction TryCatchStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n TryCatchStmt.prototype.bodyStmts;\n /** @type {?} */\n TryCatchStmt.prototype.catchStmts;\n}\nvar ThrowStmt = /** @class */ (function (_super) {\n tslib_1.__extends(ThrowStmt, _super);\n function ThrowStmt(error, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.error = error;\n return _this;\n }\n /**\n * @param {?} stmt\n * @return {?}\n */\n ThrowStmt.prototype.isEquivalent = /**\n * @param {?} stmt\n * @return {?}\n */\n function (stmt) {\n return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);\n };\n /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n ThrowStmt.prototype.visitStatement = /**\n * @param {?} visitor\n * @param {?} context\n * @return {?}\n */\n function (visitor, context) {\n return visitor.visitThrowStmt(this, context);\n };\n return ThrowStmt;\n}(Statement));\nexport { ThrowStmt };\nfunction ThrowStmt_tsickle_Closure_declarations() {\n /** @type {?} */\n ThrowStmt.prototype.error;\n}\n/**\n * @record\n */\nexport function StatementVisitor() { }\nfunction StatementVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n StatementVisitor.prototype.visitDeclareVarStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitDeclareFunctionStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitExpressionStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitReturnStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitDeclareClassStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitIfStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitTryCatchStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitThrowStmt;\n /** @type {?} */\n StatementVisitor.prototype.visitCommentStmt;\n}\nvar AstTransformer = /** @class */ (function () {\n function AstTransformer() {\n }\n /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.transformExpr = /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n function (expr, context) { return expr; };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.transformStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) { return stmt; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitReadVarExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return this.transformExpr(ast, context); };\n /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitWriteVarExpr = /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n function (expr, context) {\n return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitWriteKeyExpr = /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n function (expr, context) {\n return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitWritePropExpr = /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n function (expr, context) {\n return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitInvokeMethodExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var /** @type {?} */ method = ast.builtin || ast.name;\n return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), /** @type {?} */ ((method)), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitInvokeFunctionExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitInstantiateExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return this.transformExpr(ast, context); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitExternalExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitConditionalExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), /** @type {?} */ ((ast.falseCase)).visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitNotExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitAssertNotNullExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitCastExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitFunctionExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitBinaryOperatorExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitReadPropExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitReadKeyExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralArrayExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitLiteralMapExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var _this = this;\n var /** @type {?} */ entries = ast.entries.map(function (entry) {\n return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this, context), entry.quoted);\n });\n var /** @type {?} */ mapType = new MapType(ast.valueType, null);\n return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitCommaExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);\n };\n /**\n * @param {?} exprs\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitAllExpressions = /**\n * @param {?} exprs\n * @param {?} context\n * @return {?}\n */\n function (exprs, context) {\n var _this = this;\n return exprs.map(function (expr) { return expr.visitExpression(_this, context); });\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitDeclareVarStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new DeclareVarStmt(stmt.name, stmt.value.visitExpression(this, context), stmt.type, stmt.modifiers, stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitDeclareFunctionStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitExpressionStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitReturnStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitDeclareClassStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n var _this = this;\n var /** @type {?} */ parent = /** @type {?} */ ((stmt.parent)).visitExpression(this, context);\n var /** @type {?} */ getters = stmt.getters.map(function (getter) {\n return new ClassGetter(getter.name, _this.visitAllStatements(getter.body, context), getter.type, getter.modifiers);\n });\n var /** @type {?} */ ctorMethod = stmt.constructorMethod &&\n new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);\n var /** @type {?} */ methods = stmt.methods.map(function (method) {\n return new ClassMethod(method.name, method.params, _this.visitAllStatements(method.body, context), method.type, method.modifiers);\n });\n return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitIfStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitTryCatchStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitThrowStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitCommentStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n return this.transformStmt(stmt, context);\n };\n /**\n * @param {?} stmts\n * @param {?} context\n * @return {?}\n */\n AstTransformer.prototype.visitAllStatements = /**\n * @param {?} stmts\n * @param {?} context\n * @return {?}\n */\n function (stmts, context) {\n var _this = this;\n return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); });\n };\n return AstTransformer;\n}());\nexport { AstTransformer };\nvar RecursiveAstVisitor = /** @class */ (function () {\n function RecursiveAstVisitor() {\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitType = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) { return ast; };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitExpression = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n };\n /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitBuiltintType = /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n function (type, context) { return this.visitType(type, context); };\n /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitExpressionType = /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n function (type, context) {\n type.value.visitExpression(this, context);\n return this.visitType(type, context);\n };\n /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitArrayType = /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n function (type, context) { return this.visitType(type, context); };\n /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitMapType = /**\n * @param {?} type\n * @param {?} context\n * @return {?}\n */\n function (type, context) { return this.visitType(type, context); };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitReadVarExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitWriteVarExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitWriteKeyExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitWritePropExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitInvokeMethodExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitInvokeFunctionExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitInstantiateExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitExternalExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var _this = this;\n if (ast.typeParams) {\n ast.typeParams.forEach(function (type) { return type.visitType(_this, context); });\n }\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitConditionalExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context); /** @type {?} */\n ((ast.falseCase)).visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitNotExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitAssertNotNullExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitCastExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitFunctionExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitBinaryOperatorExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitReadPropExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitReadKeyExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralArrayExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitLiteralMapExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n var _this = this;\n ast.entries.forEach(function (entry) { return entry.value.visitExpression(_this, context); });\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitCommaExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n };\n /**\n * @param {?} exprs\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitAllExpressions = /**\n * @param {?} exprs\n * @param {?} context\n * @return {?}\n */\n function (exprs, context) {\n var _this = this;\n exprs.forEach(function (expr) { return expr.visitExpression(_this, context); });\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitDeclareVarStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n stmt.value.visitExpression(this, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitDeclareFunctionStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitExpressionStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitReturnStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitDeclareClassStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n var _this = this;\n /** @type {?} */ ((stmt.parent)).visitExpression(this, context);\n stmt.getters.forEach(function (getter) { return _this.visitAllStatements(getter.body, context); });\n if (stmt.constructorMethod) {\n this.visitAllStatements(stmt.constructorMethod.body, context);\n }\n stmt.methods.forEach(function (method) { return _this.visitAllStatements(method.body, context); });\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitIfStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n stmt.condition.visitExpression(this, context);\n this.visitAllStatements(stmt.trueCase, context);\n this.visitAllStatements(stmt.falseCase, context);\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitTryCatchStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n this.visitAllStatements(stmt.bodyStmts, context);\n this.visitAllStatements(stmt.catchStmts, context);\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitThrowStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n stmt.error.visitExpression(this, context);\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitCommentStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) { return stmt; };\n /**\n * @param {?} stmts\n * @param {?} context\n * @return {?}\n */\n RecursiveAstVisitor.prototype.visitAllStatements = /**\n * @param {?} stmts\n * @param {?} context\n * @return {?}\n */\n function (stmts, context) {\n var _this = this;\n stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); });\n };\n return RecursiveAstVisitor;\n}());\nexport { RecursiveAstVisitor };\n/**\n * @param {?} stmts\n * @return {?}\n */\nexport function findReadVarNames(stmts) {\n var /** @type {?} */ visitor = new _ReadVarVisitor();\n visitor.visitAllStatements(stmts, null);\n return visitor.varNames;\n}\nvar _ReadVarVisitor = /** @class */ (function (_super) {\n tslib_1.__extends(_ReadVarVisitor, _super);\n function _ReadVarVisitor() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.varNames = new Set();\n return _this;\n }\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n _ReadVarVisitor.prototype.visitDeclareFunctionStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n // Don't descend into nested functions\n return stmt;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n _ReadVarVisitor.prototype.visitDeclareClassStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n // Don't descend into nested classes\n return stmt;\n };\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n _ReadVarVisitor.prototype.visitReadVarExpr = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n if (ast.name) {\n this.varNames.add(ast.name);\n }\n return null;\n };\n return _ReadVarVisitor;\n}(RecursiveAstVisitor));\nfunction _ReadVarVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _ReadVarVisitor.prototype.varNames;\n}\n/**\n * @param {?} stmts\n * @return {?}\n */\nexport function collectExternalReferences(stmts) {\n var /** @type {?} */ visitor = new _FindExternalReferencesVisitor();\n visitor.visitAllStatements(stmts, null);\n return visitor.externalReferences;\n}\nvar _FindExternalReferencesVisitor = /** @class */ (function (_super) {\n tslib_1.__extends(_FindExternalReferencesVisitor, _super);\n function _FindExternalReferencesVisitor() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.externalReferences = [];\n return _this;\n }\n /**\n * @param {?} e\n * @param {?} context\n * @return {?}\n */\n _FindExternalReferencesVisitor.prototype.visitExternalExpr = /**\n * @param {?} e\n * @param {?} context\n * @return {?}\n */\n function (e, context) {\n this.externalReferences.push(e.value);\n return _super.prototype.visitExternalExpr.call(this, e, context);\n };\n return _FindExternalReferencesVisitor;\n}(RecursiveAstVisitor));\nfunction _FindExternalReferencesVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _FindExternalReferencesVisitor.prototype.externalReferences;\n}\n/**\n * @param {?} stmt\n * @param {?} sourceSpan\n * @return {?}\n */\nexport function applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {\n if (!sourceSpan) {\n return stmt;\n }\n var /** @type {?} */ transformer = new _ApplySourceSpanTransformer(sourceSpan);\n return stmt.visitStatement(transformer, null);\n}\n/**\n * @param {?} expr\n * @param {?} sourceSpan\n * @return {?}\n */\nexport function applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {\n if (!sourceSpan) {\n return expr;\n }\n var /** @type {?} */ transformer = new _ApplySourceSpanTransformer(sourceSpan);\n return expr.visitExpression(transformer, null);\n}\nvar _ApplySourceSpanTransformer = /** @class */ (function (_super) {\n tslib_1.__extends(_ApplySourceSpanTransformer, _super);\n function _ApplySourceSpanTransformer(sourceSpan) {\n var _this = _super.call(this) || this;\n _this.sourceSpan = sourceSpan;\n return _this;\n }\n /**\n * @param {?} obj\n * @return {?}\n */\n _ApplySourceSpanTransformer.prototype._clone = /**\n * @param {?} obj\n * @return {?}\n */\n function (obj) {\n var /** @type {?} */ clone = Object.create(obj.constructor.prototype);\n for (var /** @type {?} */ prop in obj) {\n clone[prop] = obj[prop];\n }\n return clone;\n };\n /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n _ApplySourceSpanTransformer.prototype.transformExpr = /**\n * @param {?} expr\n * @param {?} context\n * @return {?}\n */\n function (expr, context) {\n if (!expr.sourceSpan) {\n expr = this._clone(expr);\n expr.sourceSpan = this.sourceSpan;\n }\n return expr;\n };\n /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n _ApplySourceSpanTransformer.prototype.transformStmt = /**\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n function (stmt, context) {\n if (!stmt.sourceSpan) {\n stmt = this._clone(stmt);\n stmt.sourceSpan = this.sourceSpan;\n }\n return stmt;\n };\n return _ApplySourceSpanTransformer;\n}(AstTransformer));\nfunction _ApplySourceSpanTransformer_tsickle_Closure_declarations() {\n /** @type {?} */\n _ApplySourceSpanTransformer.prototype.sourceSpan;\n}\n/**\n * @param {?} name\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\n/**\n * @param {?} id\n * @param {?=} typeParams\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function importExpr(id, typeParams, sourceSpan) {\n if (typeParams === void 0) { typeParams = null; }\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\n/**\n * @param {?} id\n * @param {?=} typeParams\n * @param {?=} typeModifiers\n * @return {?}\n */\nexport function importType(id, typeParams, typeModifiers) {\n if (typeParams === void 0) { typeParams = null; }\n if (typeModifiers === void 0) { typeModifiers = null; }\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\n/**\n * @param {?} expr\n * @param {?=} typeModifiers\n * @return {?}\n */\nexport function expressionType(expr, typeModifiers) {\n if (typeModifiers === void 0) { typeModifiers = null; }\n return new ExpressionType(expr, typeModifiers);\n}\n/**\n * @param {?} values\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\n/**\n * @param {?} values\n * @param {?=} type\n * @return {?}\n */\nexport function literalMap(values, type) {\n if (type === void 0) { type = null; }\n return new LiteralMapExpr(values.map(function (e) { return new LiteralMapEntry(e.key, e.value, e.quoted); }), type, null);\n}\n/**\n * @param {?} expr\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\n/**\n * @param {?} expr\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function assertNotNull(expr, sourceSpan) {\n return new AssertNotNull(expr, sourceSpan);\n}\n/**\n * @param {?} params\n * @param {?} body\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function fn(params, body, type, sourceSpan) {\n return new FunctionExpr(params, body, type, sourceSpan);\n}\n/**\n * @param {?} value\n * @param {?=} type\n * @param {?=} sourceSpan\n * @return {?}\n */\nexport function literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\n//# sourceMappingURL=output_ast.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { tokenName, tokenReference } from './compile_metadata';\nimport { Identifiers, createTokenForExternalReference } from './identifiers';\nimport { ParseError } from './parse_util';\nimport { ProviderAst, ProviderAstType } from './template_parser/template_ast';\nvar ProviderError = /** @class */ (function (_super) {\n tslib_1.__extends(ProviderError, _super);\n function ProviderError(message, span) {\n return _super.call(this, span, message) || this;\n }\n return ProviderError;\n}(ParseError));\nexport { ProviderError };\n/**\n * @record\n */\nexport function QueryWithId() { }\nfunction QueryWithId_tsickle_Closure_declarations() {\n /** @type {?} */\n QueryWithId.prototype.meta;\n /** @type {?} */\n QueryWithId.prototype.queryId;\n}\nvar ProviderViewContext = /** @class */ (function () {\n function ProviderViewContext(reflector, component) {\n var _this = this;\n this.reflector = reflector;\n this.component = component;\n this.errors = [];\n this.viewQueries = _getViewQueries(component);\n this.viewProviders = new Map();\n component.viewProviders.forEach(function (provider) {\n if (_this.viewProviders.get(tokenReference(provider.token)) == null) {\n _this.viewProviders.set(tokenReference(provider.token), true);\n }\n });\n }\n return ProviderViewContext;\n}());\nexport { ProviderViewContext };\nfunction ProviderViewContext_tsickle_Closure_declarations() {\n /**\n * \\@internal\n * @type {?}\n */\n ProviderViewContext.prototype.viewQueries;\n /**\n * \\@internal\n * @type {?}\n */\n ProviderViewContext.prototype.viewProviders;\n /** @type {?} */\n ProviderViewContext.prototype.errors;\n /** @type {?} */\n ProviderViewContext.prototype.reflector;\n /** @type {?} */\n ProviderViewContext.prototype.component;\n}\nvar ProviderElementContext = /** @class */ (function () {\n function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {\n var _this = this;\n this.viewContext = viewContext;\n this._parent = _parent;\n this._isViewRoot = _isViewRoot;\n this._directiveAsts = _directiveAsts;\n this._sourceSpan = _sourceSpan;\n this._transformedProviders = new Map();\n this._seenProviders = new Map();\n this._queriedTokens = new Map();\n this.transformedHasViewContainer = false;\n this._attrs = {};\n attrs.forEach(function (attrAst) { return _this._attrs[attrAst.name] = attrAst.value; });\n var /** @type {?} */ directivesMeta = _directiveAsts.map(function (directiveAst) { return directiveAst.directive; });\n this._allProviders =\n _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);\n this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._addQueryReadsTo(provider.token, provider.token, _this._queriedTokens);\n });\n if (isTemplate) {\n var /** @type {?} */ templateRefId = createTokenForExternalReference(this.viewContext.reflector, Identifiers.TemplateRef);\n this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);\n }\n refs.forEach(function (refAst) {\n var /** @type {?} */ defaultQueryValue = refAst.value ||\n createTokenForExternalReference(_this.viewContext.reflector, Identifiers.ElementRef);\n _this._addQueryReadsTo({ value: refAst.name }, defaultQueryValue, _this._queriedTokens);\n });\n if (this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {\n this.transformedHasViewContainer = true;\n }\n // create the providers that we know are eager first\n Array.from(this._allProviders.values()).forEach(function (provider) {\n var /** @type {?} */ eager = provider.eager || _this._queriedTokens.get(tokenReference(provider.token));\n if (eager) {\n _this._getOrCreateLocalProvider(provider.providerType, provider.token, true);\n }\n });\n }\n /**\n * @return {?}\n */\n ProviderElementContext.prototype.afterElement = /**\n * @return {?}\n */\n function () {\n var _this = this;\n // collect lazy providers\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._getOrCreateLocalProvider(provider.providerType, provider.token, false);\n });\n };\n Object.defineProperty(ProviderElementContext.prototype, \"transformProviders\", {\n get: /**\n * @return {?}\n */\n function () {\n // Note: Maps keep their insertion order.\n var /** @type {?} */ lazyProviders = [];\n var /** @type {?} */ eagerProviders = [];\n this._transformedProviders.forEach(function (provider) {\n if (provider.eager) {\n eagerProviders.push(provider);\n }\n else {\n lazyProviders.push(provider);\n }\n });\n return lazyProviders.concat(eagerProviders);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProviderElementContext.prototype, \"transformedDirectiveAsts\", {\n get: /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ sortedProviderTypes = this.transformProviders.map(function (provider) { return provider.token.identifier; });\n var /** @type {?} */ sortedDirectives = this._directiveAsts.slice();\n sortedDirectives.sort(function (dir1, dir2) {\n return sortedProviderTypes.indexOf(dir1.directive.type) -\n sortedProviderTypes.indexOf(dir2.directive.type);\n });\n return sortedDirectives;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProviderElementContext.prototype, \"queryMatches\", {\n get: /**\n * @return {?}\n */\n function () {\n var /** @type {?} */ allMatches = [];\n this._queriedTokens.forEach(function (matches) { allMatches.push.apply(allMatches, matches); });\n return allMatches;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {?} token\n * @param {?} defaultValue\n * @param {?} queryReadTokens\n * @return {?}\n */\n ProviderElementContext.prototype._addQueryReadsTo = /**\n * @param {?} token\n * @param {?} defaultValue\n * @param {?} queryReadTokens\n * @return {?}\n */\n function (token, defaultValue, queryReadTokens) {\n this._getQueriesFor(token).forEach(function (query) {\n var /** @type {?} */ queryValue = query.meta.read || defaultValue;\n var /** @type {?} */ tokenRef = tokenReference(queryValue);\n var /** @type {?} */ queryMatches = queryReadTokens.get(tokenRef);\n if (!queryMatches) {\n queryMatches = [];\n queryReadTokens.set(tokenRef, queryMatches);\n }\n queryMatches.push({ queryId: query.queryId, value: queryValue });\n });\n };\n /**\n * @param {?} token\n * @return {?}\n */\n ProviderElementContext.prototype._getQueriesFor = /**\n * @param {?} token\n * @return {?}\n */\n function (token) {\n var /** @type {?} */ result = [];\n var /** @type {?} */ currentEl = this;\n var /** @type {?} */ distance = 0;\n var /** @type {?} */ queries;\n while (currentEl !== null) {\n queries = currentEl._contentQueries.get(tokenReference(token));\n if (queries) {\n result.push.apply(result, queries.filter(function (query) { return query.meta.descendants || distance <= 1; }));\n }\n if (currentEl._directiveAsts.length > 0) {\n distance++;\n }\n currentEl = currentEl._parent;\n }\n queries = this.viewContext.viewQueries.get(tokenReference(token));\n if (queries) {\n result.push.apply(result, queries);\n }\n return result;\n };\n /**\n * @param {?} requestingProviderType\n * @param {?} token\n * @param {?} eager\n * @return {?}\n */\n ProviderElementContext.prototype._getOrCreateLocalProvider = /**\n * @param {?} requestingProviderType\n * @param {?} token\n * @param {?} eager\n * @return {?}\n */\n function (requestingProviderType, token, eager) {\n var _this = this;\n var /** @type {?} */ resolvedProvider = this._allProviders.get(tokenReference(token));\n if (!resolvedProvider || ((requestingProviderType === ProviderAstType.Directive ||\n requestingProviderType === ProviderAstType.PublicService) &&\n resolvedProvider.providerType === ProviderAstType.PrivateService) ||\n ((requestingProviderType === ProviderAstType.PrivateService ||\n requestingProviderType === ProviderAstType.PublicService) &&\n resolvedProvider.providerType === ProviderAstType.Builtin)) {\n return null;\n }\n var /** @type {?} */ transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n if (transformedProviderAst) {\n return transformedProviderAst;\n }\n if (this._seenProviders.get(tokenReference(token)) != null) {\n this.viewContext.errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \" + tokenName(token), this._sourceSpan));\n return null;\n }\n this._seenProviders.set(tokenReference(token), true);\n var /** @type {?} */ transformedProviders = resolvedProvider.providers.map(function (provider) {\n var /** @type {?} */ transformedUseValue = provider.useValue;\n var /** @type {?} */ transformedUseExisting = /** @type {?} */ ((provider.useExisting));\n var /** @type {?} */ transformedDeps = /** @type {?} */ ((undefined));\n if (provider.useExisting != null) {\n var /** @type {?} */ existingDiDep = /** @type {?} */ ((_this._getDependency(resolvedProvider.providerType, { token: provider.useExisting }, eager)));\n if (existingDiDep.token != null) {\n transformedUseExisting = existingDiDep.token;\n }\n else {\n transformedUseExisting = /** @type {?} */ ((null));\n transformedUseValue = existingDiDep.value;\n }\n }\n else if (provider.useFactory) {\n var /** @type {?} */ deps = provider.deps || provider.useFactory.diDeps;\n transformedDeps =\n deps.map(function (dep) { return ((_this._getDependency(resolvedProvider.providerType, dep, eager))); });\n }\n else if (provider.useClass) {\n var /** @type {?} */ deps = provider.deps || provider.useClass.diDeps;\n transformedDeps =\n deps.map(function (dep) { return ((_this._getDependency(resolvedProvider.providerType, dep, eager))); });\n }\n return _transformProvider(provider, {\n useExisting: transformedUseExisting,\n useValue: transformedUseValue,\n deps: transformedDeps\n });\n });\n transformedProviderAst =\n _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });\n this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n return transformedProviderAst;\n };\n /**\n * @param {?} requestingProviderType\n * @param {?} dep\n * @param {?=} eager\n * @return {?}\n */\n ProviderElementContext.prototype._getLocalDependency = /**\n * @param {?} requestingProviderType\n * @param {?} dep\n * @param {?=} eager\n * @return {?}\n */\n function (requestingProviderType, dep, eager) {\n if (eager === void 0) { eager = false; }\n if (dep.isAttribute) {\n var /** @type {?} */ attrValue = this._attrs[/** @type {?} */ ((dep.token)).value];\n return { isValue: true, value: attrValue == null ? null : attrValue };\n }\n if (dep.token != null) {\n // access builtints\n if ((requestingProviderType === ProviderAstType.Directive ||\n requestingProviderType === ProviderAstType.Component)) {\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ChangeDetectorRef) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n return dep;\n }\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {\n (/** @type {?} */ (this)).transformedHasViewContainer = true;\n }\n }\n // access the injector\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.Injector)) {\n return dep;\n }\n // access providers\n if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {\n return dep;\n }\n }\n return null;\n };\n /**\n * @param {?} requestingProviderType\n * @param {?} dep\n * @param {?=} eager\n * @return {?}\n */\n ProviderElementContext.prototype._getDependency = /**\n * @param {?} requestingProviderType\n * @param {?} dep\n * @param {?=} eager\n * @return {?}\n */\n function (requestingProviderType, dep, eager) {\n if (eager === void 0) { eager = false; }\n var /** @type {?} */ currElement = this;\n var /** @type {?} */ currEager = eager;\n var /** @type {?} */ result = null;\n if (!dep.isSkipSelf) {\n result = this._getLocalDependency(requestingProviderType, dep, eager);\n }\n if (dep.isSelf) {\n if (!result && dep.isOptional) {\n result = { isValue: true, value: null };\n }\n }\n else {\n // check parent elements\n while (!result && currElement._parent) {\n var /** @type {?} */ prevElement = currElement;\n currElement = currElement._parent;\n if (prevElement._isViewRoot) {\n currEager = false;\n }\n result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);\n }\n // check @Host restriction\n if (!result) {\n if (!dep.isHost || this.viewContext.component.isHost ||\n this.viewContext.component.type.reference === tokenReference(/** @type {?} */ ((dep.token))) ||\n this.viewContext.viewProviders.get(tokenReference(/** @type {?} */ ((dep.token)))) != null) {\n result = dep;\n }\n else {\n result = dep.isOptional ? result = { isValue: true, value: null } : null;\n }\n }\n }\n if (!result) {\n this.viewContext.errors.push(new ProviderError(\"No provider for \" + tokenName((/** @type {?} */ ((dep.token)))), this._sourceSpan));\n }\n return result;\n };\n return ProviderElementContext;\n}());\nexport { ProviderElementContext };\nfunction ProviderElementContext_tsickle_Closure_declarations() {\n /** @type {?} */\n ProviderElementContext.prototype._contentQueries;\n /** @type {?} */\n ProviderElementContext.prototype._transformedProviders;\n /** @type {?} */\n ProviderElementContext.prototype._seenProviders;\n /** @type {?} */\n ProviderElementContext.prototype._allProviders;\n /** @type {?} */\n ProviderElementContext.prototype._attrs;\n /** @type {?} */\n ProviderElementContext.prototype._queriedTokens;\n /** @type {?} */\n ProviderElementContext.prototype.transformedHasViewContainer;\n /** @type {?} */\n ProviderElementContext.prototype.viewContext;\n /** @type {?} */\n ProviderElementContext.prototype._parent;\n /** @type {?} */\n ProviderElementContext.prototype._isViewRoot;\n /** @type {?} */\n ProviderElementContext.prototype._directiveAsts;\n /** @type {?} */\n ProviderElementContext.prototype._sourceSpan;\n}\nvar NgModuleProviderAnalyzer = /** @class */ (function () {\n function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {\n var _this = this;\n this.reflector = reflector;\n this._transformedProviders = new Map();\n this._seenProviders = new Map();\n this._errors = [];\n this._allProviders = new Map();\n ngModule.transitiveModule.modules.forEach(function (ngModuleType) {\n var /** @type {?} */ ngModuleProvider = { token: { identifier: ngModuleType }, useClass: ngModuleType };\n _resolveProviders([ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, _this._errors, _this._allProviders);\n });\n _resolveProviders(ngModule.transitiveModule.providers.map(function (entry) { return entry.provider; }).concat(extraProviders), ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders);\n }\n /**\n * @return {?}\n */\n NgModuleProviderAnalyzer.prototype.parse = /**\n * @return {?}\n */\n function () {\n var _this = this;\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._getOrCreateLocalProvider(provider.token, provider.eager);\n });\n if (this._errors.length > 0) {\n var /** @type {?} */ errorString = this._errors.join('\\n');\n throw new Error(\"Provider parse errors:\\n\" + errorString);\n }\n // Note: Maps keep their insertion order.\n var /** @type {?} */ lazyProviders = [];\n var /** @type {?} */ eagerProviders = [];\n this._transformedProviders.forEach(function (provider) {\n if (provider.eager) {\n eagerProviders.push(provider);\n }\n else {\n lazyProviders.push(provider);\n }\n });\n return lazyProviders.concat(eagerProviders);\n };\n /**\n * @param {?} token\n * @param {?} eager\n * @return {?}\n */\n NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider = /**\n * @param {?} token\n * @param {?} eager\n * @return {?}\n */\n function (token, eager) {\n var _this = this;\n var /** @type {?} */ resolvedProvider = this._allProviders.get(tokenReference(token));\n if (!resolvedProvider) {\n return null;\n }\n var /** @type {?} */ transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n if (transformedProviderAst) {\n return transformedProviderAst;\n }\n if (this._seenProviders.get(tokenReference(token)) != null) {\n this._errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \" + tokenName(token), resolvedProvider.sourceSpan));\n return null;\n }\n this._seenProviders.set(tokenReference(token), true);\n var /** @type {?} */ transformedProviders = resolvedProvider.providers.map(function (provider) {\n var /** @type {?} */ transformedUseValue = provider.useValue;\n var /** @type {?} */ transformedUseExisting = /** @type {?} */ ((provider.useExisting));\n var /** @type {?} */ transformedDeps = /** @type {?} */ ((undefined));\n if (provider.useExisting != null) {\n var /** @type {?} */ existingDiDep = _this._getDependency({ token: provider.useExisting }, eager, resolvedProvider.sourceSpan);\n if (existingDiDep.token != null) {\n transformedUseExisting = existingDiDep.token;\n }\n else {\n transformedUseExisting = /** @type {?} */ ((null));\n transformedUseValue = existingDiDep.value;\n }\n }\n else if (provider.useFactory) {\n var /** @type {?} */ deps = provider.deps || provider.useFactory.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });\n }\n else if (provider.useClass) {\n var /** @type {?} */ deps = provider.deps || provider.useClass.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });\n }\n return _transformProvider(provider, {\n useExisting: transformedUseExisting,\n useValue: transformedUseValue,\n deps: transformedDeps\n });\n });\n transformedProviderAst =\n _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });\n this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n return transformedProviderAst;\n };\n /**\n * @param {?} dep\n * @param {?=} eager\n * @param {?=} requestorSourceSpan\n * @return {?}\n */\n NgModuleProviderAnalyzer.prototype._getDependency = /**\n * @param {?} dep\n * @param {?=} eager\n * @param {?=} requestorSourceSpan\n * @return {?}\n */\n function (dep, eager, requestorSourceSpan) {\n if (eager === void 0) { eager = false; }\n var /** @type {?} */ foundLocal = false;\n if (!dep.isSkipSelf && dep.token != null) {\n // access the injector\n if (tokenReference(dep.token) ===\n this.reflector.resolveExternalReference(Identifiers.Injector) ||\n tokenReference(dep.token) ===\n this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)) {\n foundLocal = true;\n // access providers\n }\n else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {\n foundLocal = true;\n }\n }\n var /** @type {?} */ result = dep;\n if (dep.isSelf && !foundLocal) {\n if (dep.isOptional) {\n result = { isValue: true, value: null };\n }\n else {\n this._errors.push(new ProviderError(\"No provider for \" + tokenName((/** @type {?} */ ((dep.token)))), requestorSourceSpan));\n }\n }\n return result;\n };\n return NgModuleProviderAnalyzer;\n}());\nexport { NgModuleProviderAnalyzer };\nfunction NgModuleProviderAnalyzer_tsickle_Closure_declarations() {\n /** @type {?} */\n NgModuleProviderAnalyzer.prototype._transformedProviders;\n /** @type {?} */\n NgModuleProviderAnalyzer.prototype._seenProviders;\n /** @type {?} */\n NgModuleProviderAnalyzer.prototype._allProviders;\n /** @type {?} */\n NgModuleProviderAnalyzer.prototype._errors;\n /** @type {?} */\n NgModuleProviderAnalyzer.prototype.reflector;\n}\n/**\n * @param {?} provider\n * @param {?} __1\n * @return {?}\n */\nfunction _transformProvider(provider, _a) {\n var useExisting = _a.useExisting, useValue = _a.useValue, deps = _a.deps;\n return {\n token: provider.token,\n useClass: provider.useClass,\n useExisting: useExisting,\n useFactory: provider.useFactory,\n useValue: useValue,\n deps: deps,\n multi: provider.multi\n };\n}\n/**\n * @param {?} provider\n * @param {?} __1\n * @return {?}\n */\nfunction _transformProviderAst(provider, _a) {\n var eager = _a.eager, providers = _a.providers;\n return new ProviderAst(provider.token, provider.multiProvider, provider.eager || eager, providers, provider.providerType, provider.lifecycleHooks, provider.sourceSpan);\n}\n/**\n * @param {?} directives\n * @param {?} sourceSpan\n * @param {?} targetErrors\n * @return {?}\n */\nfunction _resolveProvidersFromDirectives(directives, sourceSpan, targetErrors) {\n var /** @type {?} */ providersByToken = new Map();\n directives.forEach(function (directive) {\n var /** @type {?} */ dirProvider = { token: { identifier: directive.type }, useClass: directive.type };\n _resolveProviders([dirProvider], directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true, sourceSpan, targetErrors, providersByToken);\n });\n // Note: directives need to be able to overwrite providers of a component!\n var /** @type {?} */ directivesWithComponentFirst = directives.filter(function (dir) { return dir.isComponent; }).concat(directives.filter(function (dir) { return !dir.isComponent; }));\n directivesWithComponentFirst.forEach(function (directive) {\n _resolveProviders(directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors, providersByToken);\n _resolveProviders(directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors, providersByToken);\n });\n return providersByToken;\n}\n/**\n * @param {?} providers\n * @param {?} providerType\n * @param {?} eager\n * @param {?} sourceSpan\n * @param {?} targetErrors\n * @param {?} targetProvidersByToken\n * @return {?}\n */\nfunction _resolveProviders(providers, providerType, eager, sourceSpan, targetErrors, targetProvidersByToken) {\n providers.forEach(function (provider) {\n var /** @type {?} */ resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));\n if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {\n targetErrors.push(new ProviderError(\"Mixing multi and non multi provider is not possible for token \" + tokenName(resolvedProvider.token), sourceSpan));\n }\n if (!resolvedProvider) {\n var /** @type {?} */ lifecycleHooks = provider.token.identifier &&\n (/** @type {?} */ (provider.token.identifier)).lifecycleHooks ?\n (/** @type {?} */ (provider.token.identifier)).lifecycleHooks :\n [];\n var /** @type {?} */ isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);\n resolvedProvider = new ProviderAst(provider.token, !!provider.multi, eager || isUseValue, [provider], providerType, lifecycleHooks, sourceSpan);\n targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);\n }\n else {\n if (!provider.multi) {\n resolvedProvider.providers.length = 0;\n }\n resolvedProvider.providers.push(provider);\n }\n });\n}\n/**\n * @param {?} component\n * @return {?}\n */\nfunction _getViewQueries(component) {\n // Note: queries start with id 1 so we can use the number in a Bloom filter!\n var /** @type {?} */ viewQueryId = 1;\n var /** @type {?} */ viewQueries = new Map();\n if (component.viewQueries) {\n component.viewQueries.forEach(function (query) { return _addQueryToTokenMap(viewQueries, { meta: query, queryId: viewQueryId++ }); });\n }\n return viewQueries;\n}\n/**\n * @param {?} contentQueryStartId\n * @param {?} directives\n * @return {?}\n */\nfunction _getContentQueries(contentQueryStartId, directives) {\n var /** @type {?} */ contentQueryId = contentQueryStartId;\n var /** @type {?} */ contentQueries = new Map();\n directives.forEach(function (directive, directiveIndex) {\n if (directive.queries) {\n directive.queries.forEach(function (query) { return _addQueryToTokenMap(contentQueries, { meta: query, queryId: contentQueryId++ }); });\n }\n });\n return contentQueries;\n}\n/**\n * @param {?} map\n * @param {?} query\n * @return {?}\n */\nfunction _addQueryToTokenMap(map, query) {\n query.meta.selectors.forEach(function (token) {\n var /** @type {?} */ entry = map.get(tokenReference(token));\n if (!entry) {\n entry = [];\n map.set(tokenReference(token), entry);\n }\n entry.push(query);\n });\n}\n//# sourceMappingURL=provider_analyzer.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { visitValue } from '../util';\nimport * as o from './output_ast';\nexport var /** @type {?} */ QUOTED_KEYS = '$quoted$';\n/**\n * @param {?} ctx\n * @param {?} value\n * @param {?=} type\n * @return {?}\n */\nexport function convertValueToOutputAst(ctx, value, type) {\n if (type === void 0) { type = null; }\n return visitValue(value, new _ValueOutputAstTransformer(ctx), type);\n}\nvar _ValueOutputAstTransformer = /** @class */ (function () {\n function _ValueOutputAstTransformer(ctx) {\n this.ctx = ctx;\n }\n /**\n * @param {?} arr\n * @param {?} type\n * @return {?}\n */\n _ValueOutputAstTransformer.prototype.visitArray = /**\n * @param {?} arr\n * @param {?} type\n * @return {?}\n */\n function (arr, type) {\n var _this = this;\n return o.literalArr(arr.map(function (value) { return visitValue(value, _this, null); }), type);\n };\n /**\n * @param {?} map\n * @param {?} type\n * @return {?}\n */\n _ValueOutputAstTransformer.prototype.visitStringMap = /**\n * @param {?} map\n * @param {?} type\n * @return {?}\n */\n function (map, type) {\n var _this = this;\n var /** @type {?} */ entries = [];\n var /** @type {?} */ quotedSet = new Set(map && map[QUOTED_KEYS]);\n Object.keys(map).forEach(function (key) {\n entries.push(new o.LiteralMapEntry(key, visitValue(map[key], _this, null), quotedSet.has(key)));\n });\n return new o.LiteralMapExpr(entries, type);\n };\n /**\n * @param {?} value\n * @param {?} type\n * @return {?}\n */\n _ValueOutputAstTransformer.prototype.visitPrimitive = /**\n * @param {?} value\n * @param {?} type\n * @return {?}\n */\n function (value, type) { return o.literal(value, type); };\n /**\n * @param {?} value\n * @param {?} type\n * @return {?}\n */\n _ValueOutputAstTransformer.prototype.visitOther = /**\n * @param {?} value\n * @param {?} type\n * @return {?}\n */\n function (value, type) {\n if (value instanceof o.Expression) {\n return value;\n }\n else {\n return this.ctx.importExpr(value);\n }\n };\n return _ValueOutputAstTransformer;\n}());\nfunction _ValueOutputAstTransformer_tsickle_Closure_declarations() {\n /** @type {?} */\n _ValueOutputAstTransformer.prototype.ctx;\n}\n//# sourceMappingURL=value_util.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { Identifiers, createTokenForExternalReference } from '../identifiers';\nimport { LifecycleHooks } from '../lifecycle_reflector';\nimport * as o from '../output/output_ast';\nimport { convertValueToOutputAst } from '../output/value_util';\nimport { ProviderAstType } from '../template_parser/template_ast';\n/**\n * @param {?} ctx\n * @param {?} providerAst\n * @return {?}\n */\nexport function providerDef(ctx, providerAst) {\n var /** @type {?} */ flags = 0 /* None */;\n if (!providerAst.eager) {\n flags |= 4096 /* LazyProvider */;\n }\n if (providerAst.providerType === ProviderAstType.PrivateService) {\n flags |= 8192 /* PrivateProvider */;\n }\n providerAst.lifecycleHooks.forEach(function (lifecycleHook) {\n // for regular providers, we only support ngOnDestroy\n if (lifecycleHook === LifecycleHooks.OnDestroy ||\n providerAst.providerType === ProviderAstType.Directive ||\n providerAst.providerType === ProviderAstType.Component) {\n flags |= lifecycleHookToNodeFlag(lifecycleHook);\n }\n });\n var _a = providerAst.multiProvider ?\n multiProviderDef(ctx, flags, providerAst.providers) :\n singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;\n return {\n providerExpr: providerExpr,\n flags: providerFlags, depsExpr: depsExpr,\n tokenExpr: tokenExpr(ctx, providerAst.token),\n };\n}\n/**\n * @param {?} ctx\n * @param {?} flags\n * @param {?} providers\n * @return {?}\n */\nfunction multiProviderDef(ctx, flags, providers) {\n var /** @type {?} */ allDepDefs = [];\n var /** @type {?} */ allParams = [];\n var /** @type {?} */ exprs = providers.map(function (provider, providerIndex) {\n var /** @type {?} */ expr;\n if (provider.useClass) {\n var /** @type {?} */ depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);\n expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);\n }\n else if (provider.useFactory) {\n var /** @type {?} */ depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);\n expr = ctx.importExpr(provider.useFactory.reference).callFn(depExprs);\n }\n else if (provider.useExisting) {\n var /** @type {?} */ depExprs = convertDeps(providerIndex, [{ token: provider.useExisting }]);\n expr = depExprs[0];\n }\n else {\n expr = convertValueToOutputAst(ctx, provider.useValue);\n }\n return expr;\n });\n var /** @type {?} */ providerExpr = o.fn(allParams, [new o.ReturnStatement(o.literalArr(exprs))], o.INFERRED_TYPE);\n return {\n providerExpr: providerExpr,\n flags: flags | 1024 /* TypeFactoryProvider */,\n depsExpr: o.literalArr(allDepDefs)\n };\n /**\n * @param {?} providerIndex\n * @param {?} deps\n * @return {?}\n */\n function convertDeps(providerIndex, deps) {\n return deps.map(function (dep, depIndex) {\n var /** @type {?} */ paramName = \"p\" + providerIndex + \"_\" + depIndex;\n allParams.push(new o.FnParam(paramName, o.DYNAMIC_TYPE));\n allDepDefs.push(depDef(ctx, dep));\n return o.variable(paramName);\n });\n }\n}\n/**\n * @param {?} ctx\n * @param {?} flags\n * @param {?} providerType\n * @param {?} providerMeta\n * @return {?}\n */\nfunction singleProviderDef(ctx, flags, providerType, providerMeta) {\n var /** @type {?} */ providerExpr;\n var /** @type {?} */ deps;\n if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {\n providerExpr = ctx.importExpr(/** @type {?} */ ((providerMeta.useClass)).reference);\n flags |= 16384 /* TypeDirective */;\n deps = providerMeta.deps || /** @type {?} */ ((providerMeta.useClass)).diDeps;\n }\n else {\n if (providerMeta.useClass) {\n providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n flags |= 512 /* TypeClassProvider */;\n deps = providerMeta.deps || providerMeta.useClass.diDeps;\n }\n else if (providerMeta.useFactory) {\n providerExpr = ctx.importExpr(providerMeta.useFactory.reference);\n flags |= 1024 /* TypeFactoryProvider */;\n deps = providerMeta.deps || providerMeta.useFactory.diDeps;\n }\n else if (providerMeta.useExisting) {\n providerExpr = o.NULL_EXPR;\n flags |= 2048 /* TypeUseExistingProvider */;\n deps = [{ token: providerMeta.useExisting }];\n }\n else {\n providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);\n flags |= 256 /* TypeValueProvider */;\n deps = [];\n }\n }\n var /** @type {?} */ depsExpr = o.literalArr(deps.map(function (dep) { return depDef(ctx, dep); }));\n return { providerExpr: providerExpr, flags: flags, depsExpr: depsExpr };\n}\n/**\n * @param {?} ctx\n * @param {?} tokenMeta\n * @return {?}\n */\nfunction tokenExpr(ctx, tokenMeta) {\n return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) :\n o.literal(tokenMeta.value);\n}\n/**\n * @param {?} ctx\n * @param {?} dep\n * @return {?}\n */\nexport function depDef(ctx, dep) {\n // Note: the following fields have already been normalized out by provider_analyzer:\n // - isAttribute, isSelf, isHost\n var /** @type {?} */ expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, /** @type {?} */ ((dep.token)));\n var /** @type {?} */ flags = 0 /* None */;\n if (dep.isSkipSelf) {\n flags |= 1 /* SkipSelf */;\n }\n if (dep.isOptional) {\n flags |= 2 /* Optional */;\n }\n if (dep.isValue) {\n flags |= 8 /* Value */;\n }\n return flags === 0 /* None */ ? expr : o.literalArr([o.literal(flags), expr]);\n}\n/**\n * @param {?} lifecycleHook\n * @return {?}\n */\nexport function lifecycleHookToNodeFlag(lifecycleHook) {\n var /** @type {?} */ nodeFlag = 0 /* None */;\n switch (lifecycleHook) {\n case LifecycleHooks.AfterContentChecked:\n nodeFlag = 2097152 /* AfterContentChecked */;\n break;\n case LifecycleHooks.AfterContentInit:\n nodeFlag = 1048576 /* AfterContentInit */;\n break;\n case LifecycleHooks.AfterViewChecked:\n nodeFlag = 8388608 /* AfterViewChecked */;\n break;\n case LifecycleHooks.AfterViewInit:\n nodeFlag = 4194304 /* AfterViewInit */;\n break;\n case LifecycleHooks.DoCheck:\n nodeFlag = 262144 /* DoCheck */;\n break;\n case LifecycleHooks.OnChanges:\n nodeFlag = 524288 /* OnChanges */;\n break;\n case LifecycleHooks.OnDestroy:\n nodeFlag = 131072 /* OnDestroy */;\n break;\n case LifecycleHooks.OnInit:\n nodeFlag = 65536 /* OnInit */;\n break;\n }\n return nodeFlag;\n}\n/**\n * @param {?} reflector\n * @param {?} ctx\n * @param {?} flags\n * @param {?} entryComponents\n * @return {?}\n */\nexport function componentFactoryResolverProviderDef(reflector, ctx, flags, entryComponents) {\n var /** @type {?} */ entryComponentFactories = entryComponents.map(function (entryComponent) { return ctx.importExpr(entryComponent.componentFactory); });\n var /** @type {?} */ token = createTokenForExternalReference(reflector, Identifiers.ComponentFactoryResolver);\n var /** @type {?} */ classMeta = {\n diDeps: [\n { isValue: true, value: o.literalArr(entryComponentFactories) },\n { token: token, isSkipSelf: true, isOptional: true },\n { token: createTokenForExternalReference(reflector, Identifiers.NgModuleRef) },\n ],\n lifecycleHooks: [],\n reference: reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)\n };\n var _a = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {\n token: token,\n multi: false,\n useClass: classMeta,\n }), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;\n return { providerExpr: providerExpr, flags: providerFlags, depsExpr: depsExpr, tokenExpr: tokenExpr(ctx, token) };\n}\n//# sourceMappingURL=provider_compiler.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { identifierName } from './compile_metadata';\nimport { Identifiers } from './identifiers';\nimport * as o from './output/output_ast';\nimport { typeSourceSpan } from './parse_util';\nimport { NgModuleProviderAnalyzer } from './provider_analyzer';\nimport { componentFactoryResolverProviderDef, providerDef } from './view_compiler/provider_compiler';\nvar NgModuleCompileResult = /** @class */ (function () {\n function NgModuleCompileResult(ngModuleFactoryVar) {\n this.ngModuleFactoryVar = ngModuleFactoryVar;\n }\n return NgModuleCompileResult;\n}());\nexport { NgModuleCompileResult };\nfunction NgModuleCompileResult_tsickle_Closure_declarations() {\n /** @type {?} */\n NgModuleCompileResult.prototype.ngModuleFactoryVar;\n}\nvar /** @type {?} */ LOG_VAR = o.variable('_l');\nvar NgModuleCompiler = /** @class */ (function () {\n function NgModuleCompiler(reflector) {\n this.reflector = reflector;\n }\n /**\n * @param {?} ctx\n * @param {?} ngModuleMeta\n * @param {?} extraProviders\n * @return {?}\n */\n NgModuleCompiler.prototype.compile = /**\n * @param {?} ctx\n * @param {?} ngModuleMeta\n * @param {?} extraProviders\n * @return {?}\n */\n function (ctx, ngModuleMeta, extraProviders) {\n var /** @type {?} */ sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);\n var /** @type {?} */ entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;\n var /** @type {?} */ bootstrapComponents = ngModuleMeta.bootstrapComponents;\n var /** @type {?} */ providerParser = new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);\n var /** @type {?} */ providerDefs = [componentFactoryResolverProviderDef(this.reflector, ctx, 0 /* None */, entryComponentFactories)]\n .concat(providerParser.parse().map(function (provider) { return providerDef(ctx, provider); }))\n .map(function (_a) {\n var providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;\n return o.importExpr(Identifiers.moduleProviderDef).callFn([\n o.literal(flags), tokenExpr, providerExpr, depsExpr\n ]);\n });\n var /** @type {?} */ ngModuleDef = o.importExpr(Identifiers.moduleDef).callFn([o.literalArr(providerDefs)]);\n var /** @type {?} */ ngModuleDefFactory = o.fn([new o.FnParam(/** @type {?} */ ((LOG_VAR.name)))], [new o.ReturnStatement(ngModuleDef)], o.INFERRED_TYPE);\n var /** @type {?} */ ngModuleFactoryVar = identifierName(ngModuleMeta.type) + \"NgFactory\";\n this._createNgModuleFactory(ctx, ngModuleMeta.type.reference, o.importExpr(Identifiers.createModuleFactory).callFn([\n ctx.importExpr(ngModuleMeta.type.reference),\n o.literalArr(bootstrapComponents.map(function (id) { return ctx.importExpr(id.reference); })),\n ngModuleDefFactory\n ]));\n if (ngModuleMeta.id) {\n var /** @type {?} */ registerFactoryStmt = o.importExpr(Identifiers.RegisterModuleFactoryFn)\n .callFn([o.literal(ngModuleMeta.id), o.variable(ngModuleFactoryVar)])\n .toStmt();\n ctx.statements.push(registerFactoryStmt);\n }\n return new NgModuleCompileResult(ngModuleFactoryVar);\n };\n /**\n * @param {?} ctx\n * @param {?} ngModuleReference\n * @return {?}\n */\n NgModuleCompiler.prototype.createStub = /**\n * @param {?} ctx\n * @param {?} ngModuleReference\n * @return {?}\n */\n function (ctx, ngModuleReference) {\n this._createNgModuleFactory(ctx, ngModuleReference, o.NULL_EXPR);\n };\n /**\n * @param {?} ctx\n * @param {?} reference\n * @param {?} value\n * @return {?}\n */\n NgModuleCompiler.prototype._createNgModuleFactory = /**\n * @param {?} ctx\n * @param {?} reference\n * @param {?} value\n * @return {?}\n */\n function (ctx, reference, value) {\n var /** @type {?} */ ngModuleFactoryVar = identifierName({ reference: reference }) + \"NgFactory\";\n var /** @type {?} */ ngModuleFactoryStmt = o.variable(ngModuleFactoryVar)\n .set(value)\n .toDeclStmt(o.importType(Identifiers.NgModuleFactory, [/** @type {?} */ ((o.expressionType(ctx.importExpr(reference))))], [o.TypeModifier.Const]), [o.StmtModifier.Final, o.StmtModifier.Exported]);\n ctx.statements.push(ngModuleFactoryStmt);\n };\n return NgModuleCompiler;\n}());\nexport { NgModuleCompiler };\nfunction NgModuleCompiler_tsickle_Closure_declarations() {\n /** @type {?} */\n NgModuleCompiler.prototype.reflector;\n}\n//# sourceMappingURL=ng_module_compiler.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { createNgModule } from './core';\nimport { findLast } from './directive_resolver';\nimport { stringify } from './util';\n/**\n * Resolves types to {\\@link NgModule}.\n */\nvar /**\n * Resolves types to {\\@link NgModule}.\n */\nNgModuleResolver = /** @class */ (function () {\n function NgModuleResolver(_reflector) {\n this._reflector = _reflector;\n }\n /**\n * @param {?} type\n * @return {?}\n */\n NgModuleResolver.prototype.isNgModule = /**\n * @param {?} type\n * @return {?}\n */\n function (type) { return this._reflector.annotations(type).some(createNgModule.isTypeOf); };\n /**\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n NgModuleResolver.prototype.resolve = /**\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var /** @type {?} */ ngModuleMeta = findLast(this._reflector.annotations(type), createNgModule.isTypeOf);\n if (ngModuleMeta) {\n return ngModuleMeta;\n }\n else {\n if (throwIfNotFound) {\n throw new Error(\"No NgModule metadata found for '\" + stringify(type) + \"'.\");\n }\n return null;\n }\n };\n return NgModuleResolver;\n}());\n/**\n * Resolves types to {\\@link NgModule}.\n */\nexport { NgModuleResolver };\nfunction NgModuleResolver_tsickle_Closure_declarations() {\n /** @type {?} */\n NgModuleResolver.prototype._reflector;\n}\n//# sourceMappingURL=ng_module_resolver.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { utf8Encode } from '../util';\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nvar /** @type {?} */ VERSION = 3;\nvar /** @type {?} */ JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nvar SourceMapGenerator = /** @class */ (function () {\n function SourceMapGenerator(file) {\n if (file === void 0) { file = null; }\n this.file = file;\n this.sourcesContent = new Map();\n this.lines = [];\n this.lastCol0 = 0;\n this.hasMappings = false;\n }\n // The content is `null` when the content is expected to be loaded using the URL\n /**\n * @param {?} url\n * @param {?=} content\n * @return {?}\n */\n SourceMapGenerator.prototype.addSource = /**\n * @param {?} url\n * @param {?=} content\n * @return {?}\n */\n function (url, content) {\n if (content === void 0) { content = null; }\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n };\n /**\n * @return {?}\n */\n SourceMapGenerator.prototype.addLine = /**\n * @return {?}\n */\n function () {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n };\n /**\n * @param {?} col0\n * @param {?=} sourceUrl\n * @param {?=} sourceLine0\n * @param {?=} sourceCol0\n * @return {?}\n */\n SourceMapGenerator.prototype.addMapping = /**\n * @param {?} col0\n * @param {?=} sourceUrl\n * @param {?=} sourceLine0\n * @param {?=} sourceCol0\n * @return {?}\n */\n function (col0, sourceUrl, sourceLine0, sourceCol0) {\n if (!this.currentLine) {\n throw new Error(\"A line must be added before mappings can be added\");\n }\n if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n throw new Error(\"Unknown source file \\\"\" + sourceUrl + \"\\\"\");\n }\n if (col0 == null) {\n throw new Error(\"The column in the generated code must be provided\");\n }\n if (col0 < this.lastCol0) {\n throw new Error(\"Mapping should be added in output order\");\n }\n if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n throw new Error(\"The source location must be provided when a source url is provided\");\n }\n this.hasMappings = true;\n this.lastCol0 = col0;\n this.currentLine.push({ col0: col0, sourceUrl: sourceUrl, sourceLine0: sourceLine0, sourceCol0: sourceCol0 });\n return this;\n };\n Object.defineProperty(SourceMapGenerator.prototype, \"currentLine\", {\n get: /**\n * @return {?}\n */\n function () { return this.lines.slice(-1)[0]; },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n SourceMapGenerator.prototype.toJSON = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (!this.hasMappings) {\n return null;\n }\n var /** @type {?} */ sourcesIndex = new Map();\n var /** @type {?} */ sources = [];\n var /** @type {?} */ sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach(function (url, i) {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(_this.sourcesContent.get(url) || null);\n });\n var /** @type {?} */ mappings = '';\n var /** @type {?} */ lastCol0 = 0;\n var /** @type {?} */ lastSourceIndex = 0;\n var /** @type {?} */ lastSourceLine0 = 0;\n var /** @type {?} */ lastSourceCol0 = 0;\n this.lines.forEach(function (segments) {\n lastCol0 = 0;\n mappings += segments\n .map(function (segment) {\n // zero-based starting column of the line in the generated code\n var /** @type {?} */ segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n lastCol0 = segment.col0;\n if (segment.sourceUrl != null) {\n // zero-based index into the “sources” list\n segAsStr +=\n toBase64VLQ(/** @type {?} */ ((sourcesIndex.get(segment.sourceUrl))) - lastSourceIndex);\n lastSourceIndex = /** @type {?} */ ((sourcesIndex.get(segment.sourceUrl)));\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(/** @type {?} */ ((segment.sourceLine0)) - lastSourceLine0);\n lastSourceLine0 = /** @type {?} */ ((segment.sourceLine0));\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(/** @type {?} */ ((segment.sourceCol0)) - lastSourceCol0);\n lastSourceCol0 = /** @type {?} */ ((segment.sourceCol0));\n }\n return segAsStr;\n })\n .join(',');\n mappings += ';';\n });\n mappings = mappings.slice(0, -1);\n return {\n 'file': this.file || '',\n 'version': VERSION,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings,\n };\n };\n /**\n * @return {?}\n */\n SourceMapGenerator.prototype.toJsComment = /**\n * @return {?}\n */\n function () {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n '';\n };\n return SourceMapGenerator;\n}());\nexport { SourceMapGenerator };\nfunction SourceMapGenerator_tsickle_Closure_declarations() {\n /** @type {?} */\n SourceMapGenerator.prototype.sourcesContent;\n /** @type {?} */\n SourceMapGenerator.prototype.lines;\n /** @type {?} */\n SourceMapGenerator.prototype.lastCol0;\n /** @type {?} */\n SourceMapGenerator.prototype.hasMappings;\n /** @type {?} */\n SourceMapGenerator.prototype.file;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nexport function toBase64String(value) {\n var /** @type {?} */ b64 = '';\n value = utf8Encode(value);\n for (var /** @type {?} */ i = 0; i < value.length;) {\n var /** @type {?} */ i1 = value.charCodeAt(i++);\n var /** @type {?} */ i2 = value.charCodeAt(i++);\n var /** @type {?} */ i3 = value.charCodeAt(i++);\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit(((i1 & 3) << 4) | (isNaN(i2) ? 0 : i2 >> 4));\n b64 += isNaN(i2) ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 >> 6));\n b64 += isNaN(i2) || isNaN(i3) ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction toBase64VLQ(value) {\n value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n var /** @type {?} */ out = '';\n do {\n var /** @type {?} */ digit = value & 31;\n value = value >> 5;\n if (value > 0) {\n digit = digit | 32;\n }\n out += toBase64Digit(digit);\n } while (value > 0);\n return out;\n}\nvar /** @type {?} */ B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n/**\n * @param {?} value\n * @return {?}\n */\nfunction toBase64Digit(value) {\n if (value < 0 || value >= 64) {\n throw new Error(\"Can only encode value in the range [0, 63]\");\n }\n return B64_DIGITS[value];\n}\n//# sourceMappingURL=source_map.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as o from './output_ast';\nimport { SourceMapGenerator } from './source_map';\nvar /** @type {?} */ _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nvar /** @type {?} */ _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nvar /** @type {?} */ _INDENT_WITH = ' ';\nexport var /** @type {?} */ CATCH_ERROR_VAR = o.variable('error', null, null);\nexport var /** @type {?} */ CATCH_STACK_VAR = o.variable('stack', null, null);\n/**\n * @record\n */\nexport function OutputEmitter() { }\nfunction OutputEmitter_tsickle_Closure_declarations() {\n /** @type {?} */\n OutputEmitter.prototype.emitStatements;\n}\nvar _EmittedLine = /** @class */ (function () {\n function _EmittedLine(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n return _EmittedLine;\n}());\nfunction _EmittedLine_tsickle_Closure_declarations() {\n /** @type {?} */\n _EmittedLine.prototype.partsLength;\n /** @type {?} */\n _EmittedLine.prototype.parts;\n /** @type {?} */\n _EmittedLine.prototype.srcSpans;\n /** @type {?} */\n _EmittedLine.prototype.indent;\n}\nvar EmitterVisitorContext = /** @class */ (function () {\n function EmitterVisitorContext(_indent) {\n this._indent = _indent;\n this._classes = [];\n this._preambleLineCount = 0;\n this._lines = [new _EmittedLine(_indent)];\n }\n /**\n * @return {?}\n */\n EmitterVisitorContext.createRoot = /**\n * @return {?}\n */\n function () { return new EmitterVisitorContext(0); };\n Object.defineProperty(EmitterVisitorContext.prototype, \"_currentLine\", {\n get: /**\n * @return {?}\n */\n function () { return this._lines[this._lines.length - 1]; },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {?=} from\n * @param {?=} lastPart\n * @return {?}\n */\n EmitterVisitorContext.prototype.println = /**\n * @param {?=} from\n * @param {?=} lastPart\n * @return {?}\n */\n function (from, lastPart) {\n if (lastPart === void 0) { lastPart = ''; }\n this.print(from || null, lastPart, true);\n };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.lineIsEmpty = /**\n * @return {?}\n */\n function () { return this._currentLine.parts.length === 0; };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.lineLength = /**\n * @return {?}\n */\n function () {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n };\n /**\n * @param {?} from\n * @param {?} part\n * @param {?=} newLine\n * @return {?}\n */\n EmitterVisitorContext.prototype.print = /**\n * @param {?} from\n * @param {?} part\n * @param {?=} newLine\n * @return {?}\n */\n function (from, part, newLine) {\n if (newLine === void 0) { newLine = false; }\n if (part.length > 0) {\n this._currentLine.parts.push(part);\n this._currentLine.partsLength += part.length;\n this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n }\n if (newLine) {\n this._lines.push(new _EmittedLine(this._indent));\n }\n };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.removeEmptyLastLine = /**\n * @return {?}\n */\n function () {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.incIndent = /**\n * @return {?}\n */\n function () {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.decIndent = /**\n * @return {?}\n */\n function () {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n };\n /**\n * @param {?} clazz\n * @return {?}\n */\n EmitterVisitorContext.prototype.pushClass = /**\n * @param {?} clazz\n * @return {?}\n */\n function (clazz) { this._classes.push(clazz); };\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.popClass = /**\n * @return {?}\n */\n function () { return /** @type {?} */ ((this._classes.pop())); };\n Object.defineProperty(EmitterVisitorContext.prototype, \"currentClass\", {\n get: /**\n * @return {?}\n */\n function () {\n return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n EmitterVisitorContext.prototype.toSource = /**\n * @return {?}\n */\n function () {\n return this.sourceLines\n .map(function (l) { return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : ''; })\n .join('\\n');\n };\n /**\n * @param {?} genFilePath\n * @param {?=} startsAtLine\n * @return {?}\n */\n EmitterVisitorContext.prototype.toSourceMapGenerator = /**\n * @param {?} genFilePath\n * @param {?=} startsAtLine\n * @return {?}\n */\n function (genFilePath, startsAtLine) {\n if (startsAtLine === void 0) { startsAtLine = 0; }\n var /** @type {?} */ map = new SourceMapGenerator(genFilePath);\n var /** @type {?} */ firstOffsetMapped = false;\n var /** @type {?} */ mapFirstOffsetIfNeeded = function () {\n if (!firstOffsetMapped) {\n // Add a single space so that tools won't try to load the file from disk.\n // Note: We are using virtual urls like `ng:///`, so we have to\n // provide a content here.\n map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n firstOffsetMapped = true;\n }\n };\n for (var /** @type {?} */ i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach(function (line, lineIdx) {\n map.addLine();\n var /** @type {?} */ spans = line.srcSpans;\n var /** @type {?} */ parts = line.parts;\n var /** @type {?} */ col0 = line.indent * _INDENT_WITH.length;\n var /** @type {?} */ spanIdx = 0;\n // skip leading parts without source spans\n while (spanIdx < spans.length && !spans[spanIdx]) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n firstOffsetMapped = true;\n }\n else {\n mapFirstOffsetIfNeeded();\n }\n while (spanIdx < spans.length) {\n var /** @type {?} */ span = /** @type {?} */ ((spans[spanIdx]));\n var /** @type {?} */ source = span.start.file;\n var /** @type {?} */ sourceLine = span.start.line;\n var /** @type {?} */ sourceCol = span.start.col;\n map.addSource(source.url, source.content)\n .addMapping(col0, source.url, sourceLine, sourceCol);\n col0 += parts[spanIdx].length;\n spanIdx++;\n // assign parts without span or the same span to the previous segment\n while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n }\n });\n return map;\n };\n /**\n * @param {?} count\n * @return {?}\n */\n EmitterVisitorContext.prototype.setPreambleLineCount = /**\n * @param {?} count\n * @return {?}\n */\n function (count) { return this._preambleLineCount = count; };\n /**\n * @param {?} line\n * @param {?} column\n * @return {?}\n */\n EmitterVisitorContext.prototype.spanOf = /**\n * @param {?} line\n * @param {?} column\n * @return {?}\n */\n function (line, column) {\n var /** @type {?} */ emittedLine = this._lines[line - this._preambleLineCount];\n if (emittedLine) {\n var /** @type {?} */ columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (var /** @type {?} */ partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n var /** @type {?} */ part = emittedLine.parts[partIndex];\n if (part.length > columnsLeft) {\n return emittedLine.srcSpans[partIndex];\n }\n columnsLeft -= part.length;\n }\n }\n return null;\n };\n Object.defineProperty(EmitterVisitorContext.prototype, \"sourceLines\", {\n get: /**\n * @return {?}\n */\n function () {\n if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n return this._lines.slice(0, -1);\n }\n return this._lines;\n },\n enumerable: true,\n configurable: true\n });\n return EmitterVisitorContext;\n}());\nexport { EmitterVisitorContext };\nfunction EmitterVisitorContext_tsickle_Closure_declarations() {\n /** @type {?} */\n EmitterVisitorContext.prototype._lines;\n /** @type {?} */\n EmitterVisitorContext.prototype._classes;\n /** @type {?} */\n EmitterVisitorContext.prototype._preambleLineCount;\n /** @type {?} */\n EmitterVisitorContext.prototype._indent;\n}\n/**\n * @abstract\n */\nvar /**\n * @abstract\n */\nAbstractEmitterVisitor = /** @class */ (function () {\n function AbstractEmitterVisitor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitExpressionStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitReturnStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n ctx.print(stmt, \"return \");\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitIfStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n ctx.print(stmt, \"if (\");\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, \") {\");\n var /** @type {?} */ hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n if (stmt.trueCase.length <= 1 && !hasElseCase) {\n ctx.print(stmt, \" \");\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.removeEmptyLastLine();\n ctx.print(stmt, \" \");\n }\n else {\n ctx.println();\n ctx.incIndent();\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.decIndent();\n if (hasElseCase) {\n ctx.println(stmt, \"} else {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.falseCase, ctx);\n ctx.decIndent();\n }\n }\n ctx.println(stmt, \"}\");\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitThrowStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n ctx.print(stmt, \"throw \");\n stmt.error.visitExpression(this, ctx);\n ctx.println(stmt, \";\");\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitCommentStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n var /** @type {?} */ lines = stmt.comment.split('\\n');\n lines.forEach(function (line) { ctx.println(stmt, \"// \" + line); });\n return null;\n };\n /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitWriteVarExpr = /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n function (expr, ctx) {\n var /** @type {?} */ lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n ctx.print(expr, expr.name + \" = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitWriteKeyExpr = /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n function (expr, ctx) {\n var /** @type {?} */ lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, \"[\");\n expr.index.visitExpression(this, ctx);\n ctx.print(expr, \"] = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitWritePropExpr = /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n function (expr, ctx) {\n var /** @type {?} */ lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, \".\" + expr.name + \" = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitInvokeMethodExpr = /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n function (expr, ctx) {\n expr.receiver.visitExpression(this, ctx);\n var /** @type {?} */ name = expr.name;\n if (expr.builtin != null) {\n name = this.getBuiltinMethodName(expr.builtin);\n if (name == null) {\n // some builtins just mean to skip the call.\n return null;\n }\n }\n ctx.print(expr, \".\" + name + \"(\");\n this.visitAllExpressions(expr.args, ctx, \",\");\n ctx.print(expr, \")\");\n return null;\n };\n /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr = /**\n * @param {?} expr\n * @param {?} ctx\n * @return {?}\n */\n function (expr, ctx) {\n expr.fn.visitExpression(this, ctx);\n ctx.print(expr, \"(\");\n this.visitAllExpressions(expr.args, ctx, ',');\n ctx.print(expr, \")\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitReadVarExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var /** @type {?} */ varName = /** @type {?} */ ((ast.name));\n if (ast.builtin != null) {\n switch (ast.builtin) {\n case o.BuiltinVar.Super:\n varName = 'super';\n break;\n case o.BuiltinVar.This:\n varName = 'this';\n break;\n case o.BuiltinVar.CatchError:\n varName = /** @type {?} */ ((CATCH_ERROR_VAR.name));\n break;\n case o.BuiltinVar.CatchStack:\n varName = /** @type {?} */ ((CATCH_STACK_VAR.name));\n break;\n default:\n throw new Error(\"Unknown builtin variable \" + ast.builtin);\n }\n }\n ctx.print(ast, varName);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitInstantiateExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"new \");\n ast.classExpr.visitExpression(this, ctx);\n ctx.print(ast, \"(\");\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, \")\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitLiteralExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var /** @type {?} */ value = ast.value;\n if (typeof value === 'string') {\n ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n }\n else {\n ctx.print(ast, \"\" + value);\n }\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitConditionalExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"(\");\n ast.condition.visitExpression(this, ctx);\n ctx.print(ast, '? ');\n ast.trueCase.visitExpression(this, ctx);\n ctx.print(ast, ': '); /** @type {?} */\n ((ast.falseCase)).visitExpression(this, ctx);\n ctx.print(ast, \")\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitNotExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitAssertNotNullExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ast.condition.visitExpression(this, ctx);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var /** @type {?} */ opStr;\n switch (ast.operator) {\n case o.BinaryOperator.Equals:\n opStr = '==';\n break;\n case o.BinaryOperator.Identical:\n opStr = '===';\n break;\n case o.BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case o.BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case o.BinaryOperator.And:\n opStr = '&&';\n break;\n case o.BinaryOperator.Or:\n opStr = '||';\n break;\n case o.BinaryOperator.Plus:\n opStr = '+';\n break;\n case o.BinaryOperator.Minus:\n opStr = '-';\n break;\n case o.BinaryOperator.Divide:\n opStr = '/';\n break;\n case o.BinaryOperator.Multiply:\n opStr = '*';\n break;\n case o.BinaryOperator.Modulo:\n opStr = '%';\n break;\n case o.BinaryOperator.Lower:\n opStr = '<';\n break;\n case o.BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case o.BinaryOperator.Bigger:\n opStr = '>';\n break;\n case o.BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n default:\n throw new Error(\"Unknown operator \" + ast.operator);\n }\n ctx.print(ast, \"(\");\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, \" \" + opStr + \" \");\n ast.rhs.visitExpression(this, ctx);\n ctx.print(ast, \")\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitReadPropExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, \".\");\n ctx.print(ast, ast.name);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitReadKeyExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, \"[\");\n ast.index.visitExpression(this, ctx);\n ctx.print(ast, \"]\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitLiteralArrayExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"[\");\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, \"]\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitLiteralMapExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var _this = this;\n ctx.print(ast, \"{\");\n this.visitAllObjects(function (entry) {\n ctx.print(ast, escapeIdentifier(entry.key, _this._escapeDollarInStrings, entry.quoted) + \":\");\n entry.value.visitExpression(_this, ctx);\n }, ast.entries, ctx, ',');\n ctx.print(ast, \"}\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitCommaExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n };\n /**\n * @param {?} expressions\n * @param {?} ctx\n * @param {?} separator\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitAllExpressions = /**\n * @param {?} expressions\n * @param {?} ctx\n * @param {?} separator\n * @return {?}\n */\n function (expressions, ctx, separator) {\n var _this = this;\n this.visitAllObjects(function (expr) { return expr.visitExpression(_this, ctx); }, expressions, ctx, separator);\n };\n /**\n * @template T\n * @param {?} handler\n * @param {?} expressions\n * @param {?} ctx\n * @param {?} separator\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitAllObjects = /**\n * @template T\n * @param {?} handler\n * @param {?} expressions\n * @param {?} ctx\n * @param {?} separator\n * @return {?}\n */\n function (handler, expressions, ctx, separator) {\n var /** @type {?} */ incrementedIndent = false;\n for (var /** @type {?} */ i = 0; i < expressions.length; i++) {\n if (i > 0) {\n if (ctx.lineLength() > 80) {\n ctx.print(null, separator, true);\n if (!incrementedIndent) {\n // continuation are marked with double indent.\n ctx.incIndent();\n ctx.incIndent();\n incrementedIndent = true;\n }\n }\n else {\n ctx.print(null, separator, false);\n }\n }\n handler(expressions[i]);\n }\n if (incrementedIndent) {\n // continuation are marked with double indent.\n ctx.decIndent();\n ctx.decIndent();\n }\n };\n /**\n * @param {?} statements\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitAllStatements = /**\n * @param {?} statements\n * @param {?} ctx\n * @return {?}\n */\n function (statements, ctx) {\n var _this = this;\n statements.forEach(function (stmt) { return stmt.visitStatement(_this, ctx); });\n };\n return AbstractEmitterVisitor;\n}());\n/**\n * @abstract\n */\nexport { AbstractEmitterVisitor };\nfunction AbstractEmitterVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n AbstractEmitterVisitor.prototype._escapeDollarInStrings;\n /**\n * @abstract\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitCastExpr = function (ast, context) { };\n /**\n * @abstract\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) { };\n /**\n * @abstract\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) { };\n /**\n * @abstract\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) { };\n /**\n * @abstract\n * @param {?} method\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.getBuiltinMethodName = function (method) { };\n /**\n * @abstract\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) { };\n /**\n * @abstract\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) { };\n /**\n * @abstract\n * @param {?} stmt\n * @param {?} context\n * @return {?}\n */\n AbstractEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) { };\n}\n/**\n * @param {?} input\n * @param {?} escapeDollar\n * @param {?=} alwaysQuote\n * @return {?}\n */\nexport function escapeIdentifier(input, escapeDollar, alwaysQuote) {\n if (alwaysQuote === void 0) { alwaysQuote = true; }\n if (input == null) {\n return null;\n }\n var /** @type {?} */ body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {\n var match = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n match[_i] = arguments[_i];\n }\n if (match[0] == '$') {\n return escapeDollar ? '\\\\$' : '$';\n }\n else if (match[0] == '\\n') {\n return '\\\\n';\n }\n else if (match[0] == '\\r') {\n return '\\\\r';\n }\n else {\n return \"\\\\\" + match[0];\n }\n });\n var /** @type {?} */ requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? \"'\" + body + \"'\" : body;\n}\n/**\n * @param {?} count\n * @return {?}\n */\nfunction _createIndent(count) {\n var /** @type {?} */ res = '';\n for (var /** @type {?} */ i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\n//# sourceMappingURL=abstract_emitter.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { AbstractEmitterVisitor, CATCH_ERROR_VAR, CATCH_STACK_VAR, EmitterVisitorContext } from './abstract_emitter';\nimport * as o from './output_ast';\nvar /** @type {?} */ _debugFilePath = '/debug/lib';\n/**\n * @param {?} ast\n * @return {?}\n */\nexport function debugOutputAstAsTypeScript(ast) {\n var /** @type {?} */ converter = new _TsEmitterVisitor();\n var /** @type {?} */ ctx = EmitterVisitorContext.createRoot();\n var /** @type {?} */ asts = Array.isArray(ast) ? ast : [ast];\n asts.forEach(function (ast) {\n if (ast instanceof o.Statement) {\n ast.visitStatement(converter, ctx);\n }\n else if (ast instanceof o.Expression) {\n ast.visitExpression(converter, ctx);\n }\n else if (ast instanceof o.Type) {\n ast.visitType(converter, ctx);\n }\n else {\n throw new Error(\"Don't know how to print debug info for \" + ast);\n }\n });\n return ctx.toSource();\n}\nvar TypeScriptEmitter = /** @class */ (function () {\n function TypeScriptEmitter() {\n }\n /**\n * @param {?} genFilePath\n * @param {?} stmts\n * @param {?=} preamble\n * @param {?=} emitSourceMaps\n * @param {?=} referenceFilter\n * @return {?}\n */\n TypeScriptEmitter.prototype.emitStatementsAndContext = /**\n * @param {?} genFilePath\n * @param {?} stmts\n * @param {?=} preamble\n * @param {?=} emitSourceMaps\n * @param {?=} referenceFilter\n * @return {?}\n */\n function (genFilePath, stmts, preamble, emitSourceMaps, referenceFilter) {\n if (preamble === void 0) { preamble = ''; }\n if (emitSourceMaps === void 0) { emitSourceMaps = true; }\n var /** @type {?} */ converter = new _TsEmitterVisitor(referenceFilter);\n var /** @type {?} */ ctx = EmitterVisitorContext.createRoot();\n converter.visitAllStatements(stmts, ctx);\n var /** @type {?} */ preambleLines = preamble ? preamble.split('\\n') : [];\n converter.reexports.forEach(function (reexports, exportedModuleName) {\n var /** @type {?} */ reexportsCode = reexports.map(function (reexport) { return reexport.name + \" as \" + reexport.as; }).join(',');\n preambleLines.push(\"export {\" + reexportsCode + \"} from '\" + exportedModuleName + \"';\");\n });\n converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {\n // Note: can't write the real word for import as it screws up system.js auto detection...\n preambleLines.push(\"imp\" +\n (\"ort * as \" + prefix + \" from '\" + importedModuleName + \"';\"));\n });\n var /** @type {?} */ sm = emitSourceMaps ?\n ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :\n '';\n var /** @type {?} */ lines = preambleLines.concat([ctx.toSource(), sm]);\n if (sm) {\n // always add a newline at the end, as some tools have bugs without it.\n lines.push('');\n }\n ctx.setPreambleLineCount(preambleLines.length);\n return { sourceText: lines.join('\\n'), context: ctx };\n };\n /**\n * @param {?} genFilePath\n * @param {?} stmts\n * @param {?=} preamble\n * @return {?}\n */\n TypeScriptEmitter.prototype.emitStatements = /**\n * @param {?} genFilePath\n * @param {?} stmts\n * @param {?=} preamble\n * @return {?}\n */\n function (genFilePath, stmts, preamble) {\n if (preamble === void 0) { preamble = ''; }\n return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;\n };\n return TypeScriptEmitter;\n}());\nexport { TypeScriptEmitter };\nvar _TsEmitterVisitor = /** @class */ (function (_super) {\n tslib_1.__extends(_TsEmitterVisitor, _super);\n function _TsEmitterVisitor(referenceFilter) {\n var _this = _super.call(this, false) || this;\n _this.referenceFilter = referenceFilter;\n _this.typeExpression = 0;\n _this.importsWithPrefixes = new Map();\n _this.reexports = new Map();\n return _this;\n }\n /**\n * @param {?} t\n * @param {?} ctx\n * @param {?=} defaultType\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitType = /**\n * @param {?} t\n * @param {?} ctx\n * @param {?=} defaultType\n * @return {?}\n */\n function (t, ctx, defaultType) {\n if (defaultType === void 0) { defaultType = 'any'; }\n if (t) {\n this.typeExpression++;\n t.visitType(this, ctx);\n this.typeExpression--;\n }\n else {\n ctx.print(null, defaultType);\n }\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitLiteralExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var /** @type {?} */ value = ast.value;\n if (value == null && ast.type != o.INFERRED_TYPE) {\n ctx.print(ast, \"(\" + value + \" as any)\");\n return null;\n }\n return _super.prototype.visitLiteralExpr.call(this, ast, ctx);\n };\n // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.\n // In SNC mode, [] have the type never[], so we cast here to any[].\n // TODO: narrow the cast to a more explicit type, or use a pattern that does not\n // start with [].concat. see https://github.com/angular/angular/pull/11846\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitLiteralArrayExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n if (ast.entries.length === 0) {\n ctx.print(ast, '(');\n }\n var /** @type {?} */ result = _super.prototype.visitLiteralArrayExpr.call(this, ast, ctx);\n if (ast.entries.length === 0) {\n ctx.print(ast, ' as any[])');\n }\n return result;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitExternalExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n this._visitIdentifier(ast.value, ast.typeParams, ctx);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitAssertNotNullExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n var /** @type {?} */ result = _super.prototype.visitAssertNotNullExpr.call(this, ast, ctx);\n ctx.print(ast, '!');\n return result;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitDeclareVarStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n if (stmt.hasModifier(o.StmtModifier.Exported) && stmt.value instanceof o.ExternalExpr &&\n !stmt.type) {\n // check for a reexport\n var _a = stmt.value.value, name_1 = _a.name, moduleName = _a.moduleName;\n if (moduleName) {\n var /** @type {?} */ reexports = this.reexports.get(moduleName);\n if (!reexports) {\n reexports = [];\n this.reexports.set(moduleName, reexports);\n }\n reexports.push({ name: /** @type {?} */ ((name_1)), as: stmt.name });\n return null;\n }\n }\n if (stmt.hasModifier(o.StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n if (stmt.hasModifier(o.StmtModifier.Final)) {\n ctx.print(stmt, \"const\");\n }\n else {\n ctx.print(stmt, \"var\");\n }\n ctx.print(stmt, \" \" + stmt.name);\n this._printColonType(stmt.type, ctx);\n ctx.print(stmt, \" = \");\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, \";\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitCastExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"(<\"); /** @type {?} */\n ((ast.type)).visitType(this, ctx);\n ctx.print(ast, \">\");\n ast.value.visitExpression(this, ctx);\n ctx.print(ast, \")\");\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitInstantiateExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"new \");\n this.typeExpression++;\n ast.classExpr.visitExpression(this, ctx);\n this.typeExpression--;\n ctx.print(ast, \"(\");\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, \")\");\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitDeclareClassStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n var _this = this;\n ctx.pushClass(stmt);\n if (stmt.hasModifier(o.StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n ctx.print(stmt, \"class \" + stmt.name);\n if (stmt.parent != null) {\n ctx.print(stmt, \" extends \");\n this.typeExpression++;\n stmt.parent.visitExpression(this, ctx);\n this.typeExpression--;\n }\n ctx.println(stmt, \" {\");\n ctx.incIndent();\n stmt.fields.forEach(function (field) { return _this._visitClassField(field, ctx); });\n if (stmt.constructorMethod != null) {\n this._visitClassConstructor(stmt, ctx);\n }\n stmt.getters.forEach(function (getter) { return _this._visitClassGetter(getter, ctx); });\n stmt.methods.forEach(function (method) { return _this._visitClassMethod(method, ctx); });\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n ctx.popClass();\n return null;\n };\n /**\n * @param {?} field\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitClassField = /**\n * @param {?} field\n * @param {?} ctx\n * @return {?}\n */\n function (field, ctx) {\n if (field.hasModifier(o.StmtModifier.Private)) {\n // comment out as a workaround for #10967\n ctx.print(null, \"/*private*/ \");\n }\n ctx.print(null, field.name);\n this._printColonType(field.type, ctx);\n ctx.println(null, \";\");\n };\n /**\n * @param {?} getter\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitClassGetter = /**\n * @param {?} getter\n * @param {?} ctx\n * @return {?}\n */\n function (getter, ctx) {\n if (getter.hasModifier(o.StmtModifier.Private)) {\n ctx.print(null, \"private \");\n }\n ctx.print(null, \"get \" + getter.name + \"()\");\n this._printColonType(getter.type, ctx);\n ctx.println(null, \" {\");\n ctx.incIndent();\n this.visitAllStatements(getter.body, ctx);\n ctx.decIndent();\n ctx.println(null, \"}\");\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitClassConstructor = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n ctx.print(stmt, \"constructor(\");\n this._visitParams(stmt.constructorMethod.params, ctx);\n ctx.println(stmt, \") {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.constructorMethod.body, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n };\n /**\n * @param {?} method\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitClassMethod = /**\n * @param {?} method\n * @param {?} ctx\n * @return {?}\n */\n function (method, ctx) {\n if (method.hasModifier(o.StmtModifier.Private)) {\n ctx.print(null, \"private \");\n }\n ctx.print(null, method.name + \"(\");\n this._visitParams(method.params, ctx);\n ctx.print(null, \")\");\n this._printColonType(method.type, ctx, 'void');\n ctx.println(null, \" {\");\n ctx.incIndent();\n this.visitAllStatements(method.body, ctx);\n ctx.decIndent();\n ctx.println(null, \"}\");\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitFunctionExpr = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ctx.print(ast, \"(\");\n this._visitParams(ast.params, ctx);\n ctx.print(ast, \")\");\n this._printColonType(ast.type, ctx, 'void');\n ctx.println(ast, \" => {\");\n ctx.incIndent();\n this.visitAllStatements(ast.statements, ctx);\n ctx.decIndent();\n ctx.print(ast, \"}\");\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitDeclareFunctionStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n if (stmt.hasModifier(o.StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n ctx.print(stmt, \"function \" + stmt.name + \"(\");\n this._visitParams(stmt.params, ctx);\n ctx.print(stmt, \")\");\n this._printColonType(stmt.type, ctx, 'void');\n ctx.println(stmt, \" {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.statements, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitTryCatchStmt = /**\n * @param {?} stmt\n * @param {?} ctx\n * @return {?}\n */\n function (stmt, ctx) {\n ctx.println(stmt, \"try {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.bodyStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"} catch (\" + CATCH_ERROR_VAR.name + \") {\");\n ctx.incIndent();\n var /** @type {?} */ catchStmts = [/** @type {?} */ (CATCH_STACK_VAR.set(CATCH_ERROR_VAR.prop('stack', null)).toDeclStmt(null, [\n o.StmtModifier.Final\n ]))].concat(stmt.catchStmts);\n this.visitAllStatements(catchStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitBuiltintType = /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n function (type, ctx) {\n var /** @type {?} */ typeStr;\n switch (type.name) {\n case o.BuiltinTypeName.Bool:\n typeStr = 'boolean';\n break;\n case o.BuiltinTypeName.Dynamic:\n typeStr = 'any';\n break;\n case o.BuiltinTypeName.Function:\n typeStr = 'Function';\n break;\n case o.BuiltinTypeName.Number:\n typeStr = 'number';\n break;\n case o.BuiltinTypeName.Int:\n typeStr = 'number';\n break;\n case o.BuiltinTypeName.String:\n typeStr = 'string';\n break;\n default:\n throw new Error(\"Unsupported builtin type \" + type.name);\n }\n ctx.print(null, typeStr);\n return null;\n };\n /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitExpressionType = /**\n * @param {?} ast\n * @param {?} ctx\n * @return {?}\n */\n function (ast, ctx) {\n ast.value.visitExpression(this, ctx);\n return null;\n };\n /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitArrayType = /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n function (type, ctx) {\n this.visitType(type.of, ctx);\n ctx.print(null, \"[]\");\n return null;\n };\n /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype.visitMapType = /**\n * @param {?} type\n * @param {?} ctx\n * @return {?}\n */\n function (type, ctx) {\n ctx.print(null, \"{[key: string]:\");\n this.visitType(type.valueType, ctx);\n ctx.print(null, \"}\");\n return null;\n };\n /**\n * @param {?} method\n * @return {?}\n */\n _TsEmitterVisitor.prototype.getBuiltinMethodName = /**\n * @param {?} method\n * @return {?}\n */\n function (method) {\n var /** @type {?} */ name;\n switch (method) {\n case o.BuiltinMethod.ConcatArray:\n name = 'concat';\n break;\n case o.BuiltinMethod.SubscribeObservable:\n name = 'subscribe';\n break;\n case o.BuiltinMethod.Bind:\n name = 'bind';\n break;\n default:\n throw new Error(\"Unknown builtin method: \" + method);\n }\n return name;\n };\n /**\n * @param {?} params\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitParams = /**\n * @param {?} params\n * @param {?} ctx\n * @return {?}\n */\n function (params, ctx) {\n var _this = this;\n this.visitAllObjects(function (param) {\n ctx.print(null, param.name);\n _this._printColonType(param.type, ctx);\n }, params, ctx, ',');\n };\n /**\n * @param {?} value\n * @param {?} typeParams\n * @param {?} ctx\n * @return {?}\n */\n _TsEmitterVisitor.prototype._visitIdentifier = /**\n * @param {?} value\n * @param {?} typeParams\n * @param {?} ctx\n * @return {?}\n */\n function (value, typeParams, ctx) {\n var _this = this;\n var name = value.name, moduleName = value.moduleName;\n if (this.referenceFilter && this.referenceFilter(value)) {\n ctx.print(null, '(null as any)');\n return;\n }\n if (moduleName) {\n var /** @type {?} */ prefix = this.importsWithPrefixes.get(moduleName);\n if (prefix == null) {\n prefix = \"i\" + this.importsWithPrefixes.size;\n this.importsWithPrefixes.set(moduleName, prefix);\n }\n ctx.print(null, prefix + \".\");\n }\n ctx.print(null, /** @type {?} */ ((name)));\n if (this.typeExpression > 0) {\n // If we are in a type expression that refers to a generic type then supply\n // the required type parameters. If there were not enough type parameters\n // supplied, supply any as the type. Outside a type expression the reference\n // should not supply type parameters and be treated as a simple value reference\n // to the constructor function itself.\n var /** @type {?} */ suppliedParameters = typeParams || [];\n if (suppliedParameters.length > 0) {\n ctx.print(null, \"<\");\n this.visitAllObjects(function (type) { return type.visitType(_this, ctx); }, /** @type {?} */ ((typeParams)), ctx, ',');\n ctx.print(null, \">\");\n }\n }\n };\n /**\n * @param {?} type\n * @param {?} ctx\n * @param {?=} defaultType\n * @return {?}\n */\n _TsEmitterVisitor.prototype._printColonType = /**\n * @param {?} type\n * @param {?} ctx\n * @param {?=} defaultType\n * @return {?}\n */\n function (type, ctx, defaultType) {\n if (type !== o.INFERRED_TYPE) {\n ctx.print(null, ':');\n this.visitType(type, ctx, defaultType);\n }\n };\n return _TsEmitterVisitor;\n}(AbstractEmitterVisitor));\nfunction _TsEmitterVisitor_tsickle_Closure_declarations() {\n /** @type {?} */\n _TsEmitterVisitor.prototype.typeExpression;\n /** @type {?} */\n _TsEmitterVisitor.prototype.importsWithPrefixes;\n /** @type {?} */\n _TsEmitterVisitor.prototype.reexports;\n /** @type {?} */\n _TsEmitterVisitor.prototype.referenceFilter;\n}\n//# sourceMappingURL=ts_emitter.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { createPipe } from './core';\nimport { findLast } from './directive_resolver';\nimport { resolveForwardRef, stringify } from './util';\n/**\n * Resolve a `Type` for {\\@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {\\@link Compiler}\n */\nvar /**\n * Resolve a `Type` for {\\@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {\\@link Compiler}\n */\nPipeResolver = /** @class */ (function () {\n function PipeResolver(_reflector) {\n this._reflector = _reflector;\n }\n /**\n * @param {?} type\n * @return {?}\n */\n PipeResolver.prototype.isPipe = /**\n * @param {?} type\n * @return {?}\n */\n function (type) {\n var /** @type {?} */ typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n return typeMetadata && typeMetadata.some(createPipe.isTypeOf);\n };\n /**\n * Return {@link Pipe} for a given `Type`.\n */\n /**\n * Return {\\@link Pipe} for a given `Type`.\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n PipeResolver.prototype.resolve = /**\n * Return {\\@link Pipe} for a given `Type`.\n * @param {?} type\n * @param {?=} throwIfNotFound\n * @return {?}\n */\n function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var /** @type {?} */ metas = this._reflector.annotations(resolveForwardRef(type));\n if (metas) {\n var /** @type {?} */ annotation = findLast(metas, createPipe.isTypeOf);\n if (annotation) {\n return annotation;\n }\n }\n if (throwIfNotFound) {\n throw new Error(\"No Pipe decorator found on \" + stringify(type));\n }\n return null;\n };\n return PipeResolver;\n}());\n/**\n * Resolve a `Type` for {\\@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {\\@link Compiler}\n */\nexport { PipeResolver };\nfunction PipeResolver_tsickle_Closure_declarations() {\n /** @type {?} */\n PipeResolver.prototype._reflector;\n}\n//# sourceMappingURL=pipe_resolver.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { SecurityContext } from '../core';\n/**\n * Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'.\n */\nexport var /** @type {?} */ SECURITY_SCHEMA = {};\n/**\n * @param {?} ctx\n * @param {?} specs\n * @return {?}\n */\nfunction registerContext(ctx, specs) {\n for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {\n var spec = specs_1[_i];\n SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n }\n}\n// Case is insignificant below, all element and attribute names are lower-cased for lookup.\nregisterContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n]);\nregisterContext(SecurityContext.STYLE, ['*|style']);\n// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\nregisterContext(SecurityContext.URL, [\n '*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',\n 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',\n 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',\n 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',\n]);\nregisterContext(SecurityContext.RESOURCE_URL, [\n 'applet|code',\n 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase',\n 'object|data',\n 'script|src',\n]);\n//# sourceMappingURL=dom_security_schema.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @abstract\n */\nvar /**\n * @abstract\n */\nElementSchemaRegistry = /** @class */ (function () {\n function ElementSchemaRegistry() {\n }\n return ElementSchemaRegistry;\n}());\n/**\n * @abstract\n */\nexport { ElementSchemaRegistry };\nfunction ElementSchemaRegistry_tsickle_Closure_declarations() {\n /**\n * @abstract\n * @param {?} tagName\n * @param {?} propName\n * @param {?} schemaMetas\n * @return {?}\n */\n ElementSchemaRegistry.prototype.hasProperty = function (tagName, propName, schemaMetas) { };\n /**\n * @abstract\n * @param {?} tagName\n * @param {?} schemaMetas\n * @return {?}\n */\n ElementSchemaRegistry.prototype.hasElement = function (tagName, schemaMetas) { };\n /**\n * @abstract\n * @param {?} elementName\n * @param {?} propName\n * @param {?} isAttribute\n * @return {?}\n */\n ElementSchemaRegistry.prototype.securityContext = function (elementName, propName, isAttribute) { };\n /**\n * @abstract\n * @return {?}\n */\n ElementSchemaRegistry.prototype.allKnownElementNames = function () { };\n /**\n * @abstract\n * @param {?} propName\n * @return {?}\n */\n ElementSchemaRegistry.prototype.getMappedPropName = function (propName) { };\n /**\n * @abstract\n * @return {?}\n */\n ElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { };\n /**\n * @abstract\n * @param {?} name\n * @return {?}\n */\n ElementSchemaRegistry.prototype.validateProperty = function (name) { };\n /**\n * @abstract\n * @param {?} name\n * @return {?}\n */\n ElementSchemaRegistry.prototype.validateAttribute = function (name) { };\n /**\n * @abstract\n * @param {?} propName\n * @return {?}\n */\n ElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) { };\n /**\n * @abstract\n * @param {?} camelCaseProp\n * @param {?} userProvidedProp\n * @param {?} val\n * @return {?}\n */\n ElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (camelCaseProp, userProvidedProp, val) { };\n}\n//# sourceMappingURL=element_schema_registry.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SecurityContext } from '../core';\nimport { isNgContainer, isNgContent } from '../ml_parser/tags';\nimport { dashCaseToCamelCase } from '../util';\nimport { SECURITY_SCHEMA } from './dom_security_schema';\nimport { ElementSchemaRegistry } from './element_schema_registry';\nvar /** @type {?} */ BOOLEAN = 'boolean';\nvar /** @type {?} */ NUMBER = 'number';\nvar /** @type {?} */ STRING = 'string';\nvar /** @type {?} */ OBJECT = 'object';\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n * see dom_element_schema_registry_spec.ts\n */\nvar /** @type {?} */ SCHEMA = [\n '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',\n ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',\n ':svg:graphics^:svg:|',\n ':svg:animation^:svg:|*begin,*end,*repeat',\n ':svg:geometry^:svg:|',\n ':svg:componentTransferFunction^:svg:|',\n ':svg:gradient^:svg:|',\n ':svg:textContent^:svg:graphics|',\n ':svg:textPositioning^:svg:textContent|',\n 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',\n 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',\n 'audio^media|',\n 'br^[HTMLElement]|clear',\n 'base^[HTMLElement]|href,target',\n 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n 'canvas^[HTMLElement]|#height,#width',\n 'content^[HTMLElement]|select',\n 'dl^[HTMLElement]|!compact',\n 'datalist^[HTMLElement]|',\n 'details^[HTMLElement]|!open',\n 'dialog^[HTMLElement]|!open,returnValue',\n 'dir^[HTMLElement]|!compact',\n 'div^[HTMLElement]|align',\n 'embed^[HTMLElement]|align,height,name,src,type,width',\n 'fieldset^[HTMLElement]|!disabled,name',\n 'font^[HTMLElement]|color,face,size',\n 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',\n 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',\n 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',\n 'hr^[HTMLElement]|align,color,!noShade,size,width',\n 'head^[HTMLElement]|',\n 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',\n 'html^[HTMLElement]|version',\n 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',\n 'li^[HTMLElement]|type,#value',\n 'label^[HTMLElement]|htmlFor',\n 'legend^[HTMLElement]|align',\n 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',\n 'map^[HTMLElement]|name',\n 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',\n 'menu^[HTMLElement]|!compact',\n 'meta^[HTMLElement]|content,httpEquiv,name,scheme',\n 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',\n 'ins,del^[HTMLElement]|cite,dateTime',\n 'ol^[HTMLElement]|!compact,!reversed,#start,type',\n 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',\n 'optgroup^[HTMLElement]|!disabled,label',\n 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',\n 'output^[HTMLElement]|defaultValue,%htmlFor,name,value',\n 'p^[HTMLElement]|align',\n 'param^[HTMLElement]|name,type,value,valueType',\n 'picture^[HTMLElement]|',\n 'pre^[HTMLElement]|#width',\n 'progress^[HTMLElement]|#max,#value',\n 'q,blockquote,cite^[HTMLElement]|',\n 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',\n 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n 'shadow^[HTMLElement]|',\n 'slot^[HTMLElement]|name',\n 'source^[HTMLElement]|media,sizes,src,srcset,type',\n 'span^[HTMLElement]|',\n 'style^[HTMLElement]|!disabled,media,type',\n 'caption^[HTMLElement]|align',\n 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',\n 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',\n 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',\n 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',\n 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',\n 'template^[HTMLElement]|',\n 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n 'title^[HTMLElement]|text',\n 'track^[HTMLElement]|!default,kind,label,src,srclang',\n 'ul^[HTMLElement]|!compact,type',\n 'unknown^[HTMLElement]|',\n 'video^media|#height,poster,#width',\n ':svg:a^:svg:graphics|',\n ':svg:animate^:svg:animation|',\n ':svg:animateMotion^:svg:animation|',\n ':svg:animateTransform^:svg:animation|',\n ':svg:circle^:svg:geometry|',\n ':svg:clipPath^:svg:graphics|',\n ':svg:defs^:svg:graphics|',\n ':svg:desc^:svg:|',\n ':svg:discard^:svg:|',\n ':svg:ellipse^:svg:geometry|',\n ':svg:feBlend^:svg:|',\n ':svg:feColorMatrix^:svg:|',\n ':svg:feComponentTransfer^:svg:|',\n ':svg:feComposite^:svg:|',\n ':svg:feConvolveMatrix^:svg:|',\n ':svg:feDiffuseLighting^:svg:|',\n ':svg:feDisplacementMap^:svg:|',\n ':svg:feDistantLight^:svg:|',\n ':svg:feDropShadow^:svg:|',\n ':svg:feFlood^:svg:|',\n ':svg:feFuncA^:svg:componentTransferFunction|',\n ':svg:feFuncB^:svg:componentTransferFunction|',\n ':svg:feFuncG^:svg:componentTransferFunction|',\n ':svg:feFuncR^:svg:componentTransferFunction|',\n ':svg:feGaussianBlur^:svg:|',\n ':svg:feImage^:svg:|',\n ':svg:feMerge^:svg:|',\n ':svg:feMergeNode^:svg:|',\n ':svg:feMorphology^:svg:|',\n ':svg:feOffset^:svg:|',\n ':svg:fePointLight^:svg:|',\n ':svg:feSpecularLighting^:svg:|',\n ':svg:feSpotLight^:svg:|',\n ':svg:feTile^:svg:|',\n ':svg:feTurbulence^:svg:|',\n ':svg:filter^:svg:|',\n ':svg:foreignObject^:svg:graphics|',\n ':svg:g^:svg:graphics|',\n ':svg:image^:svg:graphics|',\n ':svg:line^:svg:geometry|',\n ':svg:linearGradient^:svg:gradient|',\n ':svg:mpath^:svg:|',\n ':svg:marker^:svg:|',\n ':svg:mask^:svg:|',\n ':svg:metadata^:svg:|',\n ':svg:path^:svg:geometry|',\n ':svg:pattern^:svg:|',\n ':svg:polygon^:svg:geometry|',\n ':svg:polyline^:svg:geometry|',\n ':svg:radialGradient^:svg:gradient|',\n ':svg:rect^:svg:geometry|',\n ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',\n ':svg:script^:svg:|type',\n ':svg:set^:svg:animation|',\n ':svg:stop^:svg:|',\n ':svg:style^:svg:|!disabled,media,title,type',\n ':svg:switch^:svg:graphics|',\n ':svg:symbol^:svg:|',\n ':svg:tspan^:svg:textPositioning|',\n ':svg:text^:svg:textPositioning|',\n ':svg:textPath^:svg:textContent|',\n ':svg:title^:svg:|',\n ':svg:use^:svg:graphics|',\n ':svg:view^:svg:|#zoomAndPan',\n 'data^[HTMLElement]|value',\n 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',\n 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',\n 'summary^[HTMLElement]|',\n 'time^[HTMLElement]|dateTime',\n ':svg:cursor^:svg:|',\n];\nvar /** @type {?} */ _ATTR_TO_PROP = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\nvar DomElementSchemaRegistry = /** @class */ (function (_super) {\n tslib_1.__extends(DomElementSchemaRegistry, _super);\n function DomElementSchemaRegistry() {\n var _this = _super.call(this) || this;\n _this._schema = {};\n SCHEMA.forEach(function (encodedType) {\n var /** @type {?} */ type = {};\n var _a = encodedType.split('|'), strType = _a[0], strProperties = _a[1];\n var /** @type {?} */ properties = strProperties.split(',');\n var _b = strType.split('^'), typeNames = _b[0], superName = _b[1];\n typeNames.split(',').forEach(function (tag) { return _this._schema[tag.toLowerCase()] = type; });\n var /** @type {?} */ superType = superName && _this._schema[superName.toLowerCase()];\n if (superType) {\n Object.keys(superType).forEach(function (prop) { type[prop] = superType[prop]; });\n }\n properties.forEach(function (property) {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n // We don't yet support events.\n // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events\n // will\n // almost certainly introduce bad XSS vulnerabilities.\n // type[property.substring(1)] = EVENT;\n break;\n case '!':\n type[property.substring(1)] = BOOLEAN;\n break;\n case '#':\n type[property.substring(1)] = NUMBER;\n break;\n case '%':\n type[property.substring(1)] = OBJECT;\n break;\n default:\n type[property] = STRING;\n }\n }\n });\n });\n return _this;\n }\n /**\n * @param {?} tagName\n * @param {?} propName\n * @param {?} schemaMetas\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.hasProperty = /**\n * @param {?} tagName\n * @param {?} propName\n * @param {?} schemaMetas\n * @return {?}\n */\n function (tagName, propName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return false;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Can't tell now as we don't know which properties a custom element will get\n // once it is instantiated\n return true;\n }\n }\n var /** @type {?} */ elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n return !!elementProperties[propName];\n };\n /**\n * @param {?} tagName\n * @param {?} schemaMetas\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.hasElement = /**\n * @param {?} tagName\n * @param {?} schemaMetas\n * @return {?}\n */\n function (tagName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return true;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Allow any custom elements\n return true;\n }\n }\n return !!this._schema[tagName.toLowerCase()];\n };\n /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is white list based. All attributes in the schema above are assumed to have the\n * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known\n * attack vectors are assigned their appropriate context.\n */\n /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is white list based. All attributes in the schema above are assumed to have the\n * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known\n * attack vectors are assigned their appropriate context.\n * @param {?} tagName\n * @param {?} propName\n * @param {?} isAttribute\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.securityContext = /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is white list based. All attributes in the schema above are assumed to have the\n * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known\n * attack vectors are assigned their appropriate context.\n * @param {?} tagName\n * @param {?} propName\n * @param {?} isAttribute\n * @return {?}\n */\n function (tagName, propName, isAttribute) {\n if (isAttribute) {\n // NB: For security purposes, use the mapped property name, not the attribute name.\n propName = this.getMappedPropName(propName);\n }\n // Make sure comparisons are case insensitive, so that case differences between attribute and\n // property names do not have a security impact.\n tagName = tagName.toLowerCase();\n propName = propName.toLowerCase();\n var /** @type {?} */ ctx = SECURITY_SCHEMA[tagName + '|' + propName];\n if (ctx) {\n return ctx;\n }\n ctx = SECURITY_SCHEMA['*|' + propName];\n return ctx ? ctx : SecurityContext.NONE;\n };\n /**\n * @param {?} propName\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.getMappedPropName = /**\n * @param {?} propName\n * @return {?}\n */\n function (propName) { return _ATTR_TO_PROP[propName] || propName; };\n /**\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.getDefaultComponentElementName = /**\n * @return {?}\n */\n function () { return 'ng-component'; };\n /**\n * @param {?} name\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.validateProperty = /**\n * @param {?} name\n * @return {?}\n */\n function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var /** @type {?} */ 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 return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n /**\n * @param {?} name\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.validateAttribute = /**\n * @param {?} name\n * @return {?}\n */\n function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var /** @type {?} */ msg = \"Binding to event attribute '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\");\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n /**\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.allKnownElementNames = /**\n * @return {?}\n */\n function () { return Object.keys(this._schema); };\n /**\n * @param {?} propName\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = /**\n * @param {?} propName\n * @return {?}\n */\n function (propName) {\n return dashCaseToCamelCase(propName);\n };\n /**\n * @param {?} camelCaseProp\n * @param {?} userProvidedProp\n * @param {?} val\n * @return {?}\n */\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue = /**\n * @param {?} camelCaseProp\n * @param {?} userProvidedProp\n * @param {?} val\n * @return {?}\n */\n function (camelCaseProp, userProvidedProp, val) {\n var /** @type {?} */ unit = '';\n var /** @type {?} */ strVal = val.toString().trim();\n var /** @type {?} */ errorMsg = /** @type {?} */ ((null));\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n }\n else {\n var /** @type {?} */ valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errorMsg = \"Please provide a CSS unit value for \" + userProvidedProp + \":\" + val;\n }\n }\n }\n return { error: errorMsg, value: strVal + unit };\n };\n return DomElementSchemaRegistry;\n}(ElementSchemaRegistry));\nexport { DomElementSchemaRegistry };\nfunction DomElementSchemaRegistry_tsickle_Closure_declarations() {\n /** @type {?} */\n DomElementSchemaRegistry.prototype._schema;\n}\n/**\n * @param {?} prop\n * @return {?}\n */\nfunction _isPixelDimensionStyle(prop) {\n switch (prop) {\n case 'width':\n case 'height':\n case 'minWidth':\n case 'minHeight':\n case 'maxWidth':\n case 'maxHeight':\n case 'left':\n case 'top':\n case 'bottom':\n case 'right':\n case 'fontSize':\n case 'outlineWidth':\n case 'outlineOffset':\n case 'paddingTop':\n case 'paddingLeft':\n case 'paddingBottom':\n case 'paddingRight':\n case 'marginTop':\n case 'marginLeft':\n case 'marginBottom':\n case 'marginRight':\n case 'borderRadius':\n case 'borderWidth':\n case 'borderTopWidth':\n case 'borderLeftWidth':\n case 'borderRightWidth':\n case 'borderBottomWidth':\n case 'textIndent':\n return true;\n default:\n return false;\n }\n}\n//# sourceMappingURL=dom_element_schema_registry.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n The intention here is to support only the styling features which can be\n relatively simply implemented. The goal is to allow users to avoid the\n most obvious pitfalls and do so without compromising performance significantly.\n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are\n reformatted and prefixed with a given scope name and promoted to a\n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n\n :host {\n background: red;\n }\n }\n\n becomes:\n\n .foo {\n background: red;\n }\n\n * encapsulation: Styles defined within ShadowDOM, apply only to\n dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n this feature.\n\n By default, rules are prefixed with the host element tag name\n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n\n becomes:\n\n\n Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element\n in the element's ShadowDOM template is also given the scope attribute.\n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that\n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n\n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n\n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an\n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n\n \n \n\n could become:\n\n \n

\n \n
\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nvar /**\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n The intention here is to support only the styling features which can be\n relatively simply implemented. The goal is to allow users to avoid the\n most obvious pitfalls and do so without compromising performance significantly.\n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are\n reformatted and prefixed with a given scope name and promoted to a\n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n\n :host {\n background: red;\n }\n }\n\n becomes:\n\n .foo {\n background: red;\n }\n\n * encapsulation: Styles defined within ShadowDOM, apply only to\n dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n this feature.\n\n By default, rules are prefixed with the host element tag name\n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n\n becomes:\n\n\n Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element\n in the element's ShadowDOM template is also given the scope attribute.\n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that\n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n\n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n\n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an\n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n\n \n \n\n could become:\n\n \n
\n \n
\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nShadowCss = /** @class */ (function () {\n function ShadowCss() {\n this.strictStyling = true;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n *\n * When strictStyling is true:\n * - selector is the attribute added to all elements inside the host,\n * - hostSelector is the attribute added to the host itself.\n */\n /**\n * @param {?} cssText\n * @param {?} selector\n * @param {?=} hostSelector\n * @return {?}\n */\n ShadowCss.prototype.shimCssText = /**\n * @param {?} cssText\n * @param {?} selector\n * @param {?=} hostSelector\n * @return {?}\n */\n function (cssText, selector, hostSelector) {\n if (hostSelector === void 0) { hostSelector = ''; }\n var /** @type {?} */ commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n cssText = this._insertDirectives(cssText);\n var /** @type {?} */ scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n return [scopedCssText].concat(commentsWithHash).join('\\n');\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._insertDirectives = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._insertPolyfillDirectivesInCssText = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentNextSelectorRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[2] + '{';\n });\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._insertPolyfillRulesInCssText = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentRuleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var /** @type {?} */ rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n };\n /**\n * @param {?} cssText\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n ShadowCss.prototype._scopeCssText = /**\n * @param {?} cssText\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n function (cssText, scopeSelector, hostSelector) {\n var /** @type {?} */ unscopedRules = this._extractUnscopedRulesFromCssText(cssText);\n // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n cssText = this._insertPolyfillHostInCssText(cssText);\n cssText = this._convertColonHost(cssText);\n cssText = this._convertColonHostContext(cssText);\n cssText = this._convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._extractUnscopedRulesFromCssText = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n var /** @type {?} */ r = '';\n var /** @type {?} */ m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n var /** @type {?} */ rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._convertColonHost = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._convertColonHostContext = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);\n };\n /**\n * @param {?} cssText\n * @param {?} regExp\n * @param {?} partReplacer\n * @return {?}\n */\n ShadowCss.prototype._convertColonRule = /**\n * @param {?} cssText\n * @param {?} regExp\n * @param {?} partReplacer\n * @return {?}\n */\n function (cssText, regExp, partReplacer) {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n if (m[2]) {\n var /** @type {?} */ parts = m[2].split(',');\n var /** @type {?} */ r = [];\n for (var /** @type {?} */ i = 0; i < parts.length; i++) {\n var /** @type {?} */ p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n };\n /**\n * @param {?} host\n * @param {?} part\n * @param {?} suffix\n * @return {?}\n */\n ShadowCss.prototype._colonHostContextPartReplacer = /**\n * @param {?} host\n * @param {?} part\n * @param {?} suffix\n * @return {?}\n */\n function (host, part, suffix) {\n if (part.indexOf(_polyfillHost) > -1) {\n return this._colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n };\n /**\n * @param {?} host\n * @param {?} part\n * @param {?} suffix\n * @return {?}\n */\n ShadowCss.prototype._colonHostPartReplacer = /**\n * @param {?} host\n * @param {?} part\n * @param {?} suffix\n * @return {?}\n */\n function (host, part, suffix) {\n return host + part.replace(_polyfillHost, '') + suffix;\n };\n /**\n * @param {?} cssText\n * @return {?}\n */\n ShadowCss.prototype._convertShadowDOMSelectors = /**\n * @param {?} cssText\n * @return {?}\n */\n function (cssText) {\n return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);\n };\n /**\n * @param {?} cssText\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n ShadowCss.prototype._scopeSelectors = /**\n * @param {?} cssText\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n function (cssText, scopeSelector, hostSelector) {\n var _this = this;\n return processRules(cssText, function (rule) {\n var /** @type {?} */ selector = rule.selector;\n var /** @type {?} */ content = rule.content;\n if (rule.selector[0] != '@') {\n selector =\n _this._scopeSelector(rule.selector, scopeSelector, hostSelector, _this.strictStyling);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = _this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n }\n return new CssRule(selector, content);\n });\n };\n /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @param {?} strict\n * @return {?}\n */\n ShadowCss.prototype._scopeSelector = /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @param {?} strict\n * @return {?}\n */\n function (selector, scopeSelector, hostSelector, strict) {\n var _this = this;\n return selector.split(',')\n .map(function (part) { return part.trim().split(_shadowDeepSelectors); })\n .map(function (deepParts) {\n var shallowPart = deepParts[0], otherParts = deepParts.slice(1);\n var /** @type {?} */ applyScope = function (shallowPart) {\n if (_this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return strict ?\n _this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :\n _this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n }\n else {\n return shallowPart;\n }\n };\n return [applyScope(shallowPart)].concat(otherParts).join(' ');\n })\n .join(', ');\n };\n /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @return {?}\n */\n ShadowCss.prototype._selectorNeedsScoping = /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @return {?}\n */\n function (selector, scopeSelector) {\n var /** @type {?} */ re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n };\n /**\n * @param {?} scopeSelector\n * @return {?}\n */\n ShadowCss.prototype._makeScopeMatcher = /**\n * @param {?} scopeSelector\n * @return {?}\n */\n function (scopeSelector) {\n var /** @type {?} */ lre = /\\[/g;\n var /** @type {?} */ rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n };\n /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n ShadowCss.prototype._applySelectorScope = /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n function (selector, scopeSelector, hostSelector) {\n // Difference from webcomponents.js: scopeSelector could not be an array\n return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n };\n /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n ShadowCss.prototype._applySimpleSelectorScope = /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n function (selector, scopeSelector, hostSelector) {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n var /** @type {?} */ replaceBy_1 = this.strictStyling ? \"[\" + hostSelector + \"]\" : scopeSelector;\n return selector\n .replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {\n return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {\n return before + replaceBy_1 + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy_1 + ' ');\n }\n return scopeSelector + ' ' + selector;\n };\n /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n ShadowCss.prototype._applyStrictSelectorScope = /**\n * @param {?} selector\n * @param {?} scopeSelector\n * @param {?} hostSelector\n * @return {?}\n */\n function (selector, scopeSelector, hostSelector) {\n var _this = this;\n var /** @type {?} */ isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, function (_) {\n var parts = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n parts[_i - 1] = arguments[_i];\n }\n return parts[0];\n });\n var /** @type {?} */ attrName = '[' + scopeSelector + ']';\n var /** @type {?} */ _scopeSelectorPart = function (p) {\n var /** @type {?} */ scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = _this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n var /** @type {?} */ t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n var /** @type {?} */ matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n var /** @type {?} */ safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n var /** @type {?} */ scopedSelector = '';\n var /** @type {?} */ startIndex = 0;\n var /** @type {?} */ res;\n var /** @type {?} */ sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n var /** @type {?} */ hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n var /** @type {?} */ shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n var /** @type {?} */ separator = res[1];\n var /** @type {?} */ part_1 = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;\n var /** @type {?} */ scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;\n scopedSelector += scopedPart + \" \" + separator + \" \";\n startIndex = sep.lastIndex;\n }\n var /** @type {?} */ part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return safeContent.restore(scopedSelector);\n };\n /**\n * @param {?} selector\n * @return {?}\n */\n ShadowCss.prototype._insertPolyfillHostInCssText = /**\n * @param {?} selector\n * @return {?}\n */\n function (selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost);\n };\n return ShadowCss;\n}());\n/**\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n The intention here is to support only the styling features which can be\n relatively simply implemented. The goal is to allow users to avoid the\n most obvious pitfalls and do so without compromising performance significantly.\n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are\n reformatted and prefixed with a given scope name and promoted to a\n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n\n :host {\n background: red;\n }\n }\n\n becomes:\n\n .foo {\n background: red;\n }\n\n * encapsulation: Styles defined within ShadowDOM, apply only to\n dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n this feature.\n\n By default, rules are prefixed with the host element tag name\n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n\n becomes:\n\n\n Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element\n in the element's ShadowDOM template is also given the scope attribute.\n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that\n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n\n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n\n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an\n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n\n \n \n\n could become:\n\n \n
\n \n
\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nexport { ShadowCss };\nfunction ShadowCss_tsickle_Closure_declarations() {\n /** @type {?} */\n ShadowCss.prototype.strictStyling;\n}\nvar SafeSelector = /** @class */ (function () {\n function SafeSelector(selector) {\n var _this = this;\n this.placeholders = [];\n this.index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, function (_, keep) {\n var /** @type {?} */ replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(keep);\n _this.index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, function (_, pseudo, exp) {\n var /** @type {?} */ replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(exp);\n _this.index++;\n return pseudo + replaceBy;\n });\n }\n /**\n * @param {?} content\n * @return {?}\n */\n SafeSelector.prototype.restore = /**\n * @param {?} content\n * @return {?}\n */\n function (content) {\n var _this = this;\n return content.replace(/__ph-(\\d+)__/g, function (ph, index) { return _this.placeholders[+index]; });\n };\n /**\n * @return {?}\n */\n SafeSelector.prototype.content = /**\n * @return {?}\n */\n function () { return this._content; };\n return SafeSelector;\n}());\nfunction SafeSelector_tsickle_Closure_declarations() {\n /** @type {?} */\n SafeSelector.prototype.placeholders;\n /** @type {?} */\n SafeSelector.prototype.index;\n /** @type {?} */\n SafeSelector.prototype._content;\n}\nvar /** @type {?} */ _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nvar /** @type {?} */ _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar /** @type {?} */ _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar /** @type {?} */ _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nvar /** @type {?} */ _polyfillHostContext = '-shadowcsscontext';\nvar /** @type {?} */ _parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nvar /** @type {?} */ _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nvar /** @type {?} */ _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nvar /** @type {?} */ _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nvar /** @type {?} */ _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nvar /** @type {?} */ _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g,\n /\\/shadow-deep\\//g,\n /\\/shadow\\//g,\n];\n// The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\nvar /** @type {?} */ _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nvar /** @type {?} */ _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nvar /** @type {?} */ _polyfillHostRe = /-shadowcsshost/gim;\nvar /** @type {?} */ _colonHostRe = /:host/gim;\nvar /** @type {?} */ _colonHostContextRe = /:host-context/gim;\nvar /** @type {?} */ _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\n/**\n * @param {?} input\n * @return {?}\n */\nfunction stripComments(input) {\n return input.replace(_commentRe, '');\n}\nvar /** @type {?} */ _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\n/**\n * @param {?} input\n * @return {?}\n */\nfunction extractCommentsWithHash(input) {\n return input.match(_commentWithHashRe) || [];\n}\nvar /** @type {?} */ _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nvar /** @type {?} */ _curlyRe = /([{}])/g;\nvar /** @type {?} */ OPEN_CURLY = '{';\nvar /** @type {?} */ CLOSE_CURLY = '}';\nvar /** @type {?} */ BLOCK_PLACEHOLDER = '%BLOCK%';\nvar CssRule = /** @class */ (function () {\n function CssRule(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n return CssRule;\n}());\nexport { CssRule };\nfunction CssRule_tsickle_Closure_declarations() {\n /** @type {?} */\n CssRule.prototype.selector;\n /** @type {?} */\n CssRule.prototype.content;\n}\n/**\n * @param {?} input\n * @param {?} ruleCallback\n * @return {?}\n */\nexport function processRules(input, ruleCallback) {\n var /** @type {?} */ inputWithEscapedBlocks = escapeBlocks(input);\n var /** @type {?} */ nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var /** @type {?} */ selector = m[2];\n var /** @type {?} */ content = '';\n var /** @type {?} */ suffix = m[4];\n var /** @type {?} */ contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n var /** @type {?} */ rule = ruleCallback(new CssRule(selector, content));\n return \"\" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;\n });\n}\nvar StringWithEscapedBlocks = /** @class */ (function () {\n function StringWithEscapedBlocks(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n return StringWithEscapedBlocks;\n}());\nfunction StringWithEscapedBlocks_tsickle_Closure_declarations() {\n /** @type {?} */\n StringWithEscapedBlocks.prototype.escapedString;\n /** @type {?} */\n StringWithEscapedBlocks.prototype.blocks;\n}\n/**\n * @param {?} input\n * @return {?}\n */\nfunction escapeBlocks(input) {\n var /** @type {?} */ inputParts = input.split(_curlyRe);\n var /** @type {?} */ resultParts = [];\n var /** @type {?} */ escapedBlocks = [];\n var /** @type {?} */ bracketCount = 0;\n var /** @type {?} */ currentBlockParts = [];\n for (var /** @type {?} */ partIndex = 0; partIndex < inputParts.length; partIndex++) {\n var /** @type {?} */ part = inputParts[partIndex];\n if (part == CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part == OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n//# sourceMappingURL=shadow_css.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 { CompileStylesheetMetadata, identifierModuleUrl, identifierName } from './compile_metadata';\nimport { ViewEncapsulation } from './core';\nimport * as o from './output/output_ast';\nimport { ShadowCss } from './shadow_css';\nvar /** @type {?} */ COMPONENT_VARIABLE = '%COMP%';\nvar /** @type {?} */ HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar /** @type {?} */ CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nvar StylesCompileDependency = /** @class */ (function () {\n function StylesCompileDependency(name, moduleUrl, setValue) {\n this.name = name;\n this.moduleUrl = moduleUrl;\n this.setValue = setValue;\n }\n return StylesCompileDependency;\n}());\nexport { StylesCompileDependency };\nfunction StylesCompileDependency_tsickle_Closure_declarations() {\n /** @type {?} */\n StylesCompileDependency.prototype.name;\n /** @type {?} */\n StylesCompileDependency.prototype.moduleUrl;\n /** @type {?} */\n StylesCompileDependency.prototype.setValue;\n}\nvar CompiledStylesheet = /** @class */ (function () {\n function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {\n this.outputCtx = outputCtx;\n this.stylesVar = stylesVar;\n this.dependencies = dependencies;\n this.isShimmed = isShimmed;\n this.meta = meta;\n }\n return CompiledStylesheet;\n}());\nexport { CompiledStylesheet };\nfunction CompiledStylesheet_tsickle_Closure_declarations() {\n /** @type {?} */\n CompiledStylesheet.prototype.outputCtx;\n /** @type {?} */\n CompiledStylesheet.prototype.stylesVar;\n /** @type {?} */\n CompiledStylesheet.prototype.dependencies;\n /** @type {?} */\n CompiledStylesheet.prototype.isShimmed;\n /** @type {?} */\n CompiledStylesheet.prototype.meta;\n}\nvar StyleCompiler = /** @class */ (function () {\n function StyleCompiler(_urlResolver) {\n this._urlResolver = _urlResolver;\n this._shadowCss = new ShadowCss();\n }\n /**\n * @param {?} outputCtx\n * @param {?} comp\n * @return {?}\n */\n StyleCompiler.prototype.compileComponent = /**\n * @param {?} outputCtx\n * @param {?} comp\n * @return {?}\n */\n function (outputCtx, comp) {\n var /** @type {?} */ template = /** @type {?} */ ((comp.template));\n return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({\n styles: template.styles,\n styleUrls: template.styleUrls,\n moduleUrl: identifierModuleUrl(comp.type)\n }), this.needsStyleShim(comp), true);\n };\n /**\n * @param {?} outputCtx\n * @param {?} comp\n * @param {?} stylesheet\n * @param {?=} shim\n * @return {?}\n */\n StyleCompiler.prototype.compileStyles = /**\n * @param {?} outputCtx\n * @param {?} comp\n * @param {?} stylesheet\n * @param {?=} shim\n * @return {?}\n */\n function (outputCtx, comp, stylesheet, shim) {\n if (shim === void 0) { shim = this.needsStyleShim(comp); }\n return this._compileStyles(outputCtx, comp, stylesheet, shim, false);\n };\n /**\n * @param {?} comp\n * @return {?}\n */\n StyleCompiler.prototype.needsStyleShim = /**\n * @param {?} comp\n * @return {?}\n */\n function (comp) {\n return /** @type {?} */ ((comp.template)).encapsulation === ViewEncapsulation.Emulated;\n };\n /**\n * @param {?} outputCtx\n * @param {?} comp\n * @param {?} stylesheet\n * @param {?} shim\n * @param {?} isComponentStylesheet\n * @return {?}\n */\n StyleCompiler.prototype._compileStyles = /**\n * @param {?} outputCtx\n * @param {?} comp\n * @param {?} stylesheet\n * @param {?} shim\n * @param {?} isComponentStylesheet\n * @return {?}\n */\n function (outputCtx, comp, stylesheet, shim, isComponentStylesheet) {\n var _this = this;\n var /** @type {?} */ styleExpressions = stylesheet.styles.map(function (plainStyle) { return o.literal(_this._shimIfNeeded(plainStyle, shim)); });\n var /** @type {?} */ dependencies = [];\n stylesheet.styleUrls.forEach(function (styleUrl) {\n var /** @type {?} */ exprIndex = styleExpressions.length;\n // Note: This placeholder will be filled later.\n styleExpressions.push(/** @type {?} */ ((null)));\n dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) { return styleExpressions[exprIndex] = outputCtx.importExpr(value); }));\n });\n // styles variable contains plain strings and arrays of other styles arrays (recursive),\n // so we set its type to dynamic.\n var /** @type {?} */ stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);\n var /** @type {?} */ stmt = o.variable(stylesVar)\n .set(o.literalArr(styleExpressions, new o.ArrayType(o.DYNAMIC_TYPE, [o.TypeModifier.Const])))\n .toDeclStmt(null, isComponentStylesheet ? [o.StmtModifier.Final] : [\n o.StmtModifier.Final, o.StmtModifier.Exported\n ]);\n outputCtx.statements.push(stmt);\n return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);\n };\n /**\n * @param {?} style\n * @param {?} shim\n * @return {?}\n */\n StyleCompiler.prototype._shimIfNeeded = /**\n * @param {?} style\n * @param {?} shim\n * @return {?}\n */\n function (style, shim) {\n return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;\n };\n return StyleCompiler;\n}());\nexport { StyleCompiler };\nfunction StyleCompiler_tsickle_Closure_declarations() {\n /** @type {?} */\n StyleCompiler.prototype._shadowCss;\n /** @type {?} */\n StyleCompiler.prototype._urlResolver;\n}\n/**\n * @param {?} component\n * @return {?}\n */\nfunction getStylesVarName(component) {\n var /** @type {?} */ result = \"styles\";\n if (component) {\n result += \"_\" + identifierName(component.type);\n }\n return result;\n}\n//# sourceMappingURL=style_compiler.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as html from './ast';\nimport { ParseTreeResult } from './parser';\nimport { NGSP_UNICODE } from './tags';\nexport var /** @type {?} */ PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nvar /** @type {?} */ SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);\n// Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nvar /** @type {?} */ WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nvar /** @type {?} */ NO_WS_REGEXP = new RegExp(\"[^\" + WS_CHARS + \"]\");\nvar /** @type {?} */ WS_REPLACE_REGEXP = new RegExp(\"[\" + WS_CHARS + \"]{2,}\", 'g');\n/**\n * @param {?} attrs\n * @return {?}\n */\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some(function (attr) { return attr.name === PRESERVE_WS_ATTR_NAME; });\n}\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here.\n * @param {?} value\n * @return {?}\n */\nexport function replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nvar /**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nWhitespaceVisitor = /** @class */ (function () {\n function WhitespaceVisitor() {\n }\n /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitElement = /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n function (element, context) {\n if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n // don't descent into elements where we need to preserve whitespaces\n // but still visit all attributes to eliminate one used as a market to preserve WS\n return new html.Element(element.name, html.visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n return new html.Element(element.name, element.attrs, html.visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) {\n var /** @type {?} */ isNotBlank = text.value.match(NO_WS_REGEXP);\n if (isNotBlank) {\n return new html.Text(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan);\n }\n return null;\n };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { return comment; };\n /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitExpansion = /**\n * @param {?} expansion\n * @param {?} context\n * @return {?}\n */\n function (expansion, context) { return expansion; };\n /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n WhitespaceVisitor.prototype.visitExpansionCase = /**\n * @param {?} expansionCase\n * @param {?} context\n * @return {?}\n */\n function (expansionCase, context) { return expansionCase; };\n return WhitespaceVisitor;\n}());\n/**\n * @param {?} htmlAstWithErrors\n * @return {?}\n */\nexport function removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(html.visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\n//# sourceMappingURL=html_whitespaces.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { ParseError } from '../parse_util';\nimport * as html from './ast';\n// http://cldr.unicode.org/index/cldr-spec/plural-rules\nvar /** @type {?} */ PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];\n/**\n * Expands special forms into elements.\n *\n * For example,\n *\n * ```\n * { messages.length, plural,\n * =0 {zero}\n * =1 {one}\n * other {more than one}\n * }\n * ```\n *\n * will be expanded into\n *\n * ```\n * \n * zero\n * one\n * more than one\n * \n * ```\n * @param {?} nodes\n * @return {?}\n */\nexport function expandNodes(nodes) {\n var /** @type {?} */ expander = new _Expander();\n return new ExpansionResult(html.visitAll(expander, nodes), expander.isExpanded, expander.errors);\n}\nvar ExpansionResult = /** @class */ (function () {\n function ExpansionResult(nodes, expanded, errors) {\n this.nodes = nodes;\n this.expanded = expanded;\n this.errors = errors;\n }\n return ExpansionResult;\n}());\nexport { ExpansionResult };\nfunction ExpansionResult_tsickle_Closure_declarations() {\n /** @type {?} */\n ExpansionResult.prototype.nodes;\n /** @type {?} */\n ExpansionResult.prototype.expanded;\n /** @type {?} */\n ExpansionResult.prototype.errors;\n}\nvar ExpansionError = /** @class */ (function (_super) {\n tslib_1.__extends(ExpansionError, _super);\n function ExpansionError(span, errorMsg) {\n return _super.call(this, span, errorMsg) || this;\n }\n return ExpansionError;\n}(ParseError));\nexport { ExpansionError };\n/**\n * Expand expansion forms (plural, select) to directives\n *\n * \\@internal\n */\nvar /**\n * Expand expansion forms (plural, select) to directives\n *\n * \\@internal\n */\n_Expander = /** @class */ (function () {\n function _Expander() {\n this.isExpanded = false;\n this.errors = [];\n }\n /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitElement = /**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n function (element, context) {\n return new html.Element(element.name, element.attrs, html.visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n };\n /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitAttribute = /**\n * @param {?} attribute\n * @param {?} context\n * @return {?}\n */\n function (attribute, context) { return attribute; };\n /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitText = /**\n * @param {?} text\n * @param {?} context\n * @return {?}\n */\n function (text, context) { return text; };\n /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitComment = /**\n * @param {?} comment\n * @param {?} context\n * @return {?}\n */\n function (comment, context) { return comment; };\n /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitExpansion = /**\n * @param {?} icu\n * @param {?} context\n * @return {?}\n */\n function (icu, context) {\n this.isExpanded = true;\n return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) :\n _expandDefaultForm(icu, this.errors);\n };\n /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n _Expander.prototype.visitExpansionCase = /**\n * @param {?} icuCase\n * @param {?} context\n * @return {?}\n */\n function (icuCase, context) {\n throw new Error('Should not be reached');\n };\n return _Expander;\n}());\nfunction _Expander_tsickle_Closure_declarations() {\n /** @type {?} */\n _Expander.prototype.isExpanded;\n /** @type {?} */\n _Expander.prototype.errors;\n}\n/**\n * @param {?} ast\n * @param {?} errors\n * @return {?}\n */\nfunction _expandPluralForm(ast, errors) {\n var /** @type {?} */ children = ast.cases.map(function (c) {\n if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\\d+$/)) {\n errors.push(new ExpansionError(c.valueSourceSpan, \"Plural cases should be \\\"=\\\" or one of \" + PLURAL_CASES.join(\", \")));\n }\n var /** @type {?} */ expansionResult = expandNodes(c.expression);\n errors.push.apply(errors, expansionResult.errors);\n return new html.Element(\"ng-template\", [new html.Attribute('ngPluralCase', \"\" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n });\n var /** @type {?} */ switchAttr = new html.Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);\n return new html.Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n/**\n * @param {?} ast\n * @param {?} errors\n * @return {?}\n */\nfunction _expandDefaultForm(ast, errors) {\n var /** @type {?} */ children = ast.cases.map(function (c) {\n var /** @type {?} */ expansionResult = expandNodes(c.expression);\n errors.push.apply(errors, expansionResult.errors);\n if (c.value === 'other') {\n // other is the default case when no values match\n return new html.Element(\"ng-template\", [new html.Attribute('ngSwitchDefault', '', c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n }\n return new html.Element(\"ng-template\", [new html.Attribute('ngSwitchCase', \"\" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n });\n var /** @type {?} */ switchAttr = new html.Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);\n return new html.Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n//# sourceMappingURL=icu_ast_expander.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { SecurityContext } from '../core';\nimport { EmptyExpr, RecursiveAstVisitor } from '../expression_parser/ast';\nimport { mergeNsAndName } from '../ml_parser/tags';\nimport { ParseError, ParseErrorLevel, ParseSourceSpan } from '../parse_util';\nimport { CssSelector } from '../selector';\nimport { splitAtColon, splitAtPeriod } from '../util';\nimport { BoundElementPropertyAst, BoundEventAst, PropertyBindingType, VariableAst } from './template_ast';\nvar /** @type {?} */ PROPERTY_PARTS_SEPARATOR = '.';\nvar /** @type {?} */ ATTRIBUTE_PREFIX = 'attr';\nvar /** @type {?} */ CLASS_PREFIX = 'class';\nvar /** @type {?} */ STYLE_PREFIX = 'style';\nvar /** @type {?} */ ANIMATE_PROP_PREFIX = 'animate-';\n/** @enum {number} */\nvar BoundPropertyType = {\n DEFAULT: 0,\n LITERAL_ATTR: 1,\n ANIMATION: 2,\n};\nexport { BoundPropertyType };\nBoundPropertyType[BoundPropertyType.DEFAULT] = \"DEFAULT\";\nBoundPropertyType[BoundPropertyType.LITERAL_ATTR] = \"LITERAL_ATTR\";\nBoundPropertyType[BoundPropertyType.ANIMATION] = \"ANIMATION\";\n/**\n * Represents a parsed property.\n */\nvar /**\n * Represents a parsed property.\n */\nBoundProperty = /** @class */ (function () {\n function BoundProperty(name, expression, type, sourceSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.isLiteral = this.type === BoundPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === BoundPropertyType.ANIMATION;\n }\n return BoundProperty;\n}());\n/**\n * Represents a parsed property.\n */\nexport { BoundProperty };\nfunction BoundProperty_tsickle_Closure_declarations() {\n /** @type {?} */\n BoundProperty.prototype.isLiteral;\n /** @type {?} */\n BoundProperty.prototype.isAnimation;\n /** @type {?} */\n BoundProperty.prototype.name;\n /** @type {?} */\n BoundProperty.prototype.expression;\n /** @type {?} */\n BoundProperty.prototype.type;\n /** @type {?} */\n BoundProperty.prototype.sourceSpan;\n}\n/**\n * Parses bindings in templates and in the directive host area.\n */\nvar /**\n * Parses bindings in templates and in the directive host area.\n */\nBindingParser = /** @class */ (function () {\n function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, _targetErrors) {\n var _this = this;\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this._targetErrors = _targetErrors;\n this.pipesByName = new Map();\n this._usedPipes = new Map();\n pipes.forEach(function (pipe) { return _this.pipesByName.set(pipe.name, pipe); });\n }\n /**\n * @return {?}\n */\n BindingParser.prototype.getUsedPipes = /**\n * @return {?}\n */\n function () { return Array.from(this._usedPipes.values()); };\n /**\n * @param {?} dirMeta\n * @param {?} elementSelector\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype.createDirectiveHostPropertyAsts = /**\n * @param {?} dirMeta\n * @param {?} elementSelector\n * @param {?} sourceSpan\n * @return {?}\n */\n function (dirMeta, elementSelector, sourceSpan) {\n var _this = this;\n if (dirMeta.hostProperties) {\n var /** @type {?} */ boundProps_1 = [];\n Object.keys(dirMeta.hostProperties).forEach(function (propName) {\n var /** @type {?} */ expression = dirMeta.hostProperties[propName];\n if (typeof expression === 'string') {\n _this.parsePropertyBinding(propName, expression, true, sourceSpan, [], boundProps_1);\n }\n else {\n _this._reportError(\"Value of the host property binding \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return boundProps_1.map(function (prop) { return _this.createElementPropertyAst(elementSelector, prop); });\n }\n return null;\n };\n /**\n * @param {?} dirMeta\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype.createDirectiveHostEventAsts = /**\n * @param {?} dirMeta\n * @param {?} sourceSpan\n * @return {?}\n */\n function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostListeners) {\n var /** @type {?} */ targetEventAsts_1 = [];\n Object.keys(dirMeta.hostListeners).forEach(function (propName) {\n var /** @type {?} */ expression = dirMeta.hostListeners[propName];\n if (typeof expression === 'string') {\n _this.parseEvent(propName, expression, sourceSpan, [], targetEventAsts_1);\n }\n else {\n _this._reportError(\"Value of the host listener \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return targetEventAsts_1;\n }\n return null;\n };\n /**\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype.parseInterpolation = /**\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n function (value, sourceSpan) {\n var /** @type {?} */ sourceInfo = sourceSpan.start.toString();\n try {\n var /** @type {?} */ ast = /** @type {?} */ ((this._exprParser.parseInterpolation(value, sourceInfo, this._interpolationConfig)));\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (/** @type {?} */ e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n /**\n * @param {?} prefixToken\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @param {?} targetVars\n * @return {?}\n */\n BindingParser.prototype.parseInlineTemplateBinding = /**\n * @param {?} prefixToken\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @param {?} targetVars\n * @return {?}\n */\n function (prefixToken, value, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n var /** @type {?} */ bindings = this._parseTemplateBindings(prefixToken, value, sourceSpan);\n for (var /** @type {?} */ i = 0; i < bindings.length; i++) {\n var /** @type {?} */ binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new VariableAst(binding.key, binding.name, sourceSpan));\n }\n else if (binding.expression) {\n this._parsePropertyAst(binding.key, binding.expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([binding.key, '']);\n this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);\n }\n }\n };\n /**\n * @param {?} prefixToken\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype._parseTemplateBindings = /**\n * @param {?} prefixToken\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n function (prefixToken, value, sourceSpan) {\n var _this = this;\n var /** @type {?} */ sourceInfo = sourceSpan.start.toString();\n try {\n var /** @type {?} */ bindingsResult = this._exprParser.parseTemplateBindings(prefixToken, value, sourceInfo);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.templateBindings.forEach(function (binding) {\n if (binding.expression) {\n _this._checkPipes(binding.expression, sourceSpan);\n }\n });\n bindingsResult.warnings.forEach(function (warning) { _this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });\n return bindingsResult.templateBindings;\n }\n catch (/** @type {?} */ e) {\n this._reportError(\"\" + e, sourceSpan);\n return [];\n }\n };\n /**\n * @param {?} name\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n BindingParser.prototype.parseLiteralAttr = /**\n * @param {?} name\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n if (_isAnimationLabel(name)) {\n name = name.substring(1);\n if (value) {\n this._reportError(\"Assigning animation triggers via @prop=\\\"exp\\\" attributes with an expression is invalid.\" +\n \" Use property bindings (e.g. [@prop]=\\\"exp\\\") or use an attribute without a value (e.g. @prop) instead.\", sourceSpan, ParseErrorLevel.ERROR);\n }\n this._parseAnimation(name, value, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetProps.push(new BoundProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), BoundPropertyType.LITERAL_ATTR, sourceSpan));\n }\n };\n /**\n * @param {?} name\n * @param {?} expression\n * @param {?} isHost\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n BindingParser.prototype.parsePropertyBinding = /**\n * @param {?} name\n * @param {?} expression\n * @param {?} isHost\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n function (name, expression, isHost, sourceSpan, targetMatchableAttrs, targetProps) {\n var /** @type {?} */ isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n }\n else if (_isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n this._parsePropertyAst(name, this._parseBinding(expression, isHost, sourceSpan), sourceSpan, targetMatchableAttrs, targetProps);\n }\n };\n /**\n * @param {?} name\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n BindingParser.prototype.parsePropertyInterpolation = /**\n * @param {?} name\n * @param {?} value\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n var /** @type {?} */ expr = this.parseInterpolation(value, sourceSpan);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n };\n /**\n * @param {?} name\n * @param {?} ast\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n BindingParser.prototype._parsePropertyAst = /**\n * @param {?} name\n * @param {?} ast\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n function (name, ast, sourceSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, /** @type {?} */ ((ast.source))]);\n targetProps.push(new BoundProperty(name, ast, BoundPropertyType.DEFAULT, sourceSpan));\n };\n /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n BindingParser.prototype._parseAnimation = /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetProps\n * @return {?}\n */\n function (name, expression, sourceSpan, targetMatchableAttrs, targetProps) {\n // This will occur when a @trigger is not paired with an expression.\n // For animations it is valid to not have an expression since */void\n // states will be applied by angular when the element is attached/detached\n var /** @type {?} */ ast = this._parseBinding(expression || 'undefined', false, sourceSpan);\n targetMatchableAttrs.push([name, /** @type {?} */ ((ast.source))]);\n targetProps.push(new BoundProperty(name, ast, BoundPropertyType.ANIMATION, sourceSpan));\n };\n /**\n * @param {?} value\n * @param {?} isHostBinding\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype._parseBinding = /**\n * @param {?} value\n * @param {?} isHostBinding\n * @param {?} sourceSpan\n * @return {?}\n */\n function (value, isHostBinding, sourceSpan) {\n var /** @type {?} */ sourceInfo = sourceSpan.start.toString();\n try {\n var /** @type {?} */ ast = isHostBinding ?\n this._exprParser.parseSimpleBinding(value, sourceInfo, this._interpolationConfig) :\n this._exprParser.parseBinding(value, sourceInfo, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (/** @type {?} */ e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n /**\n * @param {?} elementSelector\n * @param {?} boundProp\n * @return {?}\n */\n BindingParser.prototype.createElementPropertyAst = /**\n * @param {?} elementSelector\n * @param {?} boundProp\n * @return {?}\n */\n function (elementSelector, boundProp) {\n if (boundProp.isAnimation) {\n return new BoundElementPropertyAst(boundProp.name, PropertyBindingType.Animation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan);\n }\n var /** @type {?} */ unit = null;\n var /** @type {?} */ bindingType = /** @type {?} */ ((undefined));\n var /** @type {?} */ boundPropertyName = null;\n var /** @type {?} */ parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n var /** @type {?} */ securityContexts = /** @type {?} */ ((undefined));\n // Check check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts[1];\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n var /** @type {?} */ nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n var /** @type {?} */ ns = boundPropertyName.substring(0, nsSeparatorIdx);\n var /** @type {?} */ name_1 = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name_1);\n }\n bindingType = PropertyBindingType.Attribute;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = PropertyBindingType.Class;\n securityContexts = [SecurityContext.NONE];\n }\n else if (parts[0] == STYLE_PREFIX) {\n unit = parts.length > 2 ? parts[2] : null;\n boundPropertyName = parts[1];\n bindingType = PropertyBindingType.Style;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n boundPropertyName = this._schemaRegistry.getMappedPropName(boundProp.name);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, false);\n bindingType = PropertyBindingType.Property;\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);\n }\n return new BoundElementPropertyAst(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan);\n };\n /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetEvents\n * @return {?}\n */\n BindingParser.prototype.parseEvent = /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetEvents\n * @return {?}\n */\n function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n if (_isAnimationLabel(name)) {\n name = name.substr(1);\n this._parseAnimationEvent(name, expression, sourceSpan, targetEvents);\n }\n else {\n this._parseEvent(name, expression, sourceSpan, targetMatchableAttrs, targetEvents);\n }\n };\n /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetEvents\n * @return {?}\n */\n BindingParser.prototype._parseAnimationEvent = /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetEvents\n * @return {?}\n */\n function (name, expression, sourceSpan, targetEvents) {\n var /** @type {?} */ matches = splitAtPeriod(name, [name, '']);\n var /** @type {?} */ eventName = matches[0];\n var /** @type {?} */ phase = matches[1].toLowerCase();\n if (phase) {\n switch (phase) {\n case 'start':\n case 'done':\n var /** @type {?} */ ast = this._parseAction(expression, sourceSpan);\n targetEvents.push(new BoundEventAst(eventName, null, phase, ast, sourceSpan));\n break;\n default:\n this._reportError(\"The provided animation output phase value \\\"\" + phase + \"\\\" for \\\"@\" + eventName + \"\\\" is not supported (use start or done)\", sourceSpan);\n break;\n }\n }\n else {\n this._reportError(\"The animation trigger output event (@\" + eventName + \") is missing its phase value name (start or done are currently supported)\", sourceSpan);\n }\n };\n /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetEvents\n * @return {?}\n */\n BindingParser.prototype._parseEvent = /**\n * @param {?} name\n * @param {?} expression\n * @param {?} sourceSpan\n * @param {?} targetMatchableAttrs\n * @param {?} targetEvents\n * @return {?}\n */\n function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n // long format: 'target: eventName'\n var _a = splitAtColon(name, [/** @type {?} */ ((null)), name]), target = _a[0], eventName = _a[1];\n var /** @type {?} */ ast = this._parseAction(expression, sourceSpan);\n targetMatchableAttrs.push([/** @type {?} */ ((name)), /** @type {?} */ ((ast.source))]);\n targetEvents.push(new BoundEventAst(eventName, target, null, ast, sourceSpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n };\n /**\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype._parseAction = /**\n * @param {?} value\n * @param {?} sourceSpan\n * @return {?}\n */\n function (value, sourceSpan) {\n var /** @type {?} */ sourceInfo = sourceSpan.start.toString();\n try {\n var /** @type {?} */ ast = this._exprParser.parseAction(value, sourceInfo, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr) {\n this._reportError(\"Empty expressions are not allowed\", sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (/** @type {?} */ e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n /**\n * @param {?} message\n * @param {?} sourceSpan\n * @param {?=} level\n * @return {?}\n */\n BindingParser.prototype._reportError = /**\n * @param {?} message\n * @param {?} sourceSpan\n * @param {?=} level\n * @return {?}\n */\n function (message, sourceSpan, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this._targetErrors.push(new ParseError(sourceSpan, message, level));\n };\n /**\n * @param {?} errors\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype._reportExpressionParserErrors = /**\n * @param {?} errors\n * @param {?} sourceSpan\n * @return {?}\n */\n function (errors, sourceSpan) {\n for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) {\n var error = errors_1[_i];\n this._reportError(error.message, sourceSpan);\n }\n };\n /**\n * @param {?} ast\n * @param {?} sourceSpan\n * @return {?}\n */\n BindingParser.prototype._checkPipes = /**\n * @param {?} ast\n * @param {?} sourceSpan\n * @return {?}\n */\n function (ast, sourceSpan) {\n var _this = this;\n if (ast) {\n var /** @type {?} */ collector = new PipeCollector();\n ast.visit(collector);\n collector.pipes.forEach(function (ast, pipeName) {\n var /** @type {?} */ pipeMeta = _this.pipesByName.get(pipeName);\n if (!pipeMeta) {\n _this._reportError(\"The pipe '\" + pipeName + \"' could not be found\", new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));\n }\n else {\n _this._usedPipes.set(pipeName, pipeMeta);\n }\n });\n }\n };\n /**\n * @param {?} propName the name of the property / attribute\n * @param {?} sourceSpan\n * @param {?} isAttr true when binding to an attribute\n * @return {?}\n */\n BindingParser.prototype._validatePropertyOrAttributeName = /**\n * @param {?} propName the name of the property / attribute\n * @param {?} sourceSpan\n * @param {?} isAttr true when binding to an attribute\n * @return {?}\n */\n function (propName, sourceSpan, isAttr) {\n var /** @type {?} */ report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(/** @type {?} */ ((report.msg)), sourceSpan, ParseErrorLevel.ERROR);\n }\n };\n return BindingParser;\n}());\n/**\n * Parses bindings in templates and in the directive host area.\n */\nexport { BindingParser };\nfunction BindingParser_tsickle_Closure_declarations() {\n /** @type {?} */\n BindingParser.prototype.pipesByName;\n /** @type {?} */\n BindingParser.prototype._usedPipes;\n /** @type {?} */\n BindingParser.prototype._exprParser;\n /** @type {?} */\n BindingParser.prototype._interpolationConfig;\n /** @type {?} */\n BindingParser.prototype._schemaRegistry;\n /** @type {?} */\n BindingParser.prototype._targetErrors;\n}\nvar PipeCollector = /** @class */ (function (_super) {\n tslib_1.__extends(PipeCollector, _super);\n function PipeCollector() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.pipes = new Map();\n return _this;\n }\n /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n PipeCollector.prototype.visitPipe = /**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\n function (ast, context) {\n this.pipes.set(ast.name, ast);\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n return PipeCollector;\n}(RecursiveAstVisitor));\nexport { PipeCollector };\nfunction PipeCollector_tsickle_Closure_declarations() {\n /** @type {?} */\n PipeCollector.prototype.pipes;\n}\n/**\n * @param {?} name\n * @return {?}\n */\nfunction _isAnimationLabel(name) {\n return name[0] == '@';\n}\n/**\n * @param {?} registry\n * @param {?} selector\n * @param {?} propName\n * @param {?} isAttribute\n * @return {?}\n */\nexport function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n var /** @type {?} */ ctxs = [];\n CssSelector.parse(selector).forEach(function (selector) {\n var /** @type {?} */ elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n var /** @type {?} */ notElementNames = new Set(selector.notSelectors.filter(function (selector) { return selector.isElementSelector(); })\n .map(function (selector) { return selector.element; }));\n var /** @type {?} */ possibleElementNames = elementNames.filter(function (elementName) { return !notElementNames.has(elementName); });\n ctxs.push.apply(ctxs, possibleElementNames.map(function (elementName) { return registry.securityContext(elementName, propName, isAttribute); }));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n//# sourceMappingURL=binding_parser.js.map","/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * as tslib_1 from \"tslib\";\nimport { identifierName } from '../compile_metadata';\nimport { ASTWithSource, EmptyExpr } from '../expression_parser/ast';\nimport { Identifiers, createTokenForExternalReference, createTokenForReference } from '../identifiers';\nimport * as html from '../ml_parser/ast';\nimport { ParseTreeResult } from '../ml_parser/html_parser';\nimport { removeWhitespaces, replaceNgsp } from '../ml_parser/html_whitespaces';\nimport { expandNodes } from '../ml_parser/icu_ast_expander';\nimport { InterpolationConfig } from '../ml_parser/interpolation_config';\nimport { isNgTemplate, splitNsName } from '../ml_parser/tags';\nimport { ParseError, ParseErrorLevel, ParseSourceSpan } from '../parse_util';\nimport { ProviderElementContext, ProviderViewContext } from '../provider_analyzer';\nimport { CssSelector, SelectorMatcher } from '../selector';\nimport { isStyleUrlResolvable } from '../style_url_resolver';\nimport { syntaxError } from '../util';\nimport { BindingParser } from './binding_parser';\nimport { AttrAst, BoundDirectivePropertyAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ReferenceAst, TextAst, VariableAst, templateVisitAll } from './template_ast';\nimport { PreparsedElementType, preparseElement } from './template_preparser';\nvar /** @type {?} */ BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n// Group 1 = \"bind-\"\nvar /** @type {?} */ KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nvar /** @type {?} */ KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nvar /** @type {?} */ KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nvar /** @type {?} */ KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nvar /** @type {?} */ KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nvar /** @type {?} */ KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nvar /** @type {?} */ IDENT_KW_IDX = 7;\n// Group 8 = identifier inside [()]\nvar /** @type {?} */ IDENT_BANANA_BOX_IDX = 8;\n// Group 9 = identifier inside []\nvar /** @type {?} */ IDENT_PROPERTY_IDX = 9;\n// Group 10 = identifier inside ()\nvar /** @type {?} */ IDENT_EVENT_IDX = 10;\n// deprecated in 4.x\nvar /** @type {?} */ TEMPLATE_ELEMENT = 'template';\n// deprecated in 4.x\nvar /** @type {?} */ TEMPLATE_ATTR = 'template';\nvar /** @type {?} */ TEMPLATE_ATTR_PREFIX = '*';\nvar /** @type {?} */ CLASS_ATTR = 'class';\nvar /** @type {?} */ TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];\nvar /** @type {?} */ TEMPLATE_ELEMENT_DEPRECATION_WARNING = 'The